-
Notifications
You must be signed in to change notification settings - Fork 1k
added pcne module #11307
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
Draft
riccabolla
wants to merge
24
commits into
nf-core:master
Choose a base branch
from
riccabolla:new-module-pcne
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
added pcne module #11307
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
0dc7641
added pcne module
73ca136
Merge branch 'master' into new-module-pcne
famosab 47ae1dc
[automated] Fix code linting
nf-core-bot ba6285f
Update modules/nf-core/pcne/main.nf
riccabolla 749835e
Refactor test assertions to use sanitized output
riccabolla 6efac0c
Merge branch 'nf-core:master' into new-module-pcne
riccabolla b7bbd1d
added test snap
riccabolla 8db1f55
Update pcne version from 3.3.0 to 3.3.1
riccabolla c1825c1
Update PCNE container version to 3.3.1
riccabolla c86f5e7
fixed meta.yml
riccabolla 1ec3b0e
Refactor input structure in meta.yml for clarity
riccabolla 30452f8
Refactor PCNE process for improved readability
riccabolla 4c8aaa7
Update PCNE version from 3.3.0 to 3.3.1
riccabolla e59abf0
Merge branch 'nf-core:master' into new-module-pcne
riccabolla f505ea0
Update test inputs to use module test data paths
riccabolla cd1f842
whitespace fixing
riccabolla 9728f9a
Fix input array formatting in main.nf.test
riccabolla 1c699eb
Merge branch 'master' into new-module-pcne
riccabolla 73d9715
fixed to pass pre-commit
riccabolla 4a998d7
Update meta.yaml to match new version check in main.nf
riccabolla 6a46974
Update version extraction command for pcne
riccabolla f7e0062
Fix indentation and update ontology references in meta.yml
riccabolla 7094018
fixed snap version output
riccabolla decbceb
test snap
riccabolla 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,6 @@ | ||
| # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json | ||
| channels: | ||
| - conda-forge | ||
| - bioconda | ||
| dependencies: | ||
| - "bioconda::pcne=3.3.1" |
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 PCNE { | ||
| tag "${meta.id}" | ||
| label 'process_medium' | ||
|
|
||
| conda "${moduleDir}/environment.yml" | ||
| container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container | ||
| ? 'https://depot.galaxyproject.org/singularity/pcne%3A3.3.1--hdfd78af_0' | ||
| : 'quay.io/biocontainers/pcne:3.3.1--hdfd78af_0' }" | ||
|
|
||
| input: | ||
| tuple val(meta), path(reads) | ||
| tuple val(meta2), path(chromosome) | ||
| tuple val(meta3), path(plasmids) | ||
|
|
||
| output: | ||
| tuple val(meta), path("*_results.tsv"), emit: results | ||
| tuple val(meta), path("*.log"), emit: log | ||
| tuple val(meta), path("*.png"), emit: plots, optional: true | ||
| tuple val("${task.process}"), val('pcne'), eval("pcne -v | grep 'version' | tail -n 1 | sed 's/.*version //'"), topic: versions, emit: versions_pcne | ||
|
|
||
| when: | ||
| task.ext.when == null || task.ext.when | ||
|
|
||
| script: | ||
| def args = task.ext.args ?: '' | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
|
|
||
| def is_bam = reads.toString().endsWith('.bam') | ||
| def input_cmd = is_bam ? "-b ${reads}" : "-r ${reads[0]} -R ${reads[1]}" | ||
|
|
||
| def plasmid_cmd = plasmids instanceof List ? plasmids.join(' ') : plasmids | ||
|
|
||
| """ | ||
| pcne \\ | ||
| -c ${chromosome} \\ | ||
| -p ${plasmid_cmd} \\ | ||
| ${input_cmd} \\ | ||
| -o ${prefix} \\ | ||
| -t ${task.cpus} \\ | ||
| ${args} | ||
| """ | ||
|
|
||
| stub: | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| """ | ||
| touch ${prefix}_results.tsv | ||
|
riccabolla marked this conversation as resolved.
|
||
| touch ${prefix}.log | ||
| """ | ||
| } | ||
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,110 @@ | ||
| name: "pcne" | ||
| description: "Estimates plasmid copy number from assembled genome" | ||
| keywords: | ||
| - plasmid | ||
| - copy number | ||
| - genomics | ||
| - alignment | ||
| - coverage | ||
| tools: | ||
| - "pcne": | ||
| description: "Estimates plasmid copy number from assembled genome." | ||
| homepage: "https://github.com/riccabolla/PCNE" | ||
| documentation: "https://github.com/riccabolla/PCNE" | ||
| tool_dev_url: "https://github.com/riccabolla/PCNE" | ||
| doi: "10.1177/11779322251410037" | ||
| licence: | ||
| - "MIT" | ||
| identifier: "" | ||
| input: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. `[ id:'sample1', single_end:false ]` | ||
| - reads: | ||
| type: file | ||
| description: FASTQ reads (paired or single) or a pre-aligned BAM file | ||
| pattern: "*.{fastq.gz,fq.gz,fastq,fq,bam}" | ||
| ontologies: | ||
| - edam: "http://edamontology.org/format_1930" | ||
| - edam: "http://edamontology.org/format_2572" | ||
| - - meta2: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing reference chromosome information | ||
| e.g. `[ id:'genome' ]` | ||
| - chromosome: | ||
| type: file | ||
| description: Chromosome contigs FASTA file | ||
| pattern: "*.{fasta,fa,fasta.gz,fa.gz}" | ||
| ontologies: | ||
| - edam: "http://edamontology.org/format_1929" | ||
| - - meta3: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing reference plasmid information | ||
| e.g. `[ id:'plasmids' ]` | ||
| - plasmids: | ||
| type: file | ||
| description: One or more plasmid FASTA files | ||
| pattern: "*.{fasta,fa,fasta.gz,fa.gz}" | ||
| ontologies: | ||
| - edam: "http://edamontology.org/format_1929" | ||
| output: | ||
| results: | ||
| - - meta: | ||
| type: map | ||
| description: Groovy Map containing sample information | ||
| - "*_results.tsv": | ||
| type: file | ||
| description: TSV file containing the estimated plasmid copy numbers | ||
| pattern: "*_results.tsv" | ||
| ontologies: | ||
| - edam: "http://edamontology.org/format_3475" | ||
| log: | ||
| - - meta: | ||
| type: map | ||
| description: Groovy Map containing sample information | ||
| - "*.log": | ||
| type: file | ||
| description: PCNE run log file | ||
| pattern: "*.log" | ||
| ontologies: | ||
| - edam: "http://edamontology.org/format_2330" | ||
| plots: | ||
| - - meta: | ||
| type: map | ||
| description: Groovy Map containing sample information | ||
| - "*.png": | ||
| type: file | ||
| description: Bar plot of plasmid copy numbers or GC vs Depth diagnostic | ||
| plots | ||
| pattern: "*.png" | ||
| ontologies: | ||
| - edam: "http://edamontology.org/format_3603" | ||
| versions_pcne: | ||
| - - "${task.process}": | ||
| type: string | ||
| description: The name of the process | ||
| - "pcne": | ||
| type: string | ||
| description: The name of the tool | ||
| - "pcne -v | grep 'version' | tail -n 1 | sed 's/.*version //'": | ||
| type: eval | ||
| description: The expression to obtain the version of the tool | ||
| topics: | ||
| versions: | ||
| - - "${task.process}": | ||
| type: string | ||
| description: The name of the process | ||
| - "pcne": | ||
| type: string | ||
| description: The name of the tool | ||
| - "pcne -v | grep 'version' | tail -n 1 | sed 's/.*version //'": | ||
| type: eval | ||
| description: The expression to obtain the version of the tool | ||
| authors: | ||
| - "@riccabolla" | ||
| maintainers: | ||
| - "@riccabolla" |
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,69 @@ | ||
| nextflow_process { | ||
|
|
||
| name "Test Process PCNE" | ||
| script "../main.nf" | ||
| process "PCNE" | ||
|
|
||
| tag "modules" | ||
| tag "modules_nfcore" | ||
| tag "pcne" | ||
|
|
||
| test("sarscov2 - bam") { | ||
|
|
||
| when { | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [ id:'test', single_end:false ], // meta map | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) | ||
| ] | ||
| input[1] = [ | ||
| [ id: 'genome' ], | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) | ||
| ] | ||
| input[2] = [ | ||
| [ id: 'transcriptome' ], | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/transcriptome.fasta', checkIfExists: true) | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
|
|
||
| then { | ||
| assert process.success | ||
| assert snapshot(sanitizeOutput(process.out)).match() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it makes sense to only assert the name of the log file? The log file probably has some timestamp that then changes the md5sum :) |
||
| } | ||
|
|
||
| } | ||
|
|
||
| test("sarscov2 - bam - stub") { | ||
|
|
||
| options "-stub" | ||
|
|
||
| when { | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [ id:'test', single_end:false ], // meta map | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) | ||
| ] | ||
| input[1] = [ | ||
| [ id: 'genome' ], | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) | ||
| ] | ||
| input[2] = [ | ||
| [ id: 'transcriptome' ], | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/transcriptome.fasta', checkIfExists: true) | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
|
|
||
| then { | ||
| assert process.success | ||
| assert snapshot(sanitizeOutput(process.out)).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,80 @@ | ||
| { | ||
| "sarscov2 - bam - stub": { | ||
| "content": [ | ||
| { | ||
| "log": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test.log:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "plots": [ | ||
|
|
||
| ], | ||
| "results": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test_results.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "versions_pcne": [ | ||
| [ | ||
| "PCNE", | ||
| "pcne", | ||
| "3.3.1" | ||
| ] | ||
| ] | ||
| } | ||
| ], | ||
| "timestamp": "2026-04-29T17:10:13.997705663", | ||
| "meta": { | ||
| "nf-test": "0.9.5", | ||
| "nextflow": "25.10.4" | ||
| } | ||
| }, | ||
| "sarscov2 - bam": { | ||
| "content": [ | ||
| { | ||
| "log": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test.log:md5,9b282212a32df78088bdcb7a173df4ce" | ||
| ] | ||
| ], | ||
| "plots": [ | ||
|
|
||
| ], | ||
| "results": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test_results.tsv:md5,2efc4a2d2c671eeda63ce2a4aeb81fc6" | ||
| ] | ||
| ], | ||
| "versions_pcne": [ | ||
| [ | ||
| "PCNE", | ||
| "pcne", | ||
| "3.3.1" | ||
| ] | ||
| ] | ||
| } | ||
| ], | ||
| "timestamp": "2026-04-29T17:09:56.768899583", | ||
| "meta": { | ||
| "nf-test": "0.9.5", | ||
| "nextflow": "25.10.4" | ||
| } | ||
| } | ||
| } |
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.