Loading FCS files
1
0
Entering edit mode
smajor • 0
@smajor-12172
Last seen 7.0 years ago

Hello,

I am running a fairly extensive flow cytometry experiment. I am very new to Rstudio and I'm having a difficult time to loading my data so I can begin my analyses. I used a partial 96-well plate to run my experiment. I was able to export each wells data as a .fcs file. None of my samples have been gated yet... I was hoping to perform this analysis with Rstudio. I was able to load what looks like my full data set using "read.flowSet". Calling this object (I've called it "c") it reveals there are 84 experiments and there are column names with FSC-A SSC-A FL1-A, etc...Ok, great, I have all my experiments in a single object.

c <- read.flowSet(path = "170113 HTB1-CC503 AOvPI", transformation = F)

Now, I have all this metaData that I would like to attach to each sample. In the first column of this metadata file is the name of the .fcs file/sample (i.e A01 Xx Xx.fcs), the corresponding meta data for each sample, and the remaining columns are empty but labeled with the names of the columns from my "c" (flowSet data). According to this tutorial on a Flow Work flow, it looks like I should be able to associate this metaData by adding "phenoData" command. So I read this metadata table with "read.table" and converted it to an annotated data (as(r,"AnnotatedDataFrame"))

txt", header=T, sep="\t")

s <- as(r, "AnnotatedDataFrame")

Now, when I try to add the phenoData command I get one of several warning messages

 c <- read.flowSet(path = "170113 HTB1-CC503 AOvPI", phenoData = s, transformation = F)

Error in read.flowSet(path = "170113 HTB1-CC503 AOvPI", phenoData = s,  : 
  Not all files given by phenoData could be found in 170113 HTB1-CC503 AOvPI

I then tried more iterations on this theme

c <- read.flowSet(path = "170113 HTB1-CC503 AOvPI", phenoData(s), transformation = F)
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘phenoData’ for signature ‘"AnnotatedDataFrame"’

Any help to get this to work would then be appreciated. I may also have some follow up questions and inquiries.

Thank you

Sam

FCS flow cytometry bioconductor phenoData Loading Data • 2.3k views
ADD COMMENT
1
Entering edit mode
SamGG ▴ 350
@samgg-6428
Last seen 3 hours ago
France/Marseille/Inserm

Hi,

I think the most informative message concerns the fact that some files stated in your annotation data frame could not be found in the directory: Not all files given by phenoData could be found in 170113 HTB1-CC503 AOvPI. The last error is due to hacking: unable to find an inherited method for function ‘phenoData’ for signature ‘"AnnotatedDataFrame"’.

So you should double check the name of the files given in your text table. Joining the file names from the directory and the text table r (either 1st column or rownames) might help: cbind(dir("170113 HTB1-CC503 AOvPI"), r[,1], row.names(r))

Alternatively, the phenoData argument could contains the name of the file of this text table. This file should be within the FCS folder as stated in the doc.

Alternatively, the argumentphenoData can be of class character, in which case this function tries to read aAnnotatedDataFrame object from the file with that name by callingread.AnnotatedDataFrame(file.path(path,phenoData),...)

HTH

ADD COMMENT

Login before adding your answer.

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