Skip to content

Commit

Permalink
formatting consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
asboner committed Oct 27, 2020
1 parent d2222ce commit 2c7ca57
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
30 changes: 15 additions & 15 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
if (!params.inputDir) {
exit 1, 'inputDir parameter is missing.'
}
if ( !new File(params.inputDir).exists()) {
if (!new File(params.inputDir).exists()) {
exit 1, "The input folder does not exists."+params.inputDir+"\n"
}
if (!params.outputDir) {
Expand All @@ -15,11 +15,11 @@ if (!params.starTmpDir) {
exit 1, "starTmpDir parameter is missing."
}

if ( !new File(params.starTmpDir).exists()) {
if (!new File(params.starTmpDir).exists()) {
exit 1, 'The STAR temporary folder does not exists. ('+params.starTmpDir+')\n'
}
if (!params.localOutDir) {
params.localOutDir='bam'
if (!params.localOutputDir) {
params.localOutputDir='bam'
}
if (!params.debug) {
exit 1, "Debug prefix parameter is missing."
Expand All @@ -34,7 +34,7 @@ process ERValign {

// executor configuration
time '8h'
memory '35.GB'
memory '35 GB'
scratch true
cpus params.cpus
publishDir params.outputDir
Expand All @@ -44,15 +44,15 @@ process ERValign {
errorStrategy 'terminate'

input:
tuple val(sample), file(reads) from pairFiles_ch
val(localOutDir) from params.localOutDir
val(limitMemory) from params.limitMemory
val(debug) from params.debug
tuple val(sample), file (reads) from pairFiles_ch
val (localOutputDir) from params.localOutputDir
val (limitMemory) from params.limitMemory
val (debug) from params.debug

output:
path ( "${localOutDir}/${sample}.Aligned.sortedByCoord.out.bam" ) into bam_ch
path ( "${localOutDir}/${sample}.Aligned.sortedByCoord.out.bam.bai" ) into bai_ch
val "${sample}" into prefix_ch
path ("${localOutputDir}/${sample}.Aligned.sortedByCoord.out.bam") into bam_ch
path ("${localOutputDir}/${sample}.Aligned.sortedByCoord.out.bam.bai") into bai_ch
val (sample) into prefix_ch

shell:
template 'ERValign.sh'
Expand All @@ -74,15 +74,15 @@ process ERVcount {

input:
val (sample) from prefix_ch
val(debug) from params.debug
val (debug) from params.debug
path (bam) from bam_ch
path (bai) from bai_ch

output:
path ( "${sample}"+'.ERVresults.txt') into final_results_ch
path ("${sample}"+'.ERVresults.txt') into final_results_ch

shell:
template "ERVcount.sh"
template 'ERVcount.sh'
}

// ~~~~~~~~~~~~~~~ PIPELINE COMPLETION EVENTS ~~~~~~~~~~~~~~~~~~~ //
Expand Down
2 changes: 1 addition & 1 deletion templates/ERValign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ READS="!{reads}"
CPUS=!{task.cpus}
LIMIT_RAM=!{limitMemory}
OUT_PREFIX="!{sample}."
LOCAL_OUTDIR="!{localOutDir}"
LOCAL_OUTDIR="!{localOutputDir}"

# checking the prefix of the output BAM
if [ -z ${OUT_PREFIX+x} ];then
Expand Down

0 comments on commit 2c7ca57

Please sign in to comment.