Hello,
I'm running bwa mem on paired-end single digested RAD-seq data. I'm using the following command:
bwa mem -t $threads -M $genome $input1 $input2 | samtools view -b -@ $threads | samtools sort -@ $threads -m 7G > ${output}.bam
with threads=3 and input 1 and 2, corresponding to the single-end and paired-end reads, respectively.
In the .log files I get at the end this message:
main] Real time: 178.000 sec; CPU: 359.533 sec
[bam_sort_core] merging from 0 files and 3 in-memory blocks...
It is to be considered an error? What does it mean exactly? could be that I have some problem with memory and I have to increase it?
If input1 are the single-end reads, and input2 are the paired-end reads in an interleaved file, BWA will incorrectly interpret the pairing and produce wrong results. If you want to mix single- and paired-end reads in the same run, you have to append the single-end reads at the end of the
forward
(orR1
) file from the paired-end reads.Do you mean that I should do something like that ?
No. However, my initial suggestion is wrong, I think I may have mixed bbmap (or some other program) and bwa methods for handling a mix of paired- and single-end reads.
For bwa, you have to interleave the forward and reverse paired-end reads, append the single end to this file, and use the
-p
flag. Suppose the paired-end reads are in the filesR1.fastq
andR2.fastq
, and the single-end reads are in the filesingle.fastq
, you need to: