read.flowSet fails but read.FCS works
2
0
Entering edit mode
pavitrarc ▴ 20
@pavitrarc-7234
Last seen 3.4 years ago
United States/Seattle/Fred Hutch

Hi, 

I have a folder containing .fcs files that I'm trying to import using read.flowSet() with:

all_data <- read.flowSet(path=fcs_dir_name,
                         pattern='*.fcs',
                         transformation=F);

This gives me the following error: 

Error in dim(colNames) <- c(ncol(from[[frameList[[1]]]]), length(frameList)) : 
  dims [product 125] do not match the length of object [25]

 

But running read.FCS() with lapply() on the same folder seems to work fine:

all_data<-lapply(list.files(fcs_dir_name,full.names=T),
                 function(x)read.FCS(x,transformation=F));

Any ideas on why this might be happening?

 

Thanks!

 

 

flowCore • 3.2k views
ADD COMMENT
1
Entering edit mode
Greg Finak ▴ 150
@greg-finak-4594
Last seen 6.4 years ago
(Private Address)
A couple of things to try: A flowSet must be composed of FCS files that have the same markers and the same number of channels in the same order. Is this the case for your data? The error you get is a but cryptic but that's what it's hinting at to me, and is a reasonable place to start checking. Can you coerce your list of flowFrames made with read.FCS into a flowSet? Greg.
ADD COMMENT
0
Entering edit mode
pavitrarc ▴ 20
@pavitrarc-7234
Last seen 3.4 years ago
United States/Seattle/Fred Hutch

Ah you're right! I couldn't coerce it into a flowSet no matter what I tried. Turns out one of the samples had only one fluorescence channel instead of two. Is there any way to get read.flowSet() to only import specified channels?

Thank you! 

ADD COMMENT
1
Entering edit mode
There is a column.pattern argument that you could pass to read.flowSet, which is a regular expression specifying which markers to keep. See ?read.FCS for details. Best Greg
ADD REPLY

Login before adding your answer.

Traffic: 815 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