Skip to content

Commit

Permalink
added pirate
Browse files Browse the repository at this point in the history
  • Loading branch information
zachary-foster committed Jul 13, 2023
1 parent b61c831 commit 4f44a00
Show file tree
Hide file tree
Showing 7 changed files with 133 additions and 12 deletions.
5 changes: 5 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"installed_by": ["modules"]
},
"pirate": {
"branch": "master",
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"installed_by": ["modules"]
},
"quast": {
"branch": "master",
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
Expand Down
36 changes: 36 additions & 0 deletions modules/nf-core/pirate/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 47 additions & 0 deletions modules/nf-core/pirate/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 10 additions & 5 deletions subworkflows/local/bacteriapipeline.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ include { ALIGN_READS_TO_REF } from './align_reads_to_ref'
include { CALL_VARIANTS } from './call_variants'
include { VARIANT_CALLING_REPORT } from './variant_calling_report'
include { GENOME_ASSEMBLY } from './genome_assembly'
include { CORE_GENOME_PHYLOGENY } from './core_genome_phylogeny'

workflow BACTERIAPIPELINE {

Expand Down Expand Up @@ -38,17 +39,21 @@ workflow BACTERIAPIPELINE {
)
ch_versions = ch_versions.mix(CALL_VARIANTS.out.versions)

VARIANT_CALLING_REPORT (
CALL_VARIANTS.out.vcf,
ch_samplesheet
)
ch_versions = ch_versions.mix(VARIANT_CALLING_REPORT.out.versions)
//VARIANT_CALLING_REPORT (
// CALL_VARIANTS.out.vcf,
// ch_samplesheet
//)
//ch_versions = ch_versions.mix(VARIANT_CALLING_REPORT.out.versions)

GENOME_ASSEMBLY (
ch_reads
.join(ch_reference)
)
ch_versions = ch_versions.mix(GENOME_ASSEMBLY.out.versions)

CORE_GENOME_PHYLOGENY (
GENOME_ASSEMBLY.out.gff.join(ch_reference)
)

emit:
picard_dict = MAKE_REFERENCE_INDEX.out.picard_dict
Expand Down
26 changes: 26 additions & 0 deletions subworkflows/local/core_genome_phylogeny.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
include { PIRATE } from '../../modules/nf-core/pirate/main'
include { SAMTOOLS_FAIDX } from '../../modules/nf-core/samtools/faidx/main'

workflow CORE_GENOME_PHYLOGENY {

take:
ch_input // [ val(meta), file(gff), val(ref_meta), file(reference) ]

main:

ch_versions = Channel.empty()

// group samples by reference genome
ch_gff_grouped = ch_input
.groupTuple(by: 2)
.map { [it[2], it[1]] } // remove redundant reference genome paths

PIRATE ( ch_gff_grouped )
ch_versions = ch_versions.mix(PIRATE.out.versions.first())

emit:
pirate_aln = PIRATE.out.aln // channel: [ ref_meta, align_fasta ]

versions = ch_versions // channel: [ versions.yml ]
}

10 changes: 5 additions & 5 deletions subworkflows/local/eukaryotepipeline.nf
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ workflow EUKARYOTEPIPELINE {
)
ch_versions = ch_versions.mix(CALL_VARIANTS.out.versions)

VARIANT_CALLING_REPORT (
CALL_VARIANTS.out.vcf,
ch_samplesheet
)
ch_versions = ch_versions.mix(VARIANT_CALLING_REPORT.out.versions)
//VARIANT_CALLING_REPORT (
// CALL_VARIANTS.out.vcf,
// ch_samplesheet
//)
//ch_versions = ch_versions.mix(VARIANT_CALLING_REPORT.out.versions)

emit:
picard_dict = MAKE_REFERENCE_INDEX.out.picard_dict
Expand Down
6 changes: 4 additions & 2 deletions subworkflows/local/genome_assembly.nf
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,16 @@ workflow GENOME_ASSEMBLY {

ch_bakta_db = Channel.value("$projectDir/assets/bakta_db/db-light")
BAKTA_BAKTA (
SPADES.out.scaffolds, // Genome assembly
FILTER_ASSEMBLY.out.filtered, // Genome assembly
ch_bakta_db, // Bakta database
[], // proteins (optional)
[] // prodigal_tf (optional)
)

emit:
reads = FASTP.out.reads // channel: [ val(meta), [ fastq_1, fastq_2 ] ]
reads = FASTP.out.reads // channel: [ val(meta), [ fastq_1, fastq_2 ] ]
gff = BAKTA_BAKTA.out.gff
scaffolds = FILTER_ASSEMBLY.out.filtered

versions = ch_versions // channel: [ versions.yml ]
}
Expand Down

0 comments on commit 4f44a00

Please sign in to comment.