diff --git a/workflow/rna-seq.nf b/workflow/rna-seq.nf index 7fcc2fd5b262b77dd880537322454bb10daf791a..32cf5a8b1180efa50c9c3e442ff73452fa6496f6 100644 --- a/workflow/rna-seq.nf +++ b/workflow/rna-seq.nf @@ -39,7 +39,6 @@ referenceBase = "/project/BICF/BICF_Core/shared/gudmap/references" script_bdbagFetch = Channel.fromPath("${baseDir}/scripts/bdbagFetch.sh") script_parseMeta = Channel.fromPath("${baseDir}/scripts/parseMeta.py") script_inferMeta = Channel.fromPath("${baseDir}/scripts/inferMeta.sh") -script_aggregateInference = Channel.fromPath("${baseDir}/scripts/aggregateInference.R") /* * splitData: split bdbag files by replicate so fetch can occure in parallel, and rename files to replicate rid @@ -423,7 +422,6 @@ process inferMetadata { input: path script_inferMeta - path script_aggregateInference path reference_inferMeta set val (repRID), path (inBam), path (inBai) from rawBam_inferMetadata diff --git a/workflow/scripts/aggregateInference.R b/workflow/scripts/aggregateInference.R deleted file mode 100644 index 3e8388d8c64beeaadabe2bca7a3795b8e163cb57..0000000000000000000000000000000000000000 --- a/workflow/scripts/aggregateInference.R +++ /dev/null @@ -1,43 +0,0 @@ -gc() -library(optparse) - -option_list=list( - make_option("--endness",action="store",type='character',help="Infered Endness"), - make_option("--stranded",action="store",type='character',help="Infered Strandedness"), - make_option("--strategy",action="store",type='character',help="Infered Sequencing Strategy"), - make_option("--percentF",action="store",type='double',help="Percent Forward Aligned Reads"), - make_option("--percentR",action="store",type='double',help="Percent Reverse Aligned Reads"), - make_option("--percentFail",action="store",type='double',help="Percent Failed Aligned Reads"), - make_option("--tin",action="store",type='character',help="TIN File") -) -opt=parse_args(OptionParser(option_list=option_list)) -rm(option_list) - -if (length(setdiff(c("endness","stranded","strategy","percentF","percentR","percentFail","tin","help"),names(opt))) != 0){ - stop(paste0("No input missing ",setdiff(c("endness","stranded","strategy","percentF","percentR","percentFail","tin","help"),names(opt)),", exiting.")) -} else if (!file.exists(opt$tin)){ - stop("No tin file passed, exiting.") -} - -if (opt$endness == "PairEnd"){ - endness <- "pe" -} else if (opt$endness == "SingleEnd"){ - endness <- "se" -} - -percentF <- round(opt$percentF,digits=2) -percentR <- round(opt$percentR,digits=2) -percentFail <- round(opt$percentFail,digits=2) - -repRID <- basename(gsub(".sorted.deduped.tin.xls","",opt$tin)) - -tin <- read.delim(opt$tin,sep="\t") - -tin.min <- round(min(tin$TIN),digits=2) -tin.med <- round(median(tin$TIN),digits=2) -tin.max <- round(max(tin$TIN),digits=2) -tin.sd <- round(sd(tin$TIN),digits=2) - -output <- paste(endness,opt$stranded,opt$strategy,percentF,percentR,percentFail,tin.min,tin.med,tin.max,tin.sd,sep=",") - -write(output,file="infer.csv")