Hi there! I am trying to merge overlapping reads in a bam file to one in silico long read. An example:
chr1 1 4 ACAC chr1 3 6 ACTT chr1 6 9 TGGG chr1 11 14 ACTG
The desired result is:
chr1 1 9 ACACTTGGG chr1 11 14 ACTG
bedtools merge which gives me the start and end position of the merged reads, even the count and read identifiers of reads that overlap and were merged, but unfortunately not the actual merged read sequence. When trying to use
-c 4 -o collapse -delim "" the sequences unfortunately just get concatenated and therefore some bases are doubled, since they are not observed back to back, but overlapping.
I also read into getting consensus sequence from bam files and clipping of overlapping read pair mates, but all that is not what I want to achieve. Any help is appreciated! Thanks!