refactor: Move NANOFILT module to its own file

This commit is contained in:
Thomas A. Christensen II 2023-09-23 15:44:08 -05:00
parent 0e822c2729
commit f157b0395e
Signed by: millironx
GPG key ID: 09335146883990B9
2 changed files with 28 additions and 28 deletions

29
main.nf
View file

@ -2,6 +2,7 @@
include { EFETCH } from './modules/efetch'
include { HAPLINK_VARIANTS } from './modules/haplink/variants'
include { NANOFILT } form './modules/nanofilt'
include { VIQUAS } from './modules/viquas'
workflow {
@ -69,34 +70,6 @@ workflow {
)
}
process NANOFILT {
cpus 1
memory '8.GB'
container 'quay.io/biocontainers/nanofilt:2.8.0--py_0'
input:
tuple val(prefix), path(reads)
output:
tuple val(prefix), path("*_trimmed.fastq.gz")
script:
"""
gzip \\
-cdf "${reads}" \\
| NanoFilt \\
--logfile "trimmed/${prefix}.nanofilt.log" \\
--length 100 \\
--quality 7 \\
--headcrop 30 \\
--tailcrop 30 \\
--minGC 0.1 \\
--maxGC 0.9 \\
| gzip \\
> "${prefix}_trimmed.fastq.gz"
"""
}
process MINIMAP2 {
cpus 4
memory '8.GB'

27
modules/nanofilt/main.nf Normal file
View file

@ -0,0 +1,27 @@
process NANOFILT {
cpus 1
memory '8.GB'
container 'quay.io/biocontainers/nanofilt:2.8.0--py_0'
input:
tuple val(prefix), path(reads)
output:
tuple val(prefix), path("*_trimmed.fastq.gz")
script:
"""
gzip \\
-cdf "${reads}" \\
| NanoFilt \\
--logfile "trimmed/${prefix}.nanofilt.log" \\
--length 100 \\
--quality 7 \\
--headcrop 30 \\
--tailcrop 30 \\
--minGC 0.1 \\
--maxGC 0.9 \\
| gzip \\
> "${prefix}_trimmed.fastq.gz"
"""
}