Wewill create a primary processes to parse the configuration provided by the user to validate and prep input to generate_counts pipeline.
The psuedo workflow code will look something like this:
nextflow.enable.dsl=2
include { ALIGN_COUNTS as generate_alignment_counts } from './workflows/alignment-counts-workflow.nf'
include { cpm_fold_enrichment as compute_cpm_fold_enrichment } from './workflows/enrichment-workflow.nf'
include { to_tall as write_ds_to_tall_csv } from './workflows/io.nf'
include { to_wide as write_ds_to_wide_csv } from './workflows/io.nf'
workflow {
// validate and set flags (emission channels) for downstream
// analysis to run. generate or modify sample table depending on input
parse_config()
// generate raw dataset
generate_alignment_counts(
parse_config.out.sample_table,
parse_config.out.peptide_table,
)
// example running cpm-fold-enrichment
compute_cpm_fold_enrichment(
generate_alignment_counts.out,
parse_config.out.foo // named channel in the emimssion block, optional depending on parse.
)
// some other downstream analysis
fit_predict_neg_binom(...)
// merge the separate analysis
merge_analysis()
// downstream analysis
if( params.output_tall )
write_ds_to_tall_csv(ds)
if( params.output_wide )
write_ds_to_wide_csv(ds)
}
Wewill create a primary processes to parse the configuration provided by the user to validate and prep input to generate_counts pipeline.
The psuedo workflow code will look something like this: