I have paired-end read sequencing data. I have aligned reverse and forward reads with bwa mem. Reverse and forward reads are 120 nucleotid long and they cover a 180 nucleotid long part of a genome, hence they overlap.
bwa mem $REF $file1 $file2 -t 20 > $sam
When I open the sam output file, the first lines begin like this:
M00135:404:HBJFESJSN:2:1101:2016:1297 53 ref ... M00135:404:HBJFESJSN:2:1101:2016:1297 133 ref ... M00135:404:HBJFESJSN:2:1101:2646:1297 53 ref ... M00135:404:HBJFESJSN:2:1101:2646:1297 133 ref ...
For every pair, I have the two lines aligned to the reference from the two directions ( I know, this is the normal output). Is it possible to combine reverse and forward reads to one sequence, thus getting a 180 nucleotid long alignment for each pair?
EDIT: sorry for not being clear, I would like to merge pairs after alignment is done.