[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

 >list <- read.table("list.txt", sep="")
 > class(list)
[1] "data.frame"
 >list <- as.matrix(list)
 > intersect(exprs(eset), list)
 >intersect(exprs(eset), as.character(list))
[1] NA   NA   NA   NA   ....
[901] NA   NA   NA   NA
[1] 904 1
 > exprs(eset)[as.character(list)]
[1] NA   NA   NA   NA   ....
[901] NA   NA   NA   NA
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:
>>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
>>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?

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

More information about the Bioconductor mailing list