haplotyper-battle-royale/main.nf

106 lines
2.4 KiB
Text
Raw Permalink Normal View History

2023-06-08 22:55:57 +00:00
#!/usr/bin/env nextflow
include { validateParameters; fromSamplesheet } from 'plugin/nf-validation'
2023-10-19 03:08:27 +00:00
include { CLIQUESNV } from './modules/cliquesnv'
include { EFETCH } from './modules/efetch'
include { FASTERQ_DUMP } from './modules/fasterq_dump'
include { HAPLINK_HAPLOTYPES as HAPLINK_ML_HAPLOTYPES } from './modules/haplink/haplotypes'
include { HAPLINK_HAPLOTYPES as HAPLINK_RAW_HAPLOTYPES } from './modules/haplink/haplotypes'
include { HAPLINK_SEQUENCES } from './modules/haplink/sequences'
include { HAPLINK_VARIANTS } from './modules/haplink/variants'
include { MINIMAP2 } from './modules/minimap2'
2023-09-25 23:50:37 +00:00
include { NANOFILT } from './modules/nanofilt'
include { QUASIRECOMB } from './modules/quasirecomb'
include { SHORAH_AMPLICON } from './modules/shorah/amplicon'
include { SHORAH_SHOTGUN } from './modules/shorah/shotgun'
2023-08-09 21:09:55 +00:00
include { VIQUAS } from './modules/viquas'
2023-06-08 22:55:57 +00:00
workflow {
2023-10-19 03:08:27 +00:00
validateParameters()
2023-06-08 22:55:57 +00:00
Channel
.fromSamplesheet("input")
.set { ch_sras }
FASTERQ_DUMP( ch_sras )
FASTERQ_DUMP
.out
2023-06-08 22:55:57 +00:00
.set { ch_input }
EFETCH("${params.reference}")
2023-06-08 22:55:57 +00:00
EFETCH
.out
.set { ch_reference }
NANOFILT( ch_input )
NANOFILT
.out
.set { ch_reads }
MINIMAP2( ch_reads, ch_reference )
MINIMAP2
.out
.set { ch_alignments }
2023-09-25 23:44:50 +00:00
CLIQUESNV(
ch_alignments,
'snv-pacbio'
)
2023-06-08 22:55:57 +00:00
HAPLINK_VARIANTS( ch_alignments, ch_reference )
HAPLINK_VARIANTS
.out
.set { ch_variants }
ch_alignments
.join( ch_variants )
.set { ch_haplotype_calling }
HAPLINK_RAW_HAPLOTYPES(
ch_haplotype_calling,
ch_reference
)
HAPLINK_RAW_HAPLOTYPES
.out
.map{ [ it[0], 'HAPLINK_RAW_HAPLOTYPES', it[1] ] }
2023-06-08 22:55:57 +00:00
.set{ ch_raw_haplotypes }
HAPLINK_ML_HAPLOTYPES(
ch_haplotype_calling,
ch_reference
)
HAPLINK_ML_HAPLOTYPES
.out
.map{ [ it[0], 'HAPLINK_ML_HAPLOTYPES', it[1] ] }
2023-06-08 22:55:57 +00:00
.set{ ch_ml_haplotypes }
ch_raw_haplotypes
.mix(ch_ml_haplotypes)
.set{ ch_all_haplotypes }
HAPLINK_SEQUENCES(
ch_all_haplotypes,
ch_reference
)
2023-08-09 21:09:55 +00:00
2023-09-25 23:50:37 +00:00
QUASIRECOMB( ch_alignments )
2023-09-25 23:51:58 +00:00
SHORAH_AMPLICON(
ch_alignments,
ch_reference
)
SHORAH_SHOTGUN(
ch_alignments,
ch_reference
)
2023-08-09 21:09:55 +00:00
VIQUAS(
ch_alignments,
ch_reference
)
2023-06-08 22:55:57 +00:00
}