Skip to content

Commit

Permalink
Include memory reduction from nf-core#7074
Browse files Browse the repository at this point in the history
Co-authored-by: MartinPippel <[email protected]>
  • Loading branch information
mahesh-panchal and MartinPippel committed Dec 4, 2024
1 parent 773a6fc commit 0b1f640
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
14 changes: 7 additions & 7 deletions modules/nf-core/merqury/merqury/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@
"id": "test",
"single_end": false
},
"test.completeness.stats:md5,58b3933129832d64652babd80688eec3"
"test.completeness.stats:md5,a8c7089c212e9dca2e0c47199b3002f9"
]
],
[
Expand Down Expand Up @@ -477,18 +477,18 @@
[
"versions.yml:md5,825a4c61369638389227eee16dfb08b5"
],
"test.genome.read.test2_1.spectra-cn.fl.png,test.genome.read.test2_2.spectra-cn.fl.png,test.genome.spectra-cn.fl.png",
"test.genome.read.test2_1.spectra-cn.ln.png,test.genome.read.test2_2.spectra-cn.ln.png,test.genome.spectra-cn.ln.png",
"test.genome.read.test2_1.spectra-cn.st.png,test.genome.read.test2_2.spectra-cn.st.png,test.genome.spectra-cn.st.png",
"test.genome.spectra-cn.fl.png,test.genome.test.test2_1.spectra-cn.fl.png,test.genome.test.test2_2.spectra-cn.fl.png",
"test.genome.spectra-cn.ln.png,test.genome.test.test2_1.spectra-cn.ln.png,test.genome.test.test2_2.spectra-cn.ln.png",
"test.genome.spectra-cn.st.png,test.genome.test.test2_1.spectra-cn.st.png,test.genome.test.test2_2.spectra-cn.st.png",
"test.spectra-asm.fl.png",
"test.spectra-asm.ln.png",
"test.spectra-asm.st.png",
"test.hapmers.blob.png"
],
"meta": {
"nf-test": "0.9.1",
"nextflow": "24.10.0"
"nf-test": "0.9.2",
"nextflow": "24.10.2"
},
"timestamp": "2024-11-04T12:43:51.143935902"
"timestamp": "2024-12-04T20:06:48.980375307"
}
}
18 changes: 9 additions & 9 deletions modules/nf-core/meryl/count/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@ process MERYL_COUNT {
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def reduced_mem = task.memory.multiply(0.9).toGiga()
"""
for READ in $reads; do
for READ in ${reads}; do
meryl count \\
k=$kvalue \\
threads=$task.cpus \\
memory=${task.memory.toGiga()} \\
$args \\
k=${kvalue} \\
threads=${task.cpus} \\
memory=${reduced_mem} \\
${args} \\
\$READ \\
output read.\${READ%.f*}.meryl
output ${prefix}.\${READ%.f*}.meryl
done
cat <<-END_VERSIONS > versions.yml
Expand All @@ -39,11 +40,10 @@ process MERYL_COUNT {
"""

stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
for READ in $reads; do
touch read.\${READ%.f*}.meryl
for READ in ${reads}; do
touch ${prefix}.\${READ%.f*}.meryl
done
cat <<-END_VERSIONS > versions.yml
Expand Down
6 changes: 3 additions & 3 deletions modules/nf-core/meryl/count/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@
"id": "test",
"single_end": true
},
"read.test1_1.meryl:md5,d41d8cd98f00b204e9800998ecf8427e"
"test.test1_1.meryl:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
Expand All @@ -315,7 +315,7 @@
"id": "test",
"single_end": true
},
"read.test1_1.meryl:md5,d41d8cd98f00b204e9800998ecf8427e"
"test.test1_1.meryl:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
Expand All @@ -327,6 +327,6 @@
"nf-test": "0.9.2",
"nextflow": "24.10.2"
},
"timestamp": "2024-12-04T12:28:06.856825599"
"timestamp": "2024-12-04T20:07:50.042776716"
}
}

0 comments on commit 0b1f640

Please sign in to comment.