-
Notifications
You must be signed in to change notification settings - Fork 33
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
cov1 Multiple Sequence Alignment #36
Comments
The concept of MSA is still new to me, but it seems that there are several MSA tools available. However, the filtering methods seem more advanced than a % similarity cutoff (see parameters for CLUSTALW). |
Running any of those MSA on 24K sequences is non trivial. I'm suggesting we use some sort of similarity % as a heuristic to remove sequences that are highly repetitive. As an aside: In theory a graph-based pan-genome is what we want but the over-head to make something like that is very large. |
Levenshtein distance (edit distance) could be used calculate similarity between two sequences. (and trivially for 24K sequences, non-efficiently). Example: def compare(seq1, seq2, threshold=0.99):
max_len = max(len(seq1), len(seq2))
similarity = 1 - edit_distance(seq1, seq2) / max_len
if similarity >= threshold:
return seq1
else:
return (seq1, seq2) Summary: There are some decisions to make:
|
Agreed that keeping the longer sequence is the correct choice. How does edit distance work with sub-sequences that are not at the same start site?
we don't know without first performing a global alignment how the two sequences line up |
Edit distance actually shows the domain for all potential best-case alignments. You can try your example using this online tool: http://www.let.rug.nl/~kleiweg/lev/. The number in the bottom right of the matrix is the resulting edit distance metric. Here is an example alignment:
|
Hrmm, not sure if that's appropriate if it can't deal with mis-matches. It might be a quick/dirty heuristic so maybe worth checking to get rid of 'obvious' similar sequences
|
Note to self (or anyone working on this): The most important question to consider is, "Are we able to pick up divergent sequences". Using If you interpret this curve, I now want to prune CoV sequences that are say 95%+ similar to one another to reduce the search space and speed up alignment. This should have a negligible cost to overall sensitivity. Another approach would be to N-mask any perfect repeats of say 200-300 nt in the pan-genome, retaining only a single copy. We in a way 'destroy' the genomes that are there but it may work as a much more efficient 'bait' sequence for determining CoV+ or CoV- libraries. |
Just gonna put it out there that I LOVE the way you documented that experiment. Super easy to follow your reasoning through methods through to results, especially as a non-scientist. Super inspiring and makes me want to strive to do things better. |
So this exactly can be solved with
Need to implement this still and probabaly update version to |
Preamble
See #27
cov0r.fa
Originally posted by @victorlin in #27 (comment)
The patched version of
cov1r
now removes perfect-match duplicates of sequences.Objective
To further optimize
cov1r
, generate a multiple-sequence alignment of the current forward sequences and prune sequences that are >99% (or any arbitrary cut-off) similar. Since we don't need an exact match to 'detect' CoV reads, we can narrow the search space while retaining high levels of sensitivity.The text was updated successfully, but these errors were encountered: