Hi @huiping
Where to change this is different on each form – but you are looking for the Edit Distance. This informs the tool about how many bases can deviate from the reference, and the reverse.
Look in the Advanced Options on each form and let us know if you cannot find it and I’ll go in and try to find/screenshot it directly. Also consider reviewing the publications or original documentation for each tool – how the alignment capture works, and the related parameters that tune for inserts/deletions is a bit too complicated to repeat here. But we can try if you have a specific example once oriented.
A regular internet search will find a lot of discussion and this forum has some… this prior post is an example that might help with understanding the concept. In short, each tool does this differently! Problem with Extract alignment ends
Notes:
Both BWA and Bowtie2 are designed to find the “best exact unique match” per read query versus the reference target. Sub-hits are not usually reported or needed when mapping NGS reads.
If you want more distant homology matches, a tool like BLASTN can be a better choice. Lowering the match stringency too much with Bowtie2 or BWA might not produce what you are looking for, and the defaults are “strict”. This seems to be the opposite of your state goal but maybe I am misunderstanding. You can share a small example if I am getting this wrong! Copy/paste please the full BAM data line, along with a link to a history that contains just that BAM.
If you review a BAM result from either of those tools, you’ll see the range of homology reported with the runtime parameter used. Percent identity isn’t captured directly in the same way as BLASTN will report this.
These are the metrics most related to Edit distance in my opinion. Others can correct me or suggest more…
- CIGAR = condensed alignment characteristics across the query sequence bases
- OPT = variable tags that summarize alignment content
- MAPQ = represents the likelihood of a query match’s “uniqueness” against the target, after it has been filtered for the Edit distance’s lower stringency bounds
- Please explore the SAMtools documentation for better definitions of these!
Let’s start there