Commit 786fad21 authored by lrodrig1's avatar lrodrig1
Browse files

remove BUNDLE FILES include and add conditional index files generation in main.nf

parent d727a3d7
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
/*
......@@ -72,7 +74,6 @@ params.read_group = "@RG\\tID:SRR709972\\tSM:NA19206\\tPL:ILLUMINA\\tCN:CBRA\\tL
* Include subworkflows
*/
include { SUB_BWA_INDEX } from './subworkflows/bwa_index'
include { SUB_BUNDLE_FILES } from './subworkflows/bundle_files'
include { SUB_TRIMMED_FASTQ } from './subworkflows/trimmed_fastq'
include { SUB_BWA_MEM } from './subworkflows/bwa_mem'
include { SUB_SAMTOOLS_VIEW_SAM2BAM } from './subworkflows/samtools_view_sam2bam'
......@@ -88,19 +89,18 @@ include { SUB_CNV_CODEX } from './subworkflows/cnv_codex'
include { SUB_FINAL_FILTERING } from './subworkflows/final_filtering'
workflow{
indexFiles = []
if( params.generate_bwa_indexes )
indexFiles = SUB_BWA_INDEX(reference_fasta)
else
indexFiles = SUB_BUNDLE_FILES(reference_fasta)
if( params.generate_bwa_indexes ) {
output_bwa_index = SUB_BWA_INDEX(reference_fasta)
indexFiles = output_bwa_index.indexs.combine(output_bwa_index.fai).collect()
}
else {
indexChr = Channel.fromPath(params.reference_fasta_indexs)
indexFiles = indexChr.collect()
}
SUB_TRIMMED_FASTQ(fastq)
indexReads = SUB_TRIMMED_FASTQ.out.reads.combine(indexFiles)
SUB_BWA_MEM(
indexReads
)
SUB_BWA_MEM(SUB_TRIMMED_FASTQ.out.reads, indexFiles)
SUB_SAMTOOLS_VIEW_SAM2BAM(
SUB_BWA_MEM.out.output_paired,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment