Commit e30c987f authored by Raphael Müller's avatar Raphael Müller
Browse files

minor formatting things

parent daf75846
......@@ -242,7 +242,6 @@ if(bamAvailable){
"""
}//process bwaIndexing
// BWA Mapping with Illuminma unpaired reads
process unpairedMapping {
cpus { 8 > threads ? threads : 8 }
......@@ -261,7 +260,7 @@ if(bamAvailable){
"""
}//process: unpairedMapping
// BWA Mapping with Illumina paired reads
// BWA Mapping with Illumina paired reads
process pairedMapping {
cpus { 8 > threads ? threads : 8 }
if(keepTemporaryFiles){
......@@ -317,9 +316,11 @@ if(bamAvailable){
"""
}// process nanoporeMapping
} else { //fi: assemblyAvailable
println "specify either --assembly or --bam-files"
println "specify either reads to map with assembly or already mapped reads"
println HELP
exit 1
}
} //else: no assembly nore bam files
// Merging of Illumina mapped reads
process mergeIlluminaBamFiles {
if(keepTemporaryFiles){
......@@ -352,7 +353,7 @@ process mergePacbioBamFiles {
"""
}//process: mergePacbioBamFiles
// Merging of PacBio mapped reads
// Merging of Nanopore mapped reads
process mergeNanoporeBamFiles {
if(keepTemporaryFiles){
publishDir output, mode: 'copy'
......@@ -397,11 +398,11 @@ if (qualityControl){
file("*.{log,err}") into qualilogs
script:
"""
qualimap bamqc $qualimapOptions -bam $bam -nt ${task.cpus} -outdir ${bam.baseName}_stats > ${bam.baseName}_stats_bamqc.log 2> ${bam.baseName}_stats_bamqc.err
qualimap bamqc $qualimapOptions -bam $bam -nt ${task.cpus} -outdir ${bam.baseName}_stats > ${bam.baseName}_stats_bamqc.log 2> ${bam.baseName}_stats_bamqc.err
"""
}//process: qualimap
// Multiqc QC with qualimap results
// Multiqc QC with qualimap results
process multiqc {
publishDir "${output}/", mode: 'copy'
......@@ -463,13 +464,13 @@ if(coverageHistogram){
}
// Coverage comparison R script for coverage
chRCoverageMultiPlot.into {chRCoverageMultiPlot_1; chRCoverageMultiPlot_2; chTest}
chRCoverageMultiPlot.into {chRCoverageMultiPlot_1; chRCoverageMultiPlot_2}
process RMultiCoveragePlot {
publishDir output, mode: 'copy'
cpus 1
input:
val(tech_cov) from chRCoverageMultiPlot_1.collect()
val(techCov) from chRCoverageMultiPlot_1.collect()
val sz from chRCoverageMultiPlot_2.collect().size()
output:
file "*.pdf" into globAll
......@@ -485,7 +486,7 @@ if(coverageHistogram){
options(scipen=999)
# Set up variable to control command line arguments
tech_files <- c("${tech_cov.join('","')}")
tech_files <- c("${techCov.join('","')}")
techs <- tech_files[seq(1,length(tech_files),2)]
files <- tech_files[seq(2,length(tech_files),2)]
......@@ -558,7 +559,6 @@ if(coverageHistogram){
}//process totalNucleotideCalculation
if(assemblyAvailable){
//count number of nucleotides of given assembly
chAssemblyNucleotides = Channel.fromPath(assembly)
process assemblyNucleotideCounting {
......@@ -576,16 +576,12 @@ if(coverageHistogram){
chAssemblyGenomeSize = Channel.of("0")
}//fi: assemblyAvailable
chPeakAsInteger = chPeak.map{[it[0], Integer.parseInt(it[1])]}
chTotalNucleotidesAsInteger = chTotalNucleotidesResults.map{[it[0], Integer.parseInt(it[1])]}
chGenomeSizeEstimationResults = chTotalNucleotidesAsInteger.join(chPeakAsInteger).join(chGenomeEstimationSortedBams).map{ [it[0], it[3], it[1], it[2], it[1] / it[2]] }
/*
* Print results
*/
chPeakAsInteger = chPeak.map{[it[0], Integer.parseInt(it[1])]}
chTotalNucleotidesAsInteger = chTotalNucleotidesResults.map{[it[0], Integer.parseInt(it[1])]}
chGenomeSizeEstimationResults = chTotalNucleotidesAsInteger.join(chPeakAsInteger).join(chGenomeEstimationSortedBams).map{ [it[0], it[3], it[1], it[2], it[1] / it[2]] }
//closure for rounding in nice format
rfp = {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment