Skip to content

Commit

Permalink
make changes based on code review
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisAta committed Apr 17, 2024
1 parent f9c6373 commit 10f526d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 144 deletions.
9 changes: 4 additions & 5 deletions modules/ebi-metagenomics/mapseq2biom/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ process MAPSEQ2BIOM {

input:
tuple val(meta), path(msq)
tuple path(db_fasta), path(db_tax), path(db_otu), path(db_mscluster), val(db_label)
tuple path(db_otu), val(db_label)

output:
tuple val(meta), path("${meta.id}.txt") , emit: krona_input
Expand All @@ -25,14 +25,13 @@ process MAPSEQ2BIOM {
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"


"""
mapseq2biom \
$args \
${args} \
--krona ${prefix}.txt \
--no-tax-id-file ${prefix}.notaxid.tsv \
--label $db_label \
--query $msq \
--label ${db_label} \
--query ${msq} \
--otu-table ${db_otu} \
--out-file ${prefix}.tsv
Expand Down
14 changes: 0 additions & 14 deletions modules/ebi-metagenomics/mapseq2biom/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ tools:
licence: ["Apache-2.0"]

input:
# Only when we have meta
- meta:
type: map
description: |
Expand All @@ -26,28 +25,15 @@ input:
type: file
description: MAPseq output file
pattern: "*.mseq"
- db_fasta:
type: file
description: Processed reference database fasta file
pattern: "*.{fasta, fasta.gz}"
- db_tax:
type: file
description: Processed reference database taxonomy file
pattern: "*.txt"
- db_otu:
type: file
description: Processed reference database otu file
pattern: "*.otu"
- db_mscluster:
type: file
description: Pre-computed MAPseq cluster file
pattern: "*.mscluster"
- db_label:
type: string
description: Reference database label

output:
#Only when we have meta
- meta:
type: map
description: |
Expand Down
16 changes: 2 additions & 14 deletions modules/ebi-metagenomics/mapseq2biom/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ nextflow_process {
file("${moduleDir}/tests/test.mseq", checkIfExists: true)
]
input[1] = [
file("${moduleDir}/tests/silva_ssu/test.fasta", checkIfExists: true),
file("${moduleDir}/tests/silva_ssu/test.txt", checkIfExists: true),
file("${moduleDir}/tests/silva_ssu/test.otu", checkIfExists: true),
file("${moduleDir}/tests/silva_ssu/test.mscluster", checkIfExists: true),
"SILVA-SSU"
]
"""
Expand All @@ -33,10 +30,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() },
{ assert snapshot(process.out.krona_input).match("krona_input") },
{ assert snapshot(process.out.biom_out).match("biom_out") },
{ assert snapshot(process.out.biom_out).match("biom_notaxid_out") }
{ assert snapshot(process.out).match() }
)
}

Expand All @@ -54,10 +48,7 @@ nextflow_process {
file("${moduleDir}/tests/test.mseq", checkIfExists: true)
]
input[1] = [
file("${moduleDir}/tests/silva_ssu/test.fasta", checkIfExists: true),
file("${moduleDir}/tests/silva_ssu/test.txt", checkIfExists: true),
file("${moduleDir}/tests/silva_ssu/test.otu", checkIfExists: true),
file("${moduleDir}/tests/silva_ssu/test.mscluster", checkIfExists: true),
"SILVA-SSU"
]
"""
Expand All @@ -67,10 +58,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() },
{ assert snapshot(process.out.krona_input).match("krona_input_stub") },
{ assert snapshot(process.out.biom_out).match("biom_out_stub") },
{ assert snapshot(process.out.biom_out).match("biom_notaxid_out_stub") }
{ assert snapshot(process.out).match() }
)
}

Expand Down
114 changes: 3 additions & 111 deletions modules/ebi-metagenomics/mapseq2biom/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"id": "test",
"single_end": false
},
"test.txt:md5,fa3ef8980608011a1ecdd15f93889c0a"
"test.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
Expand Down Expand Up @@ -56,7 +56,7 @@
"id": "test",
"single_end": false
},
"test.txt:md5,fa3ef8980608011a1ecdd15f93889c0a"
"test.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
Expand All @@ -68,79 +68,7 @@
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-04-11T09:35:26.295587"
},
"biom_notaxid_out_stub": {
"content": [
[
[
{
"id": "test",
"single_end": false
},
"test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-04-11T09:40:59.430421"
},
"biom_notaxid_out": {
"content": [
[
[
{
"id": "test",
"single_end": false
},
"test.tsv:md5,627ca596232e79fe2777f0e9352df993"
]
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-04-11T09:35:09.690135"
},
"krona_input": {
"content": [
[
[
{
"id": "test",
"single_end": false
},
"test.txt:md5,fa3ef8980608011a1ecdd15f93889c0a"
]
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-04-10T16:01:39.324767"
},
"biom_out": {
"content": [
[
[
{
"id": "test",
"single_end": false
},
"test.tsv:md5,627ca596232e79fe2777f0e9352df993"
]
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-04-11T09:35:09.683552"
"timestamp": "2024-04-11T15:15:47.935539"
},
"test_silva - mseq": {
"content": [
Expand Down Expand Up @@ -212,41 +140,5 @@
"nextflow": "23.10.1"
},
"timestamp": "2024-04-11T09:35:09.669445"
},
"biom_out_stub": {
"content": [
[
[
{
"id": "test",
"single_end": false
},
"test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-04-11T09:35:26.305058"
},
"krona_input_stub": {
"content": [
[
[
{
"id": "test",
"single_end": false
},
"test.txt:md5,fa3ef8980608011a1ecdd15f93889c0a"
]
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-04-10T16:09:22.893604"
}
}

0 comments on commit 10f526d

Please sign in to comment.