-
Notifications
You must be signed in to change notification settings - Fork 732
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
New module: COPTR/ESTIMATE #7149
Merged
+257
−10
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
557870d
Initial addition
ramirobarrantes 2b24d1e
Update modules/nf-core/coptr/estimate/main.nf
ramirobarrantes c81983a
Update modules/nf-core/coptr/estimate/meta.yml
ramirobarrantes f775f68
Update modules/nf-core/coptr/estimate/meta.yml
ramirobarrantes 1152cd2
Fixed levels
ramirobarrantes cd0a33c
Fixed levels issue, task.process was repeated twice
ramirobarrantes cb151ae
Fixed levels issue, task.process was repeated twice
ramirobarrantes 83012d6
Fixed levels issue, task.process was repeated twice
ramirobarrantes 708efa6
Fixed levels issue, task.process was repeated twice
ramirobarrantes 8ff06f7
Fixed levels issue, task.process was repeated twice
ramirobarrantes 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 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::coptr=1.1.4" |
This file contains 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,47 @@ | ||
process COPTR_ESTIMATE { | ||
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/coptr:1.1.4--pyhdfd78af_3': | ||
'biocontainers/coptr:1.1.4--pyhdfd78af_3' }" | ||
|
||
input: | ||
tuple val(meta), path(pkl, stageAs: "coverage_maps/*") | ||
|
||
output: | ||
tuple val(meta), path("*.csv"), emit: ptr | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
""" | ||
coptr \\ | ||
estimate \\ | ||
$args \\ | ||
coverage_maps/ \\ | ||
ptrs.csv | ||
|
||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
coptr: \$(coptr |& sed -E '11!d ; s/CoPTR.*?\\(v(.*?)\\).*/\\1/') | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
""" | ||
touch ${prefix}.csv | ||
|
||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
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. Too many levels here |
||
coptr: \$(coptr |& sed -E '11!d ; s/CoPTR.*?\\(v(.*?)\\).*/\\1/') | ||
END_VERSIONS | ||
""" | ||
} |
This file contains 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,56 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json | ||
name: "coptr_estimate" | ||
description: Calculates peak-to-through ratio (PTR) from metagenomic sequence data | ||
keywords: | ||
- coptr | ||
- mapping | ||
- ptr | ||
tools: | ||
- "coptr": | ||
description: "Accurate and robust inference of microbial growth dynamics from | ||
metagenomic sequencing reads." | ||
homepage: "https://github.com/tyjo/coptr" | ||
documentation: "https://coptr.readthedocs.io/" | ||
tool_dev_url: "https://github.com/tyjo/coptr" | ||
doi: "10.1101/gr.275533.121" | ||
licence: ["GPL v3"] | ||
identifier: biotools:coptr | ||
|
||
input: | ||
- - meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1', single_end:false ]` | ||
- pkl: | ||
type: file | ||
description: Python pickle file containing coverage maps | ||
pattern: "*.pkl" | ||
ontologies: | ||
- edam: "http://edamontology.org/format_4002" | ||
|
||
output: | ||
- ptr: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1', single_end:false ]` | ||
- "*.csv": | ||
type: file | ||
description: CSV table with rows as reference genomes, columns samples and entries as log2 PTR | ||
pattern: "*.csv" | ||
ontologies: | ||
- edam: "http://edamontology.org/format_3752" | ||
|
||
- versions: | ||
- "versions.yml": | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
|
||
authors: | ||
- "@ramirobarrantes" | ||
maintainers: | ||
- "@ramirobarrantes" |
This file contains 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,71 @@ | ||
nextflow_process { | ||
|
||
name "Test Process COPTR_ESTIMATE" | ||
script "../main.nf" | ||
process "COPTR_ESTIMATE" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "coptr" | ||
tag "coptr/extract" | ||
tag "coptr/estimate" | ||
|
||
setup { | ||
run("COPTR_EXTRACT") { | ||
script "../../extract/main.nf" | ||
process { | ||
""" | ||
input[0] = [ | ||
[id:'test_0'], | ||
[ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) | ||
] | ||
] | ||
""" | ||
} | ||
} | ||
} | ||
|
||
test("coptr estimate from coverage maps file") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = COPTR_EXTRACT.out.coverage | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() | ||
} | ||
) | ||
} | ||
|
||
} | ||
|
||
test("coptr estimate from coverage maps file - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = COPTR_EXTRACT.out.coverage | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() | ||
} | ||
) | ||
} | ||
|
||
} | ||
|
||
|
||
} |
This file contains 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,68 @@ | ||
{ | ||
"coptr estimate from coverage maps file - stub": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test_0" | ||
}, | ||
"test_0.csv:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,5400eb14b9d1287f174065acd6c0c6a4" | ||
], | ||
"ptr": [ | ||
[ | ||
{ | ||
"id": "test_0" | ||
}, | ||
"test_0.csv:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,5400eb14b9d1287f174065acd6c0c6a4" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.2" | ||
}, | ||
"timestamp": "2024-12-03T13:46:59.155895" | ||
}, | ||
"coptr estimate from coverage maps file": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test_0" | ||
}, | ||
"ptrs.csv:md5,e94546e830fd9fdcd50e0e6c459f78e5" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,5400eb14b9d1287f174065acd6c0c6a4" | ||
], | ||
"ptr": [ | ||
[ | ||
{ | ||
"id": "test_0" | ||
}, | ||
"ptrs.csv:md5,e94546e830fd9fdcd50e0e6c459f78e5" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,5400eb14b9d1287f174065acd6c0c6a4" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.2" | ||
}, | ||
"timestamp": "2024-11-29T18:28:40.680244" | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this have to be a directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does, this tool is a bit particular that way...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK