Skip to content

Commit

Permalink
Fixes for misspelling, formatting and such
Browse files Browse the repository at this point in the history
  • Loading branch information
DLBPointon committed Jul 25, 2023
1 parent 3c2fdb7 commit 1216730
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 9 deletions.
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ report {
}
trace {
enabled = true
file = "${params.tracedir}/resource_trace_${trace_timestamp}.txt"
file = "${params.tracedir}/pipeline_execution_${trace_timestamp}.txt"
fields = 'name,status,module,cpus,memory,attempt,realtime,%cpu,%mem,peak_rss'
}
dag {
Expand Down
6 changes: 5 additions & 1 deletion subworkflows/local/hic_mapping.nf
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ workflow HIC_MAPPING {
SAMTOOLS_MERGE.out.bam
.combine( reference_tuple )
.multiMap { bam_meta, bam, ref_meta, ref_fa ->
input_bam: tuple(bam_meta, bam)
input_bam: tuple( [ id: bam_meta.id,
sz: file( bam ).size() ],
bam
)
reference: ref_fa
}
.set { pretext_input }
Expand Down Expand Up @@ -264,5 +267,6 @@ workflow HIC_MAPPING {
//highres_snpshot = SNAPSHOT_HRES.out.image
mcool = COOLER_ZOOMIFY.out.mcool
hic = JUICER_TOOLS_PRE.out.hic
ch_reporting = pretext_input.input_bam
versions = ch_versions.ifEmpty(null)
}
9 changes: 6 additions & 3 deletions subworkflows/local/longread_coverage.nf
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,15 @@ workflow LONGREAD_COVERAGE {
//
// LOGIC: PREPARING MERGE INPUT WITH REFERENCE GENOME AND REFERENCE INDEX
//
SAMTOOLS_SORT.out.bam.view()
SAMTOOLS_SORT.out.bam
.combine( reference_tuple )
.multiMap { meta, file, ref_meta, ref ->
.multiMap { meta, bam, ref_meta, ref ->
bam_input : tuple(
[ id : meta.id,
sz : bam.size(),
single_end : true ],
file,
bam,
[] // As we aren't using an index file here
)
ref_input : tuple(
Expand All @@ -198,7 +200,7 @@ workflow LONGREAD_COVERAGE {
)
}
.set { view_input }

view_input.bam_input.view()
//
// MODULE: EXTRACT READS FOR PRIMARY ASSEMBLY
//
Expand Down Expand Up @@ -333,6 +335,7 @@ workflow LONGREAD_COVERAGE {
ch_halfbed = FINDHALFCOVERAGE.out.bed
ch_maxbed = BEDTOOLS_MERGE_MAX.out.bed
ch_bigwig = UCSC_BEDGRAPHTOBIGWIG.out.bigwig
ch_reporting = view_input.bam_input
versions = ch_versions
}

Expand Down
2 changes: 1 addition & 1 deletion subworkflows/local/yaml_input.nf
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ workflow YAML_INPUT {
assembly_level = assembly_data.level
assembly_asmVer = assembly_data.asmVersion
assembly_dbVer = assembly_data.dbVersion
assembly_gtype = assembly_data.gevalType
assembly_ttype = assembly_data.gevalType

pacbio_reads = assem_reads.pacbio
hic_reads = assem_reads.hic
Expand Down
29 changes: 26 additions & 3 deletions workflows/treeval.nf
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ workflow TREEVAL {
YAML_INPUT.out.reference
)

ch_versions = ch_versions.mix(GENERATE_GENOME.out.versions)
ch_versions = ch_versions.mix( GENERATE_GENOME.out.versions )

//
// SUBWORKFLOW: Takes reference, channel of enzymes, my.genome, assembly_id and as file to generate
Expand All @@ -118,7 +118,7 @@ workflow TREEVAL {
ch_enzyme,
digest_asfile
)
ch_versions = ch_versions.mix(INSILICO_DIGEST.out.versions)
ch_versions = ch_versions.mix( INSILICO_DIGEST.out.versions )

//
// SUBWORKFLOW: FOR SPLITTING THE REF GENOME INTO SCAFFOLD CHUNKS AND RUNNING SOME SUBWORKFLOWS
Expand Down Expand Up @@ -240,6 +240,28 @@ workflow TREEVAL {
ch_versions.unique().collectFile(name: 'collated_versions.yml')
)

//
// LOGIC: GENERATE SOME CHANNELS FOR REPORTING
//
GENERATE_GENOME.out.reference_tuple
.combine( YAML_INPUT.out.assembly_classT )
.combine( YAML_INPUT.out.assembly_ttype )
.map { meta, reference, lineage, ticket ->
tuple( [id: meta.id,
sz: file(reference).size(),
ln: lineage,
tk: ticket ],
reference
)
}
.set { rf_data }

pb_data = LONGREAD_COVERAGE.out.ch_reporting // merged pacbio.bam data tuple( [ id, size ], file )
cm_data = HIC_MAPPING.out.ch_reporting // merged cram.bam data tuple ( [ id, size ], file ) | Should really be a collected list of the raw cram
rf_data.view()
pb_data.view()
cm_data.view()

emit:
software_ch = CUSTOM_DUMPSOFTWAREVERSIONS.out.yml
versions_ch = CUSTOM_DUMPSOFTWAREVERSIONS.out.versions
Expand All @@ -259,7 +281,8 @@ workflow.onComplete {
if (params.hook_url) {
NfcoreTemplate.IM_notification(workflow, params, summary_params, projectDir, log)
}
// TreeValProject.summary(workflow, reference_tuple, summary_params, projectDir)

TreeValProject.summary(workflow, rf_data, pb_data, cm_data, summary_params, projectDir, params)

}

Expand Down

0 comments on commit 1216730

Please sign in to comment.