process index { input: file(fasta) output: path("${fasta}.amb") script: """ bwa index…
- User
process index { input: file(fasta)
codeoutput: path("${fasta}.amb") script: """ bwa index ${fasta} """}
process x {
codeinput: path(idx) tuple val(sample), file(reads) script: """ bwa mem ${idx} ${reads} | samtools view -b | samtools sort -o ${sample}.bam && picard MarkDuplicates -I ${sample}.bam -O ${sample}.dedup.bam -M metrics.txt --REMOVE_DUPLICATES true && samtools index ${sample}.dedup.bam """}
workflow { fasta = Channel.fromPath(params.fasta) fastqs = Channel.fromFilePairs("${params.dir}/_{1,2}.fastq.gz")
codeidx = index(fasta) x(idx, fastqs)}
Command output: executor > local (2) [7b/8dca23] process > index (1) [100%] 1 of 1 ✔ [37/33d617] process > x (1) [100%] 1 of 1, failed: 1 ✘ ERROR ~ Error executing process > 'x (1)'
Caused by: Process
x (1)terminated with an error exit status (1)Command executed:
bwa mem GCF_000017985.1_ASM1798v1_genomic.fna.amb SRR6170145_1.fastq.gz SRR6170145_2.fastq.gz | samtools view -b | samtools sort -o SRR6170145.bam && picard MarkDuplicates -I SRR6170145.bam -O SRR6170145.dedup.bam -M metrics.txt --REMOVE_DUPLICATES true && samtools index SRR6170145.dedup.bam
Command exit status: 1
Command output: (empty)
Command error: [E::bwa_idx_load_from_disk] fail to locate the index files [main_samview] fail to read the header from "-". samtools sort: failed to read header from "-"
- Assistant
The error message you're seeing indicates a problem with the BWA indexing and alignment step, specifically that BWA is not able to locate the index files. Here's a breakdown of the error messages:
-
[E::bwa_idx_load_from_disk] fail to locate the index files: This error suggests that BWA is unable to find the index files it needs to align the reads to the reference genome. When you runbwa index, it creates multiple index files with extensions like , , , , and . However, the process only outputs the file, which is insufficient for alignment as BWA requires all the index files.
-