Entering edit mode
11 months ago
nithya
•
0
I am new to Nextflow scripts. I am trying to build a variant calling pipeline. I have used fastqc and trimmomatic tool for quality checking and trimming a low quality sequences. I have written a script below, program is executed but shows no output.
#!/usr/bin/env nextflow
params {
fastq_dir = "/mnt/e/Bioinformatics_ppt_learning/mtDNA/nextflow_scripts/*.fastq.gz"
fastqc_dir = "/mnt/e/Bioinformatics_ppt_learning/mtDNA/nextflow_scripts/fastqc_report"
trimmed_dir = "/mnt/e/Bioinformatics_ppt_learning/mtDNA/nextflow_scripts/trimmed_fastq"
trimmomatic_jar = "/mnt/e/Bioinformatics_ppt_learning/mtDNA/nextflow_scripts/trimmomatic-0.39.jar"
}
process FastQC {
tag "Running FastQC on ${fastq}"
publishDir "${fastqc_dir}/${fastq.baseName}"
input: path fastq
script:
"""
fastqc -o ${fastqc_dir} ${fastq}
"""
}
process Trimmomatic {
tag "Trimming ${fastq.baseName}"
input:
path read1 from FastQC.output
output:
file(joinPath(trimmed_dir, "${read1.baseName}_trimmed.fastq.gz"))
script:
"""
java -jar ${params.trimmomatic_jar} PE -threads 4 \
${read1} ${joinPath(trimmed_dir, "${read1.baseName}_trimmed.fastq.gz")} \
${joinPath(trimmed_dir, "${read1.baseName}_unpaired.fastq.gz")} \
${joinPath(trimmed_dir, "${read1.baseName}_unpaired.fastq.gz")}
"""
}
workflow {
fastq_files = Channel.fromPath(params.fastq_dir)
fastq_files.each {
FastQC(fastq: it)
Trimmomatic(read1: FastQC.output)
}
}
Please do not double post when you've had responses on another forum.
It feels pretty disrespectful to not only ignore those that are trying to help, but to not even make any of the improvements offered and post again shows a clear lack of understanding.