-
Notifications
You must be signed in to change notification settings - Fork 972
adding kmergenie module #10281
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
Merged
adding kmergenie module #10281
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5d614ab
adding kmergenie module
LiaOb21 5019f0d
trying fix to avoid md5 checksum conflict between docker and conda
LiaOb21 16f29e4
Merge branch 'master' into kmergenie
chriswyatt1 37bb5d6
Update modules/nf-core/kmergenie/main.nf
LiaOb21 8573e26
Update main.nf
LiaOb21 83ccf0a
Update main.nf
LiaOb21 e86f521
Merge branch 'master' into kmergenie
LiaOb21 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
Some comments aren't visible on the classic Files Changed page.
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::kmergenie=1.7051" |
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 @@ | ||
| process KMERGENIE { | ||
| tag "$meta.id" | ||
| label 'process_medium' | ||
|
|
||
| conda "${moduleDir}/environment.yml" | ||
| container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
| 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/5f/5f4197eec51307131e6cb0170a7969eda60995b23942d050f7495dc4a530b118/data': | ||
| 'community.wave.seqera.io/library/kmergenie:1.7051--675dfe5a4c7ea92b' }" | ||
|
|
||
| input: | ||
| tuple val(meta), path(reads) | ||
|
|
||
| output: | ||
| tuple val(meta), path("*_report.html"), emit: html | ||
| tuple val(meta), path("*.histo") , emit: histo | ||
| tuple val(meta), path("*.dat") ,emit: dat | ||
| tuple val(meta), path("*.pdf") ,emit: pdf | ||
| tuple val("${task.process}"), val('kmergenie'), eval('kmergenie --version |& sed "1!d ; s/KmerGenie //"'), emit: versions_kmergenie, topic: versions | ||
|
|
||
|
|
||
| when: | ||
| task.ext.when == null || task.ext.when | ||
|
|
||
| script: | ||
| def args = task.ext.args ?: '' | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| def read_list = reads.join("\n") | ||
|
|
||
| """ | ||
| echo "$read_list" > ${prefix}_reads.txt | ||
|
|
||
| kmergenie \\ | ||
| $args \\ | ||
| -o ${prefix} \\ | ||
| -t $task.cpus \\ | ||
| ${prefix}_reads.txt | ||
| """ | ||
|
|
||
| stub: | ||
| def args = task.ext.args ?: '' | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
|
|
||
| """ | ||
| echo $args | ||
|
|
||
| touch ${prefix}_report.html | ||
| touch ${prefix}*.histo | ||
| touch ${prefix}.dat | ||
| touch ${prefix}*.pdf | ||
| """ | ||
| } |
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,104 @@ | ||
| name: "kmergenie" | ||
| description: KmerGenie estimates the best k-mer length for genome de novo | ||
| assembly | ||
| keywords: | ||
| - k-mer | ||
| - count | ||
| - genome assembly | ||
| tools: | ||
| - "kmergenie": | ||
| description: "KmerGenie estimates the best k-mer length for genome de novo assembly. | ||
| Given a set of reads, KmerGenie first computes the k-mer abundance histogram | ||
| for many values of k. Then, for each value of k, it predicts the number of distinct | ||
| genomic k-mers in the dataset, and returns the k-mer length which maximizes | ||
| this number." | ||
| homepage: "http://kmergenie.bx.psu.edu/" | ||
| documentation: "http://kmergenie.bx.psu.edu/" | ||
| tool_dev_url: "https://github.com/movingpictures83/KMerGenie" | ||
| doi: "10.1093/bioinformatics/btt310" | ||
| licence: | ||
| - "MIT License" | ||
| identifier: biotools:kmergenie | ||
| input: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. [ id:'test', single_end:false ] | ||
| - reads: | ||
| type: file | ||
| description: Input reads in FastQ format | ||
| pattern: "*.{fastq.gz, fastq, fq.gz, fq}" | ||
| ontologies: [] | ||
| output: | ||
| html: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. [ id:'test', single_end:false ] | ||
| - "*_report.html": | ||
| type: file | ||
| description: html file containing all the plotted histograms obtained | ||
| from different kmer size | ||
| pattern: "*_report.html" | ||
| ontologies: [] | ||
| histo: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. [ id:'test', single_end:false ] | ||
| - "*.histo": | ||
| type: file | ||
| description: histogram files (text) obtained from individual kmer sizes | ||
| pattern: "*.histo" | ||
| ontologies: [] | ||
| dat: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. [ id:'test', single_end:false ] | ||
| - "*.dat": | ||
| type: file | ||
| description: text file containing number of kmer for kmer sizes and | ||
| recommended coverage cut-off | ||
| pattern: "*.dat" | ||
| ontologies: [] | ||
| pdf: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. [ id:'test', single_end:false ] | ||
| - "*.pdf": | ||
| type: file | ||
| description: histogram plots obtained from individual kmer sizes | ||
| pattern: "*.pdf" | ||
| ontologies: [] | ||
| versions_kmergenie: | ||
| - - ${task.process}: | ||
| type: string | ||
| description: The name of the process | ||
| - kmergenie: | ||
| type: string | ||
| description: The name of the tool | ||
| - kmergenie --version |& sed "1!d ; s/KmerGenie //": | ||
| type: eval | ||
| description: The expression to obtain the version of the tool | ||
| topics: | ||
| versions: | ||
| - - ${task.process}: | ||
| type: string | ||
| description: The name of the process | ||
| - kmergenie: | ||
| type: string | ||
| description: The name of the tool | ||
| - kmergenie --version |& sed "1!d ; s/KmerGenie //": | ||
| type: eval | ||
| description: The expression to obtain the version of the tool | ||
| authors: | ||
| - "@LiaOb21" | ||
| maintainers: | ||
| - "@LiaOb21" |
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,74 @@ | ||
| nextflow_process { | ||
|
|
||
| name "Test Process KMERGENIE" | ||
| script "../main.nf" | ||
| process "KMERGENIE" | ||
|
|
||
| tag "modules" | ||
| tag "modules_nfcore" | ||
| tag "kmergenie" | ||
|
|
||
| test("test-kmergenie-sarscov2-illumina") { | ||
|
|
||
| when { | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [ id:'test' ], // meta map | ||
| [ | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) | ||
| ] | ||
| ] | ||
|
|
||
| """ | ||
| } | ||
| } | ||
|
|
||
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| { assert process.out.html }, | ||
| { assert process.out.html[0][1] ==~ /.*test_report\.html$/ }, | ||
| { assert snapshot( | ||
| process.out.histo, | ||
| process.out.dat, | ||
| process.out.findAll { key, val -> key.startsWith("versions")}, | ||
| ).match() } | ||
| ) | ||
| } | ||
|
|
||
| } | ||
|
|
||
| test("test-kmergenie-sarscov2-illumina-stub") { | ||
|
|
||
| options "-stub" | ||
|
|
||
| when { | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [ id:'test' ], // meta map | ||
| [ | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) | ||
| ] | ||
| ] | ||
|
|
||
| """ | ||
| } | ||
| } | ||
|
|
||
| then { | ||
| assert process.success | ||
| assertAll( | ||
| { assert snapshot( | ||
| process.out, | ||
| process.out.findAll { key, val -> key.startsWith("versions")}, | ||
| ).match() } | ||
| ) | ||
| } | ||
|
|
||
| } | ||
|
|
||
| } | ||
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,151 @@ | ||
| { | ||
| "test-kmergenie-sarscov2-illumina": { | ||
| "content": [ | ||
| [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| [ | ||
| "test-k101.histo:md5,8b704b25eef6846204cf01c41597392d", | ||
| "test-k111.histo:md5,33d471426d7b78a157891202a9b1a3ef", | ||
| "test-k121.histo:md5,ea46186dd4511a99dafc6797cb4a644a", | ||
| "test-k21.histo:md5,29d2bc08cff5a55714897f43c556ceb6", | ||
| "test-k27.histo:md5,ae7e8f8b20e2f260522c14472a936287", | ||
| "test-k29.histo:md5,ccf4348628725928d400cdb114d12be9", | ||
| "test-k31.histo:md5,cd4a6a09b60c2ccab8b47894b8fa2622", | ||
| "test-k33.histo:md5,94f30ce1bbe0430da655b67d8d2ba225", | ||
| "test-k35.histo:md5,49f518a006d1a3f8ef98a387c431c78e", | ||
| "test-k37.histo:md5,cb73e93156aae71b2b0b03de39570056", | ||
| "test-k41.histo:md5,fc366d36b0b44b9d8fac35dd9b3caa61", | ||
| "test-k51.histo:md5,74803bf3f6268112f3a370481f08e13a", | ||
| "test-k61.histo:md5,a932b513b9a273c2967d2fd0791b71df", | ||
| "test-k71.histo:md5,1ae35ad55212926c4d4aa7921bd3d878", | ||
| "test-k81.histo:md5,389826e458cde3bd85c4b8ec30b44cca", | ||
| "test-k91.histo:md5,d802c6b371d57ebdd605791b450cebf3" | ||
| ] | ||
| ] | ||
| ], | ||
| [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "test.dat:md5,040c8a22cb240ad160a851a29b04f9e4" | ||
| ] | ||
| ], | ||
| { | ||
| "versions_kmergenie": [ | ||
| [ | ||
| "KMERGENIE", | ||
| "kmergenie", | ||
| "1.7051" | ||
| ] | ||
| ] | ||
| } | ||
| ], | ||
| "timestamp": "2026-02-27T11:48:37.501863493", | ||
| "meta": { | ||
| "nf-test": "0.9.4", | ||
| "nextflow": "25.10.4" | ||
| } | ||
| }, | ||
| "test-kmergenie-sarscov2-illumina-stub": { | ||
| "content": [ | ||
| { | ||
| "0": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "test_report.html:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "1": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "test*.histo:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "2": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "test.dat:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "3": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "test*.pdf:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "4": [ | ||
| [ | ||
| "KMERGENIE", | ||
| "kmergenie", | ||
| "1.7051" | ||
| ] | ||
| ], | ||
| "dat": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "test.dat:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "histo": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "test*.histo:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "html": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "test_report.html:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "pdf": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "test*.pdf:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "versions_kmergenie": [ | ||
| [ | ||
| "KMERGENIE", | ||
| "kmergenie", | ||
| "1.7051" | ||
| ] | ||
| ] | ||
| }, | ||
| { | ||
| "versions_kmergenie": [ | ||
| [ | ||
| "KMERGENIE", | ||
| "kmergenie", | ||
| "1.7051" | ||
| ] | ||
| ] | ||
| } | ||
| ], | ||
| "timestamp": "2026-02-27T11:05:23.598995518", | ||
| "meta": { | ||
| "nf-test": "0.9.4", | ||
| "nextflow": "25.10.4" | ||
| } | ||
| } | ||
| } |
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.