annotate SMART/DiffExpAnal/DESeqTools/HTseqClean.R @ 31:0ab839023fe4

Uploaded
author m-zytnicki
date Tue, 30 Apr 2013 14:33:21 -0400
parents 94ab73e8a190
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
1 # HTseqClean
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
2 # remove extra counts out of genes
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
3 # for HTseq output
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
4
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
5 # input : rawCounts
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
6 # output : cleaned rawCounts
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
7
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
8 # created Feb 6th, 2012
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
9 # Modified Feb 16th, 2012
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
10 # Marie-Agnes Dillies
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
11
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
12
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
13 HTseqClean <- function( rawCounts ){
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
14
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
15 row2remove <- c("alignment_not_unique", "ambiguous", "no_feature", "not_aligned", "too_low_aQual")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
16 rawCounts <- rawCounts[!rawCounts$Id %in% row2remove,]
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
17 rawCounts[is.na(rawCounts)] <- 0
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
18 return(rawCounts)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
19 }