Entering edit mode
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
>
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.