[BioC] select genes from a table above a threshold

Thomas Girke thomas.girke at ucr.edu
Sun May 11 18:22:50 CEST 2008

You may want to get familiar with basic R comparisons applied to matrices 
(or data frames), and how to add up the logical results with functions 
like rowSums(). The rest is standard subsetting of R objects with logical 

Here is a simple example for finding all genes (rows) that have at least
x instances of a given comparison per row (x here >=1). 

y <- matrix(rnorm(50), 10, 5, dimnames=list(paste("g", 1:10, sep=""), paste("t", 1:5, sep="")))
myQ <- y >= 1
myQcount <- rowSums(myQ) # counts TRUE values per row

I hope this helps. 


On Sun 05/11/08 15:23, Dr Balazs Gyorffy wrote:
> Hi All!
> I have a table. Rows: genes - one gene is represented by several probes,
> colums: samples. Values: expression ratios.
> I would like to get the values for all samples and all probes for those genes,
> which have an expression ratio higher that 2 in at least 2 different
> measurements.
> (Thus these "measurements" can represent values of A, one probe in two or more
> samples or B, several probes in one sample, or C, any combination of these.)
> How can I make this?
> Thanks
> Balazs
> -------------------------
> Bal?zs GY?RFFY MD, PhD
> Children's Hospital Boston Informatics Program
> Harvard-MIT Health Sciences and Technology
> 300 Longwood Avenue, Boston, USA
> Enders 150.6
> Tel: +1 617 919 2654
> Email: zsalab2 at yahoo.com
>       Nicht vergessen! Am Sonntag, den 11. Mai ist Muttertag 
> Geschenkideen, Gedichte & mehr: www.yahoo.de/muttertag
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

Thomas Girke
Assistant Professor of Bioinformatics
Director, IIGB Bioinformatic Facility
Center for Plant Cell Biology (CEPCEB)
Institute for Integrative Genome Biology (IIGB)
Department of Botany and Plant Sciences
1008 Noel T. Keen Hall
University of California
Riverside, CA 92521

E-mail: thomas.girke at ucr.edu
Website: http://faculty.ucr.edu/~tgirke
Ph: 951-827-2469
Fax: 951-827-4437

More information about the Bioconductor mailing list