Skip to content

Commit

Permalink
Parity for rapid
Browse files Browse the repository at this point in the history
  • Loading branch information
DLBPointon committed Nov 22, 2023
1 parent 60f129f commit f26b906
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 44 deletions.
24 changes: 12 additions & 12 deletions workflows/treeval.nf
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ workflow TREEVAL {
YAML_INPUT.out.reference,
GENERATE_GENOME.out.dot_genome
)
ch_versions = ch_versions.mix(REPEAT_DENSITY.out.versions)
ch_versions = ch_versions.mix( REPEAT_DENSITY.out.versions )

//
// SUBWORKFLOW: GENERATES A GAP.BED FILE TO ID THE LOCATIONS OF GAPS
Expand All @@ -162,7 +162,7 @@ workflow TREEVAL {
YAML_INPUT.out.reference,
GENERATE_GENOME.out.max_scaff_size
)
ch_versions = ch_versions.mix(GAP_FINDER.out.versions)
ch_versions = ch_versions.mix( GAP_FINDER.out.versions )

//
// SUBWORKFLOW: Takes reference file, .genome file, mummer variables, motif length variable and as
Expand All @@ -175,7 +175,7 @@ workflow TREEVAL {
YAML_INPUT.out.motif_len,
selfcomp_asfile
)
ch_versions = ch_versions.mix(SELFCOMP.out.versions)
ch_versions = ch_versions.mix( SELFCOMP.out.versions )

//
// SUBWORKFLOW: Takes reference, the directory of syntenic genomes and order/clade of sequence
Expand All @@ -185,7 +185,7 @@ workflow TREEVAL {
YAML_INPUT.out.reference,
YAML_INPUT.out.synteny_path
)
ch_versions = ch_versions.mix(SYNTENY.out.versions)
ch_versions = ch_versions.mix( SYNTENY.out.versions )

//
// SUBWORKFLOW: Takes reference, pacbio reads
Expand All @@ -195,7 +195,7 @@ workflow TREEVAL {
GENERATE_GENOME.out.dot_genome,
YAML_INPUT.out.longreads_new
)
ch_versions = ch_versions.mix(LONGREAD_COVERAGE.out.versions)
ch_versions = ch_versions.mix( LONGREAD_COVERAGE.out.versions )

//
// SUBWORKFLOW: GENERATE TELOMERE WINDOW FILES WITH PACBIO READS AND REFERENCE
Expand All @@ -204,7 +204,7 @@ workflow TREEVAL {
YAML_INPUT.out.reference,
YAML_INPUT.out.teloseq
)
ch_versions = ch_versions.mix(TELO_FINDER.out.versions)
ch_versions = ch_versions.mix( TELO_FINDER.out.versions )

//
// SUBWORKFLOW: GENERATE BUSCO ANNOTATION FOR ANCESTRAL UNITS
Expand All @@ -217,7 +217,7 @@ workflow TREEVAL {
buscogene_asfile,
ancestral_table
)
ch_versions = ch_versions.mix(BUSCO_ANNOTATION.out.versions)
ch_versions = ch_versions.mix( BUSCO_ANNOTATION.out.versions )

//
// SUBWORKFLOW: Takes reads and assembly, produces kmer plot
Expand All @@ -226,7 +226,7 @@ workflow TREEVAL {
YAML_INPUT.out.reference,
YAML_INPUT.out.longreads_new
)
ch_versions = ch_versions.mix(KMER.out.versions)
ch_versions = ch_versions.mix( KMER.out.versions )

//
// SUBWORKFLOW: GENERATE HIC MAPPING TO GENERATE PRETEXT FILES AND JUICEBOX
Expand All @@ -244,7 +244,7 @@ workflow TREEVAL {
REPEAT_DENSITY.out.repeat_density,
params.entry
)
ch_versions = ch_versions.mix(HIC_MAPPING.out.versions)
ch_versions = ch_versions.mix( HIC_MAPPING.out.versions )

//
// SUBWORKFLOW: Collates version data from prior subworflows
Expand All @@ -269,15 +269,15 @@ workflow TREEVAL {
reference
),
sample_id: meta.id,
pb_data: tuple(longread_meta, longread_files),
cm_data: tuple(hic_meta, hic_files),
pb_data: tuple( longread_meta, longread_files ),
cm_data: tuple( hic_meta, hic_files ),
custom: custom_file,
]
}
.set { collected_metrics_ch }

collected_metrics_ch.map { metrics ->
TreeValProject.summary(workflow, params, metrics, log)
TreeValProject.summary( workflow, params, metrics, log )
}

emit:
Expand Down
61 changes: 29 additions & 32 deletions workflows/treeval_rapid.nf
Original file line number Diff line number Diff line change
Expand Up @@ -58,72 +58,72 @@ workflow TREEVAL_RAPID {
//
// SUBWORKFLOW: reads the yaml and pushing out into a channel per yaml field
//
YAML_INPUT ( input_ch )
YAML_INPUT (
input_ch
)

//
// SUBWORKFLOW: Takes input fasta file and sample ID to generate a my.genome file
//
GENERATE_GENOME (
YAML_INPUT.out.assembly_id,
YAML_INPUT.out.reference
)
ch_versions = ch_versions.mix(GENERATE_GENOME.out.versions)
ch_versions = ch_versions.mix( GENERATE_GENOME.out.versions )

//
// SUBWORKFLOW: GENERATES A BIGWIG FOR A REPEAT DENSITY TRACK
//
REPEAT_DENSITY (
GENERATE_GENOME.out.reference_tuple,
YAML_INPUT.out.reference,
GENERATE_GENOME.out.dot_genome
)
ch_versions = ch_versions.mix(REPEAT_DENSITY.out.versions)
ch_versions = ch_versions.mix( REPEAT_DENSITY.out.versions )

//
// SUBWORKFLOW: GENERATES A GAP.BED FILE TO ID THE LOCATIONS OF GAPS
//
GAP_FINDER (
GENERATE_GENOME.out.reference_tuple,
YAML_INPUT.out.reference,
GENERATE_GENOME.out.max_scaff_size
)
ch_versions = ch_versions.mix(GAP_FINDER.out.versions)
ch_versions = ch_versions.mix( GAP_FINDER.out.versions )

//
// SUBWORKFLOW: GENERATE TELOMERE WINDOW FILES WITH PACBIO READS AND REFERENCE
//
TELO_FINDER (
GENERATE_GENOME.out.max_scaff_size,
GENERATE_GENOME.out.reference_tuple,
YAML_INPUT.out.teloseq
TELO_FINDER ( GENERATE_GENOME.out.max_scaff_size,
YAML_INPUT.out.reference,
YAML_INPUT.out.teloseq
)
ch_versions = ch_versions.mix(TELO_FINDER.out.versions)
ch_versions = ch_versions.mix( TELO_FINDER.out.versions )

//
// SUBWORKFLOW: Takes reference, pacbio reads
//
LONGREAD_COVERAGE (
GENERATE_GENOME.out.reference_tuple,
YAML_INPUT.out.reference,
GENERATE_GENOME.out.dot_genome,
YAML_INPUT.out.pacbio_reads
YAML_INPUT.out.longreads_new
)
ch_versions = ch_versions.mix(LONGREAD_COVERAGE.out.versions)
ch_versions = ch_versions.mix( LONGREAD_COVERAGE.out.versions )

//
// SUBWORKFLOW: Takes reads and assembly, produces kmer plot
//
KMER (
GENERATE_GENOME.out.reference_tuple,
YAML_INPUT.out.pacbio_reads
YAML_INPUT.out.reference,
YAML_INPUT.out.longreads_new
)
ch_versions = ch_versions.mix(KMER.out.versions)
ch_versions = ch_versions.mix( KMER.out.versions )

//
// SUBWORKFLOW: GENERATE HIC MAPPING TO GENERATE PRETEXT FILES AND JUICEBOX
//
HIC_MAPPING (
GENERATE_GENOME.out.reference_tuple,
YAML_INPUT.out.reference,
GENERATE_GENOME.out.ref_index,
GENERATE_GENOME.out.dot_genome,
YAML_INPUT.out.hic_reads,
YAML_INPUT.out.hic_reads_new,
YAML_INPUT.out.assembly_id,
GAP_FINDER.out.gap_file,
LONGREAD_COVERAGE.out.ch_covbw_nor,
Expand All @@ -132,7 +132,7 @@ workflow TREEVAL_RAPID {
REPEAT_DENSITY.out.repeat_density,
params.entry
)
ch_versions = ch_versions.mix(HIC_MAPPING.out.versions)
ch_versions = ch_versions.mix( HIC_MAPPING.out.versions )

//
// SUBWORKFLOW: Collates version data from prior subworflows
Expand All @@ -144,31 +144,28 @@ workflow TREEVAL_RAPID {
//
// LOGIC: GENERATE SOME CHANNELS FOR REPORTING
//
GENERATE_GENOME.out.reference_tuple
.combine( YAML_INPUT.out.assembly_classT )
.combine( YAML_INPUT.out.assembly_ttype )
.combine( YAML_INPUT.out.assembly_id )
YAML_INPUT.out.reference
.combine( LONGREAD_COVERAGE.out.ch_reporting )
.combine( HIC_MAPPING.out.ch_reporting )
.combine( CUSTOM_DUMPSOFTWAREVERSIONS.out.versions )
.map { meta, reference, lineage, ticket, sample_id, longread_meta, longread_files, hic_meta, hic_files, custom_file -> [
.map { meta, reference, longread_meta, longread_files, hic_meta, hic_files, custom_file -> [
rf_data: tuple(
[ id: meta.id,
sz: file(reference).size(),
ln: lineage,
tk: ticket ],
ln: meta.class,
tk: meta.project_id ],
reference
),
sample_id: sample_id,
pb_data: tuple(longread_meta, longread_files),
cm_data: tuple(hic_meta, hic_files),
sample_id: meta.id,
pb_data: tuple( longread_meta, longread_files ),
cm_data: tuple( hic_meta, hic_files ),
custom: custom_file,
]
}
.set { collected_metrics_ch }

collected_metrics_ch.map { metrics ->
TreeValProject.summary(workflow, params, metrics, log)
TreeValProject.summary( workflow, params, metrics, log )
}

emit:
Expand Down

0 comments on commit f26b906

Please sign in to comment.