-
Notifications
You must be signed in to change notification settings - Fork 954
New module: khmer/trimlowabund
#7806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
zachary-foster
merged 36 commits into
nf-core:master
from
zachary-foster:add_khmer_trimlowabund
Mar 21, 2025
Merged
Changes from 14 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
ac90d8a
add khmer/trimlowabund
da4d7ce
use evironment.yml
b94c0cc
chore(deps): update tj-actions/changed-files action to v46 (#7809)
renovate[bot] cfa0572
Added coreograph nf-test (#7812)
kbestak 21a008b
Added ilastik/multicut nftest (#7811)
kbestak ed35879
Update `graphtyper/vcfconcatenate`: Add batching to avoid long comman…
zachary-foster 4ec88a8
basicpy nf-test (#7772)
kbestak 8e9e72d
Clair3 (#7765)
robert-a-forsyth 78f73cc
chore(deps): update github actions (#7796)
renovate[bot] 2ada133
Change file name for severus_somatic.vcf (#7814)
robert-a-forsyth 2d6be5b
Clean up hifiasm module + add bin file input (#7802)
prototaxites 1b37eea
fix samtools/convert stub (#7816)
nvnieuwk 1d266fb
add default memory if task.memory is not set
e47bfb5
Merge branch 'master' into add_khmer_trimlowabund
zachary-foster 6f07836
Update modules/nf-core/khmer/trimlowabund/meta.yml
zachary-foster b8155c6
Update modules/nf-core/khmer/trimlowabund/meta.yml
zachary-foster b4f40b1
Update `sourmash/compare`: Name output by prefix and update conda/doc…
zachary-foster d94d00b
add Subworkflow linting step to CI (#7835)
mashehu b70e301
Add missing swf change detection (#7836)
mashehu 593d215
Add bedtools/shuffle module (#7803)
itrujnara 336a183
add new ARCHIVE_EXTRACT subworkflow (#7817)
maxulysse f85c946
APPLYBQSR output line specificity (#7818)
johnoooh 481a027
Trying out RunsOn runners (#7840)
mashehu be1ce4a
Fix language server error in salmon/quant (#7843)
nvnieuwk 6c2d467
New module: `busco/download` (#7788)
zachary-foster a8c68ef
Fix language server errors in arriba/arriba (#7845)
nvnieuwk 683fe0d
name output by prefix
752c012
Merge branch 'master' into add_khmer_trimlowabund
zachary-foster 1de073a
set to process_medium
99c8c65
check if input and output file are the same
9e282d9
make sure regex matches only part of string
3b0f1b9
Update modules/nf-core/khmer/trimlowabund/main.nf
zachary-foster 4593583
Update modules/nf-core/khmer/trimlowabund/main.nf
zachary-foster c6aed77
apply changes made to file path handeling to stub
99c8ad5
Update modules/nf-core/khmer/trimlowabund/meta.yml
SPPearce 4d93b99
Update modules/nf-core/khmer/trimlowabund/meta.yml
SPPearce File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json | ||
| channels: | ||
| - conda-forge | ||
| - bioconda | ||
| dependencies: | ||
| - "bioconda::khmer=3.0.0a3" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| process KHMER_TRIMLOWABUND { | ||
| tag "${meta.id}" | ||
| label 'process_low' | ||
|
|
||
| conda "${moduleDir}/environment.yml" | ||
| container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
| 'https://depot.galaxyproject.org/singularity/khmer:3.0.0a3--py37haa7609a_2' : | ||
| 'biocontainers/khmer:3.0.0a3--py37haa7609a_2' }" | ||
|
|
||
| input: | ||
| tuple val(meta), path(fasta) | ||
|
|
||
| output: | ||
| tuple val(meta), path("*.abundtrim"), emit: sequence | ||
| path "versions.yml" , emit: versions | ||
|
|
||
| when: | ||
| task.ext.when == null || task.ext.when | ||
|
|
||
| script: | ||
| def args = task.ext.args ?: '' | ||
| if (!task.memory) { | ||
| log.info '[KHMER_TRIMLOWABUND] Available memory not known - defaulting to 16GB. Specify process memory requirements to change this.' | ||
| avail_mem = 16 | ||
| } else { | ||
| avail_mem = task.memory.toGiga() | ||
| } | ||
| """ | ||
| trim-low-abund.py \\ | ||
| -M ${avail_mem}e9 \\ | ||
| $args \\ | ||
| $fasta | ||
|
|
||
| cat <<-END_VERSIONS > versions.yml | ||
| "${task.process}": | ||
| khmer: \$( trim-low-abund.py --version 2>&1 | grep ^khmer | sed 's/^khmer //' ) | ||
| END_VERSIONS | ||
| """ | ||
|
|
||
| stub: | ||
| """ | ||
| touch ${fasta}.abundtrim | ||
|
|
||
| cat <<-END_VERSIONS > versions.yml | ||
| "${task.process}": | ||
| khmer: \$( trim-low-abund.py --version 2>&1 | grep ^khmer | sed 's/^khmer //' ) | ||
| END_VERSIONS | ||
| """ | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json | ||
| name: "khmer_trimlowabund" | ||
| description: Removes low abundance k-mers from reads | ||
| keywords: | ||
| - quality control | ||
| - genomics | ||
| - filtering | ||
| - reads | ||
| - khmer | ||
| - k-mer | ||
| tools: | ||
| - "khmer": | ||
| description: khmer k-mer counting library | ||
| homepage: https://github.com/dib-lab/khmer | ||
| documentation: https://khmer.readthedocs.io/en/latest/ | ||
| tool_dev_url: https://github.com/dib-lab/khmer | ||
| doi: "10.12688/f1000research.6924.1" | ||
| licence: ["BSD License"] | ||
| identifier: biotools:khmer | ||
| input: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. `[ id:'sample1', single_end:false ]` | ||
zachary-foster marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - fasta: | ||
| type: file | ||
| description: fasta file | ||
| pattern: "*.{fa,fasta,fas}" | ||
|
|
||
| output: | ||
| - sequence: | ||
| - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. `[ id:'sample1', single_end:false ]` | ||
zachary-foster marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - '*.abundtrim': | ||
| type: file | ||
| description: fasta file with low abundance k-mers removed. | ||
| pattern: "*.{fa,fasta,fas}" | ||
| - versions: | ||
| - "versions.yml": | ||
| type: file | ||
| description: File containing software versions | ||
| pattern: "versions.yml" | ||
|
|
||
| authors: | ||
| - "@zachary-foster" | ||
| maintainers: | ||
| - "@zachary-foster" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| nextflow_process { | ||
|
|
||
| name "Test Process KHMER_TRIMLOWABUND" | ||
| script "../main.nf" | ||
| process "KHMER_TRIMLOWABUND" | ||
|
|
||
| tag "modules" | ||
| tag "modules_nfcore" | ||
| tag "khmer" | ||
| tag "khmer/trimlowabund" | ||
|
|
||
| test("sarscov2 - fastq.gz") { | ||
|
|
||
| when { | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [ id:'test', single_end:false ], // meta map | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true), | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
|
|
||
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| { assert snapshot(process.out).match() } | ||
| ) | ||
| } | ||
|
|
||
| } | ||
|
|
||
| test("sarscov2 - fastq.gz - stub") { | ||
|
|
||
| options "-stub" | ||
|
|
||
| when { | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [ id:'test', single_end:false ], // meta map | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true), | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
|
|
||
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| { assert snapshot(process.out).match() } | ||
| ) | ||
| } | ||
|
|
||
| } | ||
|
|
||
| } |
72 changes: 72 additions & 0 deletions
72
modules/nf-core/khmer/trimlowabund/tests/main.nf.test.snap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| { | ||
| "sarscov2 - fastq.gz": { | ||
| "content": [ | ||
| { | ||
| "0": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test_2.fastq.gz.abundtrim:md5,36716902820bac37e2a10e99e2c94c88" | ||
| ] | ||
| ], | ||
| "1": [ | ||
| "versions.yml:md5,867953e387d894675fbac67fbb05cb2a" | ||
| ], | ||
| "sequence": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test_2.fastq.gz.abundtrim:md5,36716902820bac37e2a10e99e2c94c88" | ||
| ] | ||
| ], | ||
| "versions": [ | ||
| "versions.yml:md5,867953e387d894675fbac67fbb05cb2a" | ||
| ] | ||
| } | ||
| ], | ||
| "meta": { | ||
| "nf-test": "0.9.2", | ||
| "nextflow": "24.10.5" | ||
| }, | ||
| "timestamp": "2025-03-14T15:23:28.692050011" | ||
| }, | ||
| "sarscov2 - fastq.gz - stub": { | ||
| "content": [ | ||
| { | ||
| "0": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test_2.fastq.gz.abundtrim:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "1": [ | ||
| "versions.yml:md5,867953e387d894675fbac67fbb05cb2a" | ||
| ], | ||
| "sequence": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test_2.fastq.gz.abundtrim:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "versions": [ | ||
| "versions.yml:md5,867953e387d894675fbac67fbb05cb2a" | ||
| ] | ||
| } | ||
| ], | ||
| "meta": { | ||
| "nf-test": "0.9.2", | ||
| "nextflow": "24.10.5" | ||
| }, | ||
| "timestamp": "2025-03-14T15:23:34.05055035" | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.