Skip to content

Commit

Permalink
Formatting and channel refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
DLBPointon committed Nov 22, 2023
1 parent d2efbae commit 53b9d83
Show file tree
Hide file tree
Showing 19 changed files with 77 additions and 86 deletions.
8 changes: 4 additions & 4 deletions subworkflows/local/ancestral_gene.nf
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ include { UCSC_BEDTOBIGBED } from '../../modules/nf-core/ucsc/bedtobigbed/main

workflow ANCESTRAL_GENE {
take:
busco_dir // Channel: [val(meta),/path/to/busco/output/dir]
dot_genome // Channel: [val(meta), [ datafile ]]
buscogene_as // Channel val(dot_as location)
ancestral_table // Channel val(ancestral_table location)
busco_dir // Channel: tuple [val(meta),/path/to/busco/output/dir]
dot_genome // Channel: tuple [val(meta), [ datafile ]]
buscogene_as // Channel: val(dot_as location)
ancestral_table // Channel: val(ancestral_table location)

main:
ch_versions = Channel.empty()
Expand Down
12 changes: 6 additions & 6 deletions subworkflows/local/busco_annotation.nf
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ include { ANCESTRAL_GENE } from './ancestral_gene'

workflow BUSCO_ANNOTATION {
take:
dot_genome // channel: [val(meta), [ datafile ]]
reference_tuple // channel: [val(meta), [ datafile ]]
lineageinfo // channel: val(lineage_db)
lineagespath // channel: val(/path/to/buscoDB)
buscogene_as // channel: val(dot_as location)
ancestral_table // channel: val(ancestral_table location)
dot_genome // Channel: tuple [val(meta), [ datafile ]]
reference_tuple // Channel: tuple [val(meta), [ datafile ]]
lineageinfo // Channel: val(lineage_db)
lineagespath // Channel: val(/path/to/buscoDB)
buscogene_as // Channel: val(dot_as location)
ancestral_table // Channel: val(ancestral_table location)

main:
ch_versions = Channel.empty()
Expand Down
4 changes: 2 additions & 2 deletions subworkflows/local/gap_finder.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ include { TABIX_BGZIPTABIX } from '../../modules/nf-core/tabix/bgziptabix/main'

workflow GAP_FINDER {
take:
reference_tuple // Channel [ val(meta), path(fasta) ]
max_scaff_size // val(size of largest scaffold in bp)
reference_tuple // Channel: tuple [ val(meta), path(fasta) ]
max_scaff_size // Channel: val(size of largest scaffold in bp)

main:
ch_versions = Channel.empty()
Expand Down
18 changes: 9 additions & 9 deletions subworkflows/local/gene_alignment.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ include { NUC_ALIGNMENTS as CDS_ALIGNMENTS } from './nuc_alignments'

workflow GENE_ALIGNMENT {
take:
dot_genome // Channel [ val(meta), path(file) ]
reference_tuple // Channel [ val(meta), path(file) ]
reference_index // Channel [ val(meta), path(file) ]
max_scaff_size // Channel val(size of largest scaffold in bp)
alignment_datadir // Channel val(geneset_dir)
alignment_genesets // Channel val(geneset_id)
alignment_common // Channel val(common_name) // Not yet in use
intron_size // Channel val(50k)
as_files // Channel [ val(meta), path(file) ]
dot_genome // Channel: [ val(meta), path(file) ]
reference_tuple // Channel: [ val(meta), path(file) ]
reference_index // Channel: [ val(meta), path(file) ]
max_scaff_size // Channel: val(size of largest scaffold in bp)
alignment_datadir // Channel: val(geneset_dir)
alignment_genesets // Channel: val(geneset_id)
alignment_common // Channel: val(common_name) // Not yet in use
intron_size // Channel: val(50k)
as_files // Channel: [ val(meta), path(file) ]

main:
ch_versions = Channel.empty()
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/local/generate_genome.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include { GET_LARGEST_SCAFF } from '../../modules/local/get_largest_scaff'

workflow GENERATE_GENOME {
take:
reference_file // Channel path(file)
reference_file // Channel: path(file)

main:
ch_versions = Channel.empty()
Expand Down
22 changes: 11 additions & 11 deletions subworkflows/local/hic_mapping.nf
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ include { PRETEXT_INGESTION as PRETEXT_INGEST_HIRES } from '../../subworkflows/l

workflow HIC_MAPPING {
take:
reference_tuple // Channel [ val(meta), path( file ) ]
reference_index // Channel [ val(meta), path( file ) ]
dot_genome // Channel [ val(meta), path( datafile ) ]
hic_reads_path // Channel [ val(meta), path( directory ) ]
assembly_id // Channel val( id )
gap_file // Channel [ val(meta), path( file ) ]
coverage_file // Channel [ val(meta), path( file ) ]
logcoverage_file // Channel [ val(meta), path( file ) ]
telo_file // Channel [ val(meta), path( file ) ]
repeat_density_file // Channel [ val(meta), path( file ) ]
workflow_setting // val( {RAPID | FULL } )
reference_tuple // Channel: tuple [ val(meta), path( file ) ]
reference_index // Channel: tuple [ val(meta), path( file ) ]
dot_genome // Channel: tuple [ val(meta), path( datafile ) ]
hic_reads_path // Channel: tuple [ val(meta), path( directory ) ]
assembly_id // Channel: val( id )
gap_file // Channel: tuple [ val(meta), path( file ) ]
coverage_file // Channel: tuple [ val(meta), path( file ) ]
logcoverage_file // Channel: tuple [ val(meta), path( file ) ]
telo_file // Channel: tuple [ val(meta), path( file ) ]
repeat_density_file // Channel: tuple [ val(meta), path( file ) ]
workflow_setting // Channel: val( { RAPID | FULL } )

main:
ch_versions = Channel.empty()
Expand Down
8 changes: 4 additions & 4 deletions subworkflows/local/insilico_digest.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ include { UCSC_BEDTOBIGBED } from '../../modules/nf-core/ucsc/bedto

workflow INSILICO_DIGEST {
take:
sizefile // Channel [ val(meta), path(my.genome_file) ]
reference // Channel [ val(meta), path(reference_file) ]
ch_enzyme // Channel val( "bspq1","bsss1","DLE1" )
dot_as // Channel val(dot_as location)
sizefile // Channel: tuple [ val(meta), path(my.genome_file) ]
reference // Channel: tuple [ val(meta), path(reference_file) ]
ch_enzyme // Channel: val( "bspq1","bsss1","DLE1" )
dot_as // Channel: val(dot_as location)

main:
ch_versions = Channel.empty()
Expand Down
21 changes: 6 additions & 15 deletions subworkflows/local/kmer.nf
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,6 @@ workflow KMER {
}
.set{ ch_reads_merged }

//
// LOGIC: PREPARE FASTK INPUT
//
CAT_CAT.out.file_out
.join( ch_reads_merged )
.map{ meta, reads_old, reads_new ->
reads_old.renameTo( reads_new );
}

//
// MODULE: COUNT KMERS
//
Expand All @@ -74,18 +65,18 @@ workflow KMER {
// LOGIC: PREPARE MERQURYFK INPUT
//
FASTK_FASTK.out.hist
.combine(FASTK_FASTK.out.ktab)
.combine(reference_tuple)
.combine( FASTK_FASTK.out.ktab )
.combine( reference_tuple )
.map{ meta_hist, hist, meta_ktab, ktab, meta_ref, primary ->
tuple( meta_hist, hist, ktab, primary, [])
tuple( meta_hist, hist, ktab, primary, [] )
}
.set{ ch_merq }

//
// MODULE: USE KMER HISTOGRAM TO PRODUCE SPECTRA
//
MERQURYFK_MERQURYFK ( ch_merq )
ch_versions = ch_versions.mix(MERQURYFK_MERQURYFK.out.versions.first())
ch_versions = ch_versions.mix( MERQURYFK_MERQURYFK.out.versions.first() )

emit:
merquryk_completeness = MERQURYFK_MERQURYFK.out.stats // meta, stats
Expand All @@ -98,10 +89,10 @@ process GrabFiles {
executor 'local'

input:
tuple val(meta), path("in")
tuple val( meta ), path( "in" )

output:
tuple val(meta), path("in/*.fasta.gz")
tuple val( meta ), path( "in/*.fasta.gz" )

"true"
}
6 changes: 3 additions & 3 deletions subworkflows/local/longread_coverage.nf
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ include { LONGREADCOVERAGESCALELOG2 } from '../../modules/local/
workflow LONGREAD_COVERAGE {

take:
reference_tuple // Channel: [ val(meta), file( reference_file ) ]
dot_genome // Channel: [ val(meta), [ file( datafile ) ] ]
reads_path // Channel: [ val(meta), val( str ) ]
reference_tuple // Channel: tuple [ val(meta), file( reference_file ) ]
dot_genome // Channel: tuple [ val(meta), [ file( datafile ) ] ]
reads_path // Channel: tuple [ val(meta), val( str ) ]

main:
ch_versions = Channel.empty()
Expand Down
10 changes: 5 additions & 5 deletions subworkflows/local/nuc_alignments.nf
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ include { PUNCHLIST } from './punchlist'

workflow NUC_ALIGNMENTS {
take:
reference_tuple // Channel [ val(meta), path(file) ]
reference_index // Channel [ val(meta), path(file) ]
nuc_files // Channel [ val(meta), path(file) ]
dot_genome // Channel [ val(meta), path(file) ]
intron_size // Channel val(50k)
reference_tuple // Channel: tuple [ val(meta), path(file) ]
reference_index // Channel: tuple [ val(meta), path(file) ]
nuc_files // Channel: tuple [ val(meta), path(file) ]
dot_genome // Channel: tuple [ val(meta), path(file) ]
intron_size // Channel: val(50k)

main:
ch_versions = Channel.empty()
Expand Down
6 changes: 3 additions & 3 deletions subworkflows/local/pep_alignments.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ include { EXTRACT_COV_IDEN } from '../../modules/local/extract_cov_iden'

workflow PEP_ALIGNMENTS {
take:
reference_tuple // Channel [ val(meta), path(file) ]
pep_files // Channel [ val(meta), path(file) ]
max_scaff_size // Channel val(size of largest scaffold in bp)
reference_tuple // Channel: tuple [ val(meta), path(file) ]
pep_files // Channel: tuple [ val(meta), path(file) ]
max_scaff_size // Channel: tuple val(size of largest scaffold in bp)

main:
ch_versions = Channel.empty()
Expand Down
12 changes: 6 additions & 6 deletions subworkflows/local/pretext_ingestion.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ include { PRETEXT_GRAPH } from '../../modules/lo

workflow PRETEXT_INGESTION {
take:
pretext_file // tuple([sample_id], file)
gap_file // tuple([sample_id], file)
coverage_file // tuple([sample_id], file)
cov_log_file // tuple([sample_id], file)
telomere_file // tuple([sample_id], file)
repeat_cov_file // tuple([sample_id], file)
pretext_file // Channel: tuple([sample_id], file)
gap_file // Channel: tuple([sample_id], file)
coverage_file // Channel: tuple([sample_id], file)
cov_log_file // Channel: tuple([sample_id], file)
telomere_file // Channel: tuple([sample_id], file)
repeat_cov_file // Channel: tuple([sample_id], file)


main:
Expand Down
4 changes: 2 additions & 2 deletions subworkflows/local/punchlist.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ include { PAF2BED } from '../../modules/local/paf_to_bed'

workflow PUNCHLIST {
take:
reference_tuple // Channel [ val(meta), path(reference)]
merged_bam // Channel [ val(meta), path(bam_file)]
reference_tuple // Channel: tuple [ val(meta), path(reference)]
merged_bam // Channel: tuple [ val(meta), path(bam_file)]

main:
ch_versions = Channel.empty()
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/local/repeat_density.nf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ include { REPLACE_DOTS } from '../../modules/local/replace_

workflow REPEAT_DENSITY {
take:
reference_tuple // Channel [ val(meta), path(file) ]
reference_tuple // Channel: tuple [ val(meta), path(file) ]
dot_genome

main:
Expand Down
10 changes: 5 additions & 5 deletions subworkflows/local/selfcomp.nf
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ include { BEDTOOLS_MERGE } from '../../modules/nf-core/bedtools/

workflow SELFCOMP {
take:
reference_tuple // Channel [ val(meta), path(reference_file) ]
dot_genome // Channel [ val(meta), [ path(datafile) ] ]
mummer_chunk // Channel val( int )
motif_len // Channel val( int )
selfcomp_as // Channel val( dot_as location )
reference_tuple // Channel: tuple [ val(meta), path(reference_file) ]
dot_genome // Channel: tuple [ val(meta), [ path(datafile) ] ]
mummer_chunk // Channel: val( int )
motif_len // Channel: val( int )
selfcomp_as // Channel: val( dot_as location )

main:
ch_versions = Channel.empty()
Expand Down
4 changes: 2 additions & 2 deletions subworkflows/local/synteny.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ include { GET_SYNTENY_GENOMES } from '../../modules/local/get_synteny_genomes'

workflow SYNTENY {
take:
reference_tuple // Channel [ val(meta), path(file) ]
synteny_path // Channel val(meta)
reference_tuple // Channel: tuple [ val(meta), path(file) ]
synteny_path // Channel: val(meta)

main:
ch_versions = Channel.empty()
Expand Down
4 changes: 2 additions & 2 deletions subworkflows/local/telo_finder.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ include { TABIX_BGZIPTABIX } from '../../modules/nf-core/tabix/bgziptab
workflow TELO_FINDER {

take:
max_scaff_size // val(size of largest scaffold in bp)
reference_tuple // Channel [ val(meta), path(fasta) ]
max_scaff_size // Channel: val(size of largest scaffold in bp)
reference_tuple // Channel: tuple [ val(meta), path(fasta) ]
teloseq

main:
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 @@ -4,7 +4,7 @@ import org.yaml.snakeyaml.Yaml

workflow YAML_INPUT {
take:
input_file // input_yaml_from_commandline
input_file // params.input

main:
ch_versions = Channel.empty()
Expand Down
8 changes: 4 additions & 4 deletions workflows/treeval.nf
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ workflow TREEVAL {
)
ch_versions = ch_versions.mix(GAP_FINDER.out.versions)

// //
// // SUBWORKFLOW: Takes reference file, .genome file, mummer variables, motif length variable and as
// // file to generate a file containing sites of self-complementary sequnce.
// //
//
// SUBWORKFLOW: Takes reference file, .genome file, mummer variables, motif length variable and as
// file to generate a file containing sites of self-complementary sequnce.
//
SELFCOMP (
YAML_INPUT.out.reference,
GENERATE_GENOME.out.dot_genome,
Expand Down

0 comments on commit 53b9d83

Please sign in to comment.