I often use your Bowtie2 and BWA aligners to map reads to a reference. I wonder if the alignment parameters could be changed from relaxed to stringent, for example, the homology between reads and reference could be changed from 80% to 98%? Thanks.
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!
Below is NGS data analysis with CLC platform, in which the similarity fraction can be changed. I checked Bowtie2 and BWA aligners in Galaxy, but I did not find way of how to change similarity or identity between reads and references. Can you show me where I could change it? Thanks.
I checked the Full parameter list of Bowtie2 and BWA, but did not find parameters for similarity or identity. Can you tell me which one is for it, see below:
Below is for Set a function governing the minimum alignment score needed for an alignment to be considered valid (i.e. good enough to report), and the default in --end-to-end mode is `L,-0.6,-0.6. I wonder how to change it to get a bigger alignment score, or a stringent condition? Thanks.
Remember that this tool is finding the “best unique hit per query”. That means that most query sequences will have a single hit maximum (this is usually desirable).
So, if you want a more stringent alignment from what results from using the presets, try filtering the BAM result. Filter on the mapQ, proper pairs, and similar after the mapping step. Search the tool panel with “filter bam” if this sounds like what you want to do.