Skip to content

Commit

Permalink
enabled busco subworkflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zachary-foster committed Jan 11, 2024
1 parent 1108d38 commit d8aad7d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
4 changes: 2 additions & 2 deletions modules/local/busco_download.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ process BUSCO_DOWNLOAD {
val lineage

output:
tuple val(meta), path("busco_downloads"), emit: download_dir
path "versions.yml" , emit: versions
path "busco_downloads", emit: download_dir
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when
Expand Down
4 changes: 2 additions & 2 deletions modules/local/read2tree/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ process READ2TREE {
script:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
# If the process detects only 1 species
// If the process detects only 1 species
if (fastq1.size() == 1) {
"""
read2tree \\
Expand All @@ -37,7 +37,7 @@ process READ2TREE {
read2tree: \$(echo \$(read2tree --version))
END_VERSIONS
"""
# Otherwise, use multiple species mode
// Otherwise, use multiple species mode
} else {
"""
# This creates the reference folder
Expand Down
10 changes: 8 additions & 2 deletions subworkflows/local/busco_phylogeny.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include { BUSCO } from '../../modules/nf-core/busco'
include { BUSCO_DOWNLOAD } from '../../modules/local/busco_download'
include { READ2TREE } from '../../modules/local/read2tree'

workflow BUSCO_PHYLOGENY {

Expand All @@ -15,7 +16,6 @@ workflow BUSCO_PHYLOGENY {
// Only process Eukaryotic samples
input_filtered = input
.filter { it[4] == "Eukaryota" }
input_filtered

// Get all reference genomes in any group/sample
unique_ref_fnas = input_filtered
Expand All @@ -28,11 +28,17 @@ workflow BUSCO_PHYLOGENY {
BUSCO_DOWNLOAD ( Channel.from( "eukaryota_odb10" ) )

// Extract BUSCO genes for all unique reference genomes used in any sample/group
BUSCO ( unique_ref_fnas, "genome", "eukaryota_odb", BUSCO_DOWNLOAD.out.download_dir, [] )
BUSCO (
unique_ref_fnas,
"genome",
"eukaryota_odb10",
BUSCO_DOWNLOAD.out.download_dir.first(), // .first() is needed to convert the queue channel to a value channel so it can be used multiple times.
[] )

// Create Read2tree database

// Run Read2tree
// READ2TREE ( )


emit:
Expand Down
10 changes: 5 additions & 5 deletions workflows/pathogensurveillance.nf
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,11 @@ workflow PATHOGENSURVEILLANCE {
.combine(COARSE_SAMPLE_TAXONOMY.out.kingdom, by: 0) // val(meta), [file(fastq)], val(ref_meta), file(reference), val(group_meta), [val(ref_meta)], val(kingdom)
.combine(COARSE_SAMPLE_TAXONOMY.out.depth, by:0) // val(meta), [file(fastq)], val(ref_meta), file(reference), val(group_meta), [val(ref_meta)], val(kingdom), val(depth)
.map { it[0..1] + it[4..7] } // val(meta), [file(fastq)], val(group_meta), [val(ref_meta)], val(kingdom), val(depth)
//BUSCO_PHYLOGENY (
// busco_input,
// DOWNLOAD_REFERENCES.out.sequence
//)
BUSCO_PHYLOGENY (
busco_input,
DOWNLOAD_REFERENCES.out.sequence
)

// Save version info
CUSTOM_DUMPSOFTWAREVERSIONS (
ch_versions.unique().collectFile(name: 'collated_versions.yml')
Expand Down

0 comments on commit d8aad7d

Please sign in to comment.