bede / kindel

Indel-aware consensus from aligned BAMs
GNU General Public License v3.0
20 stars 2 forks source link

Replace N's with the reference #13

Open migrau opened 6 years ago

migrau commented 6 years ago

Hi, For very bad alignments with a lot of gaps, is it possible to fill them using the reference instead N's? Thanks!

bede commented 6 years ago

Hi : ) Could you be more specific about what you mean by 'the' reference?

migrau commented 6 years ago

hi bede! E.g.

Ref.       AATGTCGGCT read1    TAT read2    TAT read3                   GACT read4                   GACT kindel:    TATNNNGACT desired: TATGTCGACT

Another question I just thought about, what is the kindel result if read1 is TCT and read2 TGT? So in the second position we would have A (ref), C (read1) and G (read2). It chooses the ref value for the 2nd postion (A)?

Thanks!

bede commented 6 years ago

Thanks for clarifying Miquel. At the moment this tool infers consensus using the SAM/BAM alone, meaning that to do this I would either have to rely on the SAM/BAM MD string for mismatching positions, which isn't generated by all aligners, or else accept a reference sequence as an optional argument. I did explore the former in a previous version of kindel, but for one reason or another moved away from this approach.

I agree that this would be a useful feature, and will see if I can find time to implement it. In the meantime if you find another tool that performs this task, please do let me know : )

Leaving this issue open.