Skip to content
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

fix: Avoid file location issue with ppanggolin/poppunk #193

Merged
merged 4 commits into from
May 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/local/poppunk/createdb/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ process POPPUNK_CREATEDB {
input:

path filesheet
path assemblies

output:

Expand Down
1 change: 1 addition & 0 deletions modules/local/ppanggolin/workflow/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ process PPANGGOLIN_WORKFLOW {

input:
tuple val(meta), path(samplesheet)
path gffs

output:
tuple val(meta), path("$prefix") , emit: results
Expand Down
1 change: 1 addition & 0 deletions modules/nf-core/panaroo/run/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ process PANAROO_RUN {

input:
tuple val(meta), path(gff)
path gffs

output:
tuple val(meta), path("results/*") , emit: results
Expand Down
6 changes: 3 additions & 3 deletions subworkflows/local/phylo.nf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ workflow PHYLOGENOMICS{
ch_software_versions = Channel.empty()

gffs
.map { meta, path -> [meta.id, path.toString()] }
.map { meta, path -> [meta.id, path.getName()] }
.set { gff_paths }

// Create samplesheet
Expand All @@ -39,7 +39,7 @@ workflow PHYLOGENOMICS{
.map{ path -> [[id: 'ppanggolin'], path] }
.set { gff_samplesheet }

PPANGGOLIN_WORKFLOW(gff_samplesheet)
PPANGGOLIN_WORKFLOW(gff_samplesheet, gffs.collect{ it[1] })

PPANGGOLIN_WORKFLOW.out.pangenome.set { pangenome }

Expand Down Expand Up @@ -76,7 +76,7 @@ workflow PHYLOGENOMICS{
* Core gene identification and alignment
*/
// By default, run panaroo
PANAROO_RUN(gff_samplesheet)
PANAROO_RUN(gff_samplesheet, gffs.collect{ it[1] })
PANAROO_RUN.out.aln.collect{ meta, aln -> aln }.set{ ch_core_alignment }
PANAROO_RUN.out.accessory_aln.set{ ch_all_alignments }

Expand Down
4 changes: 2 additions & 2 deletions subworkflows/local/poppunk.nf
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ workflow RUN_POPPUNK {
}

genome_assemblies
.map { meta, path -> [meta.id, path.toString()] }
.map { meta, path -> [meta.id, path.getName()] }
.collectFile(newLine: true) { item ->
[ "${item[0]}.txt", item[0] + '\t' + item[1] ]
}
.collectFile(name: 'poppunk_samplesheet.tsv')
.set { poppunk_samplesheet }

POPPUNK_CREATEDB(poppunk_samplesheet)
POPPUNK_CREATEDB(poppunk_samplesheet, genome_assemblies.collect { it[1] } )

POPPUNK_CREATEDB.out.poppunk_db.set { poppunk_db }

Expand Down
6 changes: 3 additions & 3 deletions tests/subworkflows/local/phylo.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ nextflow_workflow {
"""
// define inputs of the workflow here. Example:
input[0] = Channel.of(
[[id:'SRR14022735'], '$baseDir/test/SRR14022735_T1.gff'],
[[id:'SRR14022764'], '$baseDir/test/SRR14022764_T1.gff'],
[[id:'SRR14022754'], '$baseDir/test/SRR14022754_T1.gff']
[[id:'SRR14022735'], file('$baseDir/test/SRR14022735_T1.gff')],
[[id:'SRR14022764'], file('$baseDir/test/SRR14022764_T1.gff')],
[[id:'SRR14022754'], file('$baseDir/test/SRR14022754_T1.gff')]
)
// Don't use full alignment
input[1] = false
Expand Down
8 changes: 4 additions & 4 deletions tests/subworkflows/local/poppunk.nf.test.skip
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ nextflow_workflow {
"""
// define inputs of the workflow here. Example:
input[0] = Channel.of(
[[id:'SRR14022735'], "$baseDir/test/SRR14022735_T1.scaffolds.fa"],
[[id:'SRR14022737'], "$baseDir/test/SRR14022737_T1.scaffolds.fa"],
[[id:'SRR14022754'], "$baseDir/test/SRR14022754_T1.scaffolds.fa"],
[[id:'SRR14022764'], "$baseDir/test/SRR14022764_T1.scaffolds.fa"],
[[id:'SRR14022735'], file("$baseDir/test/SRR14022735_T1.scaffolds.fa")],
[[id:'SRR14022737'], file("$baseDir/test/SRR14022737_T1.scaffolds.fa")],
[[id:'SRR14022754'], file("$baseDir/test/SRR14022754_T1.scaffolds.fa")],
[[id:'SRR14022764'], file("$baseDir/test/SRR14022764_T1.scaffolds.fa")],
)
"""
}
Expand Down
Loading