-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vsearch --usearch_global not showing "full alignment" instead only the segment pair #545
Comments
Hi! Yes, this is intended. VSEARCH uses global alignments, but the terminal gap penalties are very low by default, and terminal gaps are not shown in the alignments. It may therefore look like local alignments. This is similar to USEARCH. By default, the identity between the query and target is calculated as the percentage of matching nucleotides in the aligned region, excluding gaps at the ends (in the terminal regions). If you want to, you can choose to use a different definition of identity, for instance the CD-HIT definition, which is the number of matching columns divided by the shortest sequence length. In your case, when aligning primers, the primer length will almost always be the shortest sequence. I think that will give you the result you want. Use the option You can use the
Please see the manual for more info about these options. Some remarks: You cannot get multiple matches within the same database sequence for one query, so you may have to reverse the search by having the primers in the database (as you indicate). If you are using short sequences (less than 32 nucleotides) in the database you need to use the I hope this works for you. |
Thanks for the reply. The command I am using now is:
I will check the CD-HIT definition and maybe I can do some parsing myself with the help of the aln or caln column. A tseq or qseq column would maybe also give some more options but I see they are not available. Thanks again for the reply and thanks for this tool. |
Thanks @gbbio I've created a new issue regarding the missing Also, regression tests added to our test-suite (see frederic-mahe/vsearch-tests@bdb1a50) Please close the issue if you consider it solved. |
Hello,
If I use usearch_global to search a short primer sequence against a reference (or preferably search the reference against the primer) I don't get the "full alignment" back. For example:
The first base of the primer is not there and the identity is 100%. With a global alignment I was expecting something like:
Is this intended?
How can I achieve the above result like the second example? I want to align 1 primer sequence against many references and also detect multiple matches per reference. So preferably using --usearch_global where my file with references is the query. And get the alignment as qrow and trow columns.
Many thanks in advance.
The text was updated successfully, but these errors were encountered: