Help with flowCore
1
2
Entering edit mode
Jiang, Mike ★ 1.3k
@jiang-mike-4886
Last seen 3.2 years ago
(Private Address)
Andrea, We should compensate the data outside of read.flowSet call. Here is what you can do: #read the FCS files into a flowSet fs <- read.flowSet(...) #loop through flowset and do the compensation for each flowFrame #and return the compensated flowFrame,fsApply call will construct a new flowSet for you fs_comp <- fsApply(fs,function(frame){ #extract compensation matrix from keywords comp <- keyword(frame)$`SPILL` new_frame <- compensate(frame,comp) new_frame }) Let me know if you have more questions. Mike On 04/03/2013 03:43 AM, Valle Andrea wrote: > Dear Dr. Jiang, > > I'm a PhD student in Milan and I'm trying flowCore package. First of all let me tell you that I think it has been a great step forward in flow cytometry! > I'm writing you cause I have an issue about compensation and, although I tried a lots of possible solutions, I didn't succeed. I have to say that I'm not an expert in R langauge since this is my first approach with this subject. > When I load an FCS file it's is not compensated, although it include $SPILL matrix. Of course I can use "compensate" to apply the $SPILL matrix to that file. However I can't do it upon flowset creation. Once I created a flowset, the $SPILL keyword is no more included in each file. > How can I create a flowset in which each file is automatically compensated with its own compensation? > > I attached a representative file > > Many many thanks! > > Andrea Valle > -------------------------------------------------------------------- ------ > LA TUA CURA E' SCRITTA NEL TUO DNA. AL SAN RAFFAELE LA STIAMO REALIZZANDO. > AIUTA LA RICERCA, DAI IL TUO 5XMILLE - CF: 07636600962 > info:www.5xmille at hsr.it - www.5xmille.org > > Disclaimer added by CodeTwo Exchange Rules 2007 > http://www.codetwo.com >
flowCore flowCore • 4.8k views
ADD COMMENT
1
Entering edit mode
Finak, Greg ▴ 40
@finak-greg-5704
Last seen 10.2 years ago
I would add one more caveat.. double check that the $SPILL matrix is not just the identity matrix (sometimes this is the case). If so you'll need the single stained controls and the unstained control to calculate the spillover matrix with spillover(), and then proceed as Mike suggests. Greg Finak Staff Scientist Fred Hutchinson Cancer Research Center Mike <wjiang2 at="" fhcrc.org=""> wrote: Andrea, We should compensate the data outside of read.flowSet call. Here is what you can do: #read the FCS files into a flowSet fs <- read.flowSet(...) #loop through flowset and do the compensation for each flowFrame #and return the compensated flowFrame,fsApply call will construct a new flowSet for you fs_comp <- fsApply(fs,function(frame){ #extract compensation matrix from keywords comp <- keyword(frame)$`SPILL` new_frame <- compensate(frame,comp) new_frame }) Let me know if you have more questions. Mike On 04/03/2013 03:43 AM, Valle Andrea wrote: > Dear Dr. Jiang, > > I'm a PhD student in Milan and I'm trying flowCore package. First of all let me tell you that I think it has been a great step forward in flow cytometry! > I'm writing you cause I have an issue about compensation and, although I tried a lots of possible solutions, I didn't succeed. I have to say that I'm not an expert in R langauge since this is my first approach with this subject. > When I load an FCS file it's is not compensated, although it include $SPILL matrix. Of course I can use "compensate" to apply the $SPILL matrix to that file. However I can't do it upon flowset creation. Once I created a flowset, the $SPILL keyword is no more included in each file. > How can I create a flowset in which each file is automatically compensated with its own compensation? > > I attached a representative file > > Many many thanks! > > Andrea Valle > -------------------------------------------------------------------- ------ > LA TUA CURA E' SCRITTA NEL TUO DNA. AL SAN RAFFAELE LA STIAMO REALIZZANDO. > AIUTA LA RICERCA, DAI IL TUO 5XMILLE - CF: 07636600962 > info:www.5xmille at hsr.it - www.5xmille.org > > Disclaimer added by CodeTwo Exchange Rules 2007 > http://www.codetwo.com > _______________________________________________ Bioconductor mailing list Bioconductor at r-project.org https://stat.ethz.ch/mailman/listinfo/bioconductor Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT
0
Entering edit mode

Hi,

Sorry to follow up on a rather old thread but when I try to apply this code I get the following error:

Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘compensate’ for signature ‘"flowFrame", "NULL"’.

Sorry if this is something obvious but I am very new to R and I have been stuck on this one for a while. Any help will be greatly appreciated!!

Best,

Rosa.

ADD REPLY

Login before adding your answer.

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