[BioC] Some Genefilter questions

Jenny Drnevich drnevich at uiuc.edu
Mon Dec 4 20:21:38 CET 2006

Hi Amy,

You've got two different problems here. 1) You can't subset an AffyBatch 
with probeset names because it contains individual probe values. Actually, 
I don't think you can subset an AffyBatch row-wise at all, period.

2) You can subset an exprSet or ExpressionSet object row-wise using 
probeset names, but not like you're trying to do. You can't use "-" with a 
character vector to remove those probesets, but you can use a character 
vector to keep probesets. There are several ways to do this - here's one:

new.eset <- eset[setdiff(geneNames(Baseage.rawdata), parasites) , ]


At 01:00 PM 12/4/2006, Amy Mikhail wrote:
>Hi all,
>Sorry to bring this interesting discussion back to the mundane again for a
>minute, but when trying to create the "parasites" character vector from my
>affybatch object, removing the parasite probe sets with Robert's suggested
>code is giving me an error:
> > parasites <- grep("^Pf", geneNames(Baseage.rawdata), value=TRUE)
> > parasites
>[2965] "Pf.4.138.0_CDS_at"      "Pf.4.139.0_CDS_at"
>[2967] "Pf.4.14.0_CDS_at"       "Pf.4.140.0_CDS_at"
>[2969] "Pf.4.142.0_CDS_at"      "Pf.4.144.0_CDS_at"
>[2971] "Pf.4.146.0_CDS_at"      "Pf.4.147.0_CDS_at"
>[2973] "Pf.4.148.0_CDS_at"      "Pf.4.149.0_CDS_at"   ###etc###
> > Mossie.rawsub = Baseage.rawdata[-parasites,]
>Error in -parasites : invalid argument to unary operator
>In addition: Warning message:
>The use of abatch[i,] and abatch[i] is decrepit. Please us abatch[,i]
>  in: Baseage.rawdata[-parasites, ]
>If I try as the warning message suggests, I get another error:
> > Mossie.rawsub <- Baseage.rawdata[-,parasites]
>Error: syntax error in "Mossie.rawsub <- Baseage.rawdata[-,"
>Or variations on a theme...
> > Mossie.rawsub <- Baseage.rawdata[,-parasites]
>Error in -parasites : invalid argument to unary operator
>I could not find the first error in the bioconductor archives.
>Any ideas?
>Many thanks,
>Amy Mikhail
>Research student
>University of Aberdeen
>Zoology Building
>Tillydrone Avenue
>Aberdeen AB24 2TZ
>Email: a.mikhail at abdn.ac.uk
>Phone: 00-44-1224-272880 (lab)
>        00-44-1224-273256 (office)

Jenny Drnevich, Ph.D.

Functional Genomics Bioinformatics Specialist
W.M. Keck Center for Comparative and Functional Genomics
Roy J. Carver Biotechnology Center
University of Illinois, Urbana-Champaign

330 ERML
1201 W. Gregory Dr.
Urbana, IL 61801

ph: 217-244-7355
fax: 217-265-5066
e-mail: drnevich at uiuc.edu

More information about the Bioconductor mailing list