Mercurial > repos > yufei-luo > s_mart
diff SMART/DiffExpAnal/DESeqTools/HTseqClean.R @ 31:0ab839023fe4
Uploaded
author | m-zytnicki |
---|---|
date | Tue, 30 Apr 2013 14:33:21 -0400 |
parents | 94ab73e8a190 |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SMART/DiffExpAnal/DESeqTools/HTseqClean.R Tue Apr 30 14:33:21 2013 -0400 @@ -0,0 +1,19 @@ +# HTseqClean +# remove extra counts out of genes +# for HTseq output + +# input : rawCounts +# output : cleaned rawCounts + +# created Feb 6th, 2012 +# Modified Feb 16th, 2012 +# Marie-Agnes Dillies + + +HTseqClean <- function( rawCounts ){ + + row2remove <- c("alignment_not_unique", "ambiguous", "no_feature", "not_aligned", "too_low_aQual") + rawCounts <- rawCounts[!rawCounts$Id %in% row2remove,] + rawCounts[is.na(rawCounts)] <- 0 + return(rawCounts) +}