[BioC] re incomplete analysis in Deseq

Steve Lianoglou mailinglist.honeypot at gmail.com
Tue Mar 6 22:21:26 CET 2012


Hi,

On Tue, Mar 6, 2012 at 3:28 PM, Wolfgang Huber <whuber at embl.de> wrote:
>
> Hi Julian, Kasper
>
> in this case you will need to (and as I am sure, be able to) come up with
> another method for estimating size factors that works on these data. Why not
> try with the 'colSums'?

Couldn't we just-as-well adapt the estimateSizesFactorsForMatrix
function to step over the (row,col) bins that have the 0 counts
instead of skipping over rows that only have 1 0 element?

Something like so:

#########
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



More information about the Bioconductor mailing list