Question: flowWorkspace doesn't allow channels that are named as subset (edit: substring) of other (PE-A and PE-Alexa Fluor 700-A eg.)
gravatar for lovetatting
4.0 years ago by
lovetatting10 wrote:


Thanks for a great package!

I had a great experience with it, but came across an error on parsing a particular .wsp-file. 

I have located the error to line 575 in R/GatingSet-Methods where I figure retrieved compensation data is checked against the actual data of the FCS-files. The offending code is as follows. 

markerInd <- sapply(marker, function(thisMarker)grep(thisMarker, cnd, =
matchedMarker <- cnd[markerInd]

It fails with a subscript error as markerInd is a list. On object inspection I find cod to be a string vector and markerInd to be a list with marker names holding single item vectors of numerics. Through step code debugging I find that the grep function finds more than one index for certain channels and thus returns a list instead of a vector. This turns out to be because of greedy behavior of the grep function as it returns positive match for "Alexa Fluor 700-A" in both "Alexa Fluor 700-A" and "PE-Alexa Fluor 700-A". 

I think that the addition of the argument fixed = TRUE to the grep function would deter this behavior.

Again, thanks for a great package that is really helpful!!

EDIT:  I invesigated a bit further and it is more precisely when the marker element is a substring of the cod element and not a subset, eg.

>grep("PE-A", c("PE-A", "PE-Alexa Fluor 700-A"))

[1] 1 2

It seems like the proper adjustment would instead be

>grep("\\<PE-A\\>", c("PE-A", "PE-Alexa Fluor 700-A"),

[1] 1

That is to append the regex with word start and word ending tags. 



flowworkspace • 556 views
ADD COMMENTlink modified 4.0 years ago by Jiang, Mike1.2k • written 4.0 years ago by lovetatting10
Answer: flowWorkspace doesn't allow channels that are named as subset (edit: substring)
gravatar for Jiang, Mike
4.0 years ago by
Jiang, Mike1.2k
(Private Address)
Jiang, Mike1.2k wrote:

I pushed the fix to flowWorkspace 3.16.4. Let me know if it solves your problem. Thanks!

ADD COMMENTlink written 4.0 years ago by Jiang, Mike1.2k

Works like a charm! Greatly thankful for your help!

ADD REPLYlink written 3.9 years ago by lovetatting10
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 249 users visited in the last hour