I'd like to combine my paired-end reads that have already been mapped by a PE reference aligner. Is there an existing tool for stitching overlapping, mapped paired-end reads (presumably from SAM to SAM)?
I've taken a look at COPE, PEAR, and FLASH, but it seems that none of these will merge a SAM/BAM. I'm looking at ABySS right now, but I'm not confident that any of these are built for merging non-FASTQ input.
It seems like my only options are either to 1.) stitch my FASTQ pairs prior to mapping or 2.) parse the SAM fields to do the stitching myself. I'd like to work with a validated alignment pipeline, so I'd rather not switch the pipeline from paired-end to single, stitched reads.
Most read merging programs expect fastq files as input since people generally merge reads before aligning etc. You can always convert your BAM back to fastq and then do the read merging. You do know for sure that these reads overlap?
All but the shortest reads overlap. I think extracting the reads of interest from the BAM, converting to FASTQ, and merging will be the most straightforward. I was hoping to rely on the SAM's alignment to merge the reads, but in all reality the self-aligned merge is going to be fine for the regions I've targeted.
Why would you like to do that? Maybe there are other ways to reach your goal