Skip to content

Commit

Permalink
refactor to use launchDir (#2)
Browse files Browse the repository at this point in the history
* move to launchDir

* remove the echo
  • Loading branch information
abhi18av authored Jul 19, 2020
1 parent c8355a7 commit 49cfa45
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ inputTrimmedRawFilePattern = "./*_{R1,R2}.p.fastq.gz"
inputRawFilePattern = params.trimmed ? inputTrimmedRawFilePattern : inputUntrimmedRawFilePattern

Channel.fromFilePairs(inputRawFilePattern)
.into { ch_in_snippy }
.set { ch_in_snippy }

Channel.value("$baseDir/NC000962_3.gbk")
.into {ch_refGbk}
Channel.value("$workflow.launchDir/NC000962_3.gbk")
.set {ch_refGbk}

/*
###############
Expand All @@ -32,10 +32,10 @@ snippy_command

process snippy {
container 'quay.io/biocontainers/snippy:4.6.0--0'
//container 'ummidock/snippy_tseemann:4.6.0-02'
publishDir 'results/snippy', mode: params.saveBy
stageInMode 'symlink'


input:
path refGbk from ch_refGbk
set genomeFileName, file(genomeReads) from ch_in_snippy
Expand All @@ -47,6 +47,11 @@ process snippy {
genomeName= genomeFileName.toString().split("\\_")[0]

"""
snippy --cpus ${params.cpus} --ram ${params.ram} --outdir $genomeName --ref $refGbk --R1 ${genomeReads[0]} --R2 ${genomeReads[1]}
"""

}

// alternative container
//container 'ummidock/snippy_tseemann:4.6.0-02'

0 comments on commit 49cfa45

Please sign in to comment.