diff --git a/workflow/scripts/calculateTPM.R b/workflow/scripts/calculateTPM.R index 3643073549a6a9b8de8f1dce1d4a95ead52fa223..175bd3ceb81dfe20e0d96e9a5cec66bffe034e32 100644 --- a/workflow/scripts/calculateTPM.R +++ b/workflow/scripts/calculateTPM.R @@ -17,9 +17,10 @@ if (!("count" %in% names(opt))){ repRID <- basename(gsub(".featureCounts","",opt$count)) -count <- read.delim(opt$count, comment.char="#") +count <- read.delim(opt$count, comment.char="#") # if featureCounts file changes structure, be sure to update count and Length columns below +colnames(count)[7] <- "count" -rpk <- count$Q.Y5JA.sorted.deduped.bam/count$Length/1000 +rpk <- count$count/count$Length/1000 scale <- sum(rpk)/1000000