[BioC] mas5call select genes

Wolfgang Huber huber at ebi.ac.uk
Thu Jan 13 14:09:37 CET 2005


Hi Claire,

... a more minimalistic (and faster) version of this function would be:

number.pres <- function(x) rowSums(x=="P")

(isn't R a cool language ;)

Bw
   Wolfgang


Claire Wilson wrote:
> Hi Katleen,
> 
> This is the function I use on a matrix of Affymetrix Absent/Present
> calls (rows are probesets, columns are chips)
> 
> 
> number.pres <- function(x) {
> 	x[x=="P"] <- 1;
> 	x[x!=1]   <- 0;
> 	return(apply(x,1,function(a) { sum(as.integer(a))}))
> }



More information about the Bioconductor mailing list