This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Merging pe and contig alignments with Samtools

Does anyone know how to merge two BWA alignments into one using samtools? I have a pe read alignment and a contig alignment, both done with BWA and I was wondering how difficult it would be to merge these into one consensus alignment?

The authors of the following paper (Whole genome sequencing of the black grouse (Tetrao tetrix): reference guided assembly suggests faster-Z and MHC evolution)

did this with contigs and mate-pair reads:

"The BAM format alignment files of the contig mapping and the mate-pair read mapping were subsequently merged using SAMtools suite v0.1.18"

Zach

alignment

1 answer

I am not sure if I have understood your question correctly but if you have aligned both contigs and mate-pair reads to the same reference genome, you can use samtools "merge" function to merge the two bam/alignment files.

Log in to answer this question.