From 8b60491004de1fd5688985f0947ec460cc995d5c Mon Sep 17 00:00:00 2001 From: jessicaw9910 Date: Thu, 18 Jul 2024 18:38:53 -0400 Subject: [PATCH] fixed persistent adapter_fasta issue --- nextflow/main.nf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nextflow/main.nf b/nextflow/main.nf index 348303b..5ad3563 100644 --- a/nextflow/main.nf +++ b/nextflow/main.nf @@ -67,7 +67,7 @@ include { BAM_QC } from './subworkflows/bam_qc.nf' addParams(OUTPUT: "${params.o /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LOAD FASTQ FILES AS CHANNEL + LOAD FILES ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ @@ -75,6 +75,11 @@ Channel .fromFilePairs ( params.fastq, checkIfExists: true ) .set { fastq_ch } +if ( params.adapterFASTA ){ + adapter_fasta = file(params.adapterFASTA) + if( !adapter_fasta.exists() ) exit 1, "Genome chrom sizes file not found: ${params.adapterFASTA}" +} + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ WORKFLOWS @@ -90,11 +95,6 @@ workflow FASTQC_FASTQ { } workflow FASTP_FASTQ { - if ( params.adapterFASTA ){ - adapter_fasta = file(params.adapterFASTA) - if( !adapter_fasta.exists() ) exit 1, "Genome chrom sizes file not found: ${params.adapterFASTA}" - } - RUN_FASTP ( fastq_ch, adapter_fasta ) RUN_FASTQC_FASTP ( RUN_FASTP.out.reads ) RUN_MULTIQC_FASTP (