Map to best template only

Issue #10 new
Jakob Nissen created an issue

I’ve been using your KMA for a little while now with these influenza sequences that can be a little difficult to align.

I’m inexplicably seeing some areas of low coverage in genes with a coverage of 1000x. When studied closer, it seems that reads that that particular region all align to a different template - depite the best template having a template identity of 99.65 compared to 94.65 of the template it aligns to. When aligning to only the overall best template using the Mt1 option, coverage is restored. However, it’s a little annoying to have to do two mapping steps, one to get the best template, and another to actually map to it. It’s not biologically likely that only fractions of a gene from different references should be present in the same virus.

It would be nice if either

  • There was an easy way of specifying that it should map to the best template only, or the N best templates, or,

  • KMA somehow could infer it was unlikely that the first half of template X had a depth of 1000 and the second half of around 10, with the reverse being true for template Y

Comments (1)

  1. ptlcc

    Unfortunately this is not a trivial solution, and I am working on this issue, which is more frequent when analysing ONT data.

    However, for your specific case there might be a solution already, when you are interested in all reads being aligned to the same template. For bacterial phylogeny we usually pick a suited reference prior to alignment using KMA -Sparse, and then align all the reads to that specific template using the -Mt1 option.

    With the Sparse mapping you will get a *.spa file with the results, where the first hit is the best from the sample, and the second column gives you the template number for use with -Mt1. I general we recommend using “-Sparse TG” or “-Sparse T” when indexing the database that is to be used for Sparse mapping. We have a preprint on this here: https://doi.org/10.1101/2020.05.28.121251, for bacteria however.

    Best,

    Philip

  2. Log in to comment