Closed rob-p closed 6 years ago
infRepStat
is added in b906bb29ce82f6f188ffde042a74ba5a055d1686
This re-computes counts and abundances while importing inferential replicates. It can be used with countsFromAbundance (which will re-compute counts a second time) and with tx2gene. Everything proceeds downstream as if the re-computed counts and abundances were the original point estimates.
One example is infRepStat=matrixStats::rowMedians
to compute the median of posterior samples, for example.
I cleaned up some unrelated code (RSEM gene-level input) while I was adding this feature, so it's a bit hard to navigate the diffs. It's actually all in these three lines:
It would be nice to allow
tximport
to optionally derive the abundance for each transcript in each sample by computing some summary statistic (e.g. median or mean) of the inferential replicates, if they are available. These can sometimes be more robust or accurate than individual point estimates, and if inferential replicates are already being read in and summarized to obtain variances, the overhead for doing what is suggested above should be marginal.