-
Notifications
You must be signed in to change notification settings - Fork 692
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into star-update-module
- Loading branch information
Showing
21 changed files
with
304 additions
and
1,136 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ channels: | |
- conda-forge | ||
- bioconda | ||
dependencies: | ||
- bioconda::genmod=3.8.2 | ||
- bioconda::genmod=3.8.3 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ channels: | |
- conda-forge | ||
- bioconda | ||
dependencies: | ||
- bioconda::genmod=3.8.2 | ||
- bioconda::genmod=3.8.3 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ channels: | |
- conda-forge | ||
- bioconda | ||
dependencies: | ||
- bioconda::genmod=3.8.2 | ||
- bioconda::genmod=3.8.3 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ channels: | |
- conda-forge | ||
- bioconda | ||
dependencies: | ||
- bioconda::genmod=3.8.2 | ||
- bioconda::genmod=3.8.3 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
dependencies: | ||
- bioconda::motus=3.1.0 |
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,53 @@ | ||
process MOTUS_PREPLONG { | ||
tag "$meta.id" | ||
label 'process_single' | ||
|
||
conda "${moduleDir}/environment.yml" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/motus:3.1.0--pyhdfd78af_0': | ||
'biocontainers/motus:3.1.0--pyhdfd78af_0' }" | ||
|
||
input: | ||
tuple val(meta), path(reads) | ||
path db | ||
|
||
output: | ||
tuple val(meta), path("*.gz"), emit: out | ||
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}" | ||
def refdb = db ? "-db ${db}" : "" | ||
|
||
""" | ||
motus \\ | ||
prep_long \\ | ||
$args \\ | ||
-i $reads \\ | ||
$refdb \\ | ||
-t $task.cpus \\ | ||
-o ${prefix}.gz \\ | ||
2> >(tee ${prefix}.log >&2) | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
motus: \$(motus --version 2>&1 | sed 's/.* \\([0-9]*\\.[0-9]*\\.[0-9]*\\) .*/\\1/') | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
""" | ||
echo '' | gzip > ${prefix}.gz | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
motus: \$(motus --version 2>&1 | sed 's/.* \\([0-9]*\\.[0-9]*\\.[0-9]*\\) .*/\\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,52 @@ | ||
name: "motus_preplong" | ||
description: Taxonomic meta-omics profiling using universal marker genes | ||
keywords: | ||
- classify | ||
- metagenomics | ||
- fastq | ||
- taxonomic profiling | ||
tools: | ||
- "motus": | ||
description: "Marker gene-based operational taxonomic unit (mOTU) profiling" | ||
homepage: "https://motu-tool.org/" | ||
documentation: "https://github.com/motu-tool/mOTUs/wiki" | ||
tool_dev_url: "https://github.com/motu-tool/mOTUs" | ||
doi: "10.1186/s40168-022-01410-z" | ||
licence: ["GPL v3"] | ||
|
||
input: | ||
- - meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1', single_end:false ]` | ||
- reads: | ||
type: file | ||
description: Long read file to convert, can be fasta(.gz) or fastq(.gz) | ||
pattern: "*.{gz}" | ||
- - db: | ||
type: directory | ||
description: | | ||
mOTUs database downloaded by `motus downloadDB` | ||
pattern: "db_mOTU/" | ||
output: | ||
- out: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1', single_end:false ]` | ||
- "*.gz": | ||
type: file | ||
description: converted file (gzipped), ready to be used by motus profile | ||
pattern: "*.gz" | ||
- versions: | ||
- versions.yml: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
|
||
authors: | ||
- "@sofstam" | ||
maintainers: | ||
- "@sofstam" |
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,75 @@ | ||
nextflow_process { | ||
|
||
name "Test Process MOTUS_PREPLONG" | ||
script "../main.nf" | ||
process "MOTUS_PREPLONG" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "motus" | ||
tag "motus/downloaddb" | ||
tag "motus/preplong" | ||
|
||
setup { | ||
run("MOTUS_DOWNLOADDB") { | ||
script "modules/nf-core/motus/downloaddb/main.nf" | ||
process { | ||
""" | ||
input[0] = Channel.of([ | ||
file('https://raw.githubusercontent.com/motu-tool/mOTUs/master/motus/downloadDB.py') | ||
]) | ||
""" | ||
} | ||
} | ||
} | ||
|
||
test("sarscov2 - fasta") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/nanopore/fastq/test_2.fastq.gz', checkIfExists: true) | ||
] | ||
input[1] = MOTUS_DOWNLOADDB.out.db | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("sarscov2 - fasta - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/nanopore/fastq/test_2.fastq.gz', checkIfExists: true) | ||
] | ||
input[1] = MOTUS_DOWNLOADDB.out.db | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
|
||
} | ||
|
||
} |
Oops, something went wrong.