Mercurial > repos > morinlab > correct_read_counter
diff correctReads.R @ 0:75c4a4c32bae draft default tip
planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/correct_read_counter commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
| author | morinlab | 
|---|---|
| date | Tue, 11 Oct 2016 14:18:25 -0400 | 
| parents | |
| children | 
line wrap: on
 line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/correctReads.R Tue Oct 11 14:18:25 2016 -0400 @@ -0,0 +1,21 @@ +library(TitanCNA) +version <- "0.1.1" +args <- commandArgs(TRUE) + +tumWig <- args[1] +normWig <- args[2] +gc <- args[3] +map <- args[4] +target_list <- args[5] +outfile <- args[6] + +message('titan: Correcting GC content and mappability biases...') + +if( !is.null(target_list) ){ + target_list_data <- read.table(target_list, sep="\t", header=F, stringsAsFactors=F) + cnData <- correctReadDepth(tumWig, normWig, gc, map, targetedSequence = target_list_data) +} else { + cnData <- correctReadDepth(tumWig, normWig, gc, map) +} + +write.table(cnData, file = outfile, col.names = TRUE, row.names = FALSE, quote = FALSE, sep ="\t")
