[BioC] re incomplete analysis in Deseq

Steve Lianoglou mailinglist.honeypot at gmail.com
Tue Mar 6 22:42:31 CET 2012


Or, perhaps a bit better. The first check for which rows to keep would
be something like:

esfm <- function(counts, locfunc=median, min.obs=3) {
  counts <- counts[rowSums(counts > 0) > min.obs,]
  ## Add checks to bail on situation when nrow(counts)
  ##  is too small
  ## ...
  ## code from below
}

> #########
> esfm <- function(counts, locfunc=median) {
>  ## Can't use info from rows that are all 0, so axe them
>  counts <- counts[rowSums(counts) > 0,]
>
>  logc <- log(counts)
>  loggeomeans <- apply(logc, 1, function(x) {
>    use <- is.finite(x)
>    sum(x[use]) / sum(use)
>  })
>
>  apply(logc, 2, function(lc) {
>    use <- is.finite(lc)
>    exp(locfunc(lc[use] - loggeomeans[use]))
>  })
> }
> ##########
>
> ¿mas o menos?
>
> -steve
>
> --
> Steve Lianoglou
> Graduate Student: Computational Systems Biology
>  | Memorial Sloan-Kettering Cancer Center
>  | Weill Medical College of Cornell University
> Contact Info: http://cbio.mskcc.org/~lianos/contact



-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact



More information about the Bioconductor mailing list