[BioC] subsetting an eset object with a defined list

Celine Carret ckc at sanger.ac.uk
Thu Oct 5 13:00:03 CEST 2006


Sure, sorry:
thank you
C.

 >list <- read.table("list.txt", sep="")
 > class(list)
[1] "data.frame"
 >list <- as.matrix(list)
 > intersect(exprs(eset), list)
character(0)
 >intersect(exprs(eset), as.character(list))
character(0)
 >exprs(eset)[list]
[1] NA   NA   NA   NA   ....
...
[901] NA   NA   NA   NA
 >dim(list)
[1] 904 1
 > exprs(eset)[as.character(list)]
[1] NA   NA   NA   NA   ....
...
[901] NA   NA   NA   NA
 >head(list)
    V1
1 "PF11_0211"
2 "PF14_0749"
3 "PF10_0015"
4 "PFB0695c"
5 "PF14_0316"
6 "PF11_0039"



Sean Davis wrote:

>On Thursday 05 October 2006 06:27, Celine Carret wrote:
>  
>
>>Hi,
>>I'm stuck remembering the way of subsetting an eset object (19 affy
>>arrays) to accomodate only a defined list of genes that I'm interested in.
>>I read.table(list) into R, transformed it as.matrix and use the functions:
>>exprs(eset)[list] or
>>exprs(eset)[as.character(list)]
>>
>>those functions recognize that I have 904 genes in that list, but gives
>>me 904 NA
>>What I would like to obtain is my 904 genes with the values for the 19
>>arrays, in order to assess the DE only on this subgroup as the other
>>genes are not supposed to be expressed at this stage of the cultures I'm
>>looking at.
>>Could someone please point me in the right direction?
>>    
>>
>
>I think it might be best if you post the exact code that you used.  There are 
>several statements that will likely give errors.  Can you send the input and 
>(possibly abbreviated) output from R?
>
>Sean
>
>  
>

-- 
----------------------------------------------------
Celine Carret PhD
Pathogen Microarrays group
The Wellcome Trust Sanger Institute
Hinxton, Cambridge CB10 1SA, UK.
tel. +44 (0)1223 494 940
fax. +44 (0)1223 494 919
email: ckc at sanger.ac.uk
http://www.sanger.ac.uk/PostGenomics/PathogenArrays/



More information about the Bioconductor mailing list