flowWorkspace doesn't allow channels that are named as subset (edit: substring) of other (PE-A and PE-Alexa Fluor 700-A eg.)
1
0
Entering edit mode
lovetatting ▴ 10
@lovetatting-9329
Last seen 8.4 years ago
Sweden

 

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, ignore.case = channel.ignore.case))
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!!

love.tatting@liu.se

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"), ignore.case=TRUE)

[1] 1

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

 

 

flowWorkspace • 1.4k views
ADD COMMENT
1
Entering edit mode
Jiang, Mike ★ 1.3k
@jiang-mike-4886
Last seen 3.2 years ago
(Private Address)

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

ADD COMMENT
0
Entering edit mode

Works like a charm! Greatly thankful for your help!

ADD REPLY

Login before adding your answer.

Traffic: 791 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6