-
Notifications
You must be signed in to change notification settings - Fork 91
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
mash matrix #66
Closed
Closed
mash matrix #66
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add new 'matrix' command which compares all input sequences and outputs a distance matrix. The current implementation is rough and ready but potentially faster than iterative 'mash dist'. fixes issue marbl#9.
… one crazy block at a time.
- pairCount is always one - parameters are unused - don't pass the maxPValue all the way down. Do that later, if interested.
Previously, for every position all 21 or so characters forming the kmer would be checked for validity. This lead to repeated checking of valid characters. I turned this into a strictly linear algorithm.
using a global PARAMETERS object now.
Thanks to @sebhtml for correcting me here. We now only hash the kmer with lower lexicographic ordering. This also reduces the total amount of kmers hashed.
I am closing this PR now. It is just too much of a mess with little gain as there is a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was frustrated with all existing solutions to produce a tree from mash distances, so I created an extra command:
mash matrix
. As the name suggests, given a set of sequences it produces a distance matrix (see issue #9).Note that I tailored it specifically to my needs. This includes output sequence names (compare issue #13) and the removal of a bunch of "features" I don't care about: p-values, reading sketches might be broken, static libcapnp. You might have to cherry-pick or do some adaptation. Also, you will have to enhance the documentation.
This new tool is bloody fast: just 47 seconds to compute a distance matrix for all ~2600 E. coli from Ensembl.