Skip to content
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

Rewrite reclustering #340

Merged
merged 16 commits into from
Nov 11, 2024
Merged

Rewrite reclustering #340

merged 16 commits into from
Nov 11, 2024

Conversation

jakobnissen
Copy link
Member

@jakobnissen jakobnissen commented Jul 16, 2024

This PR completely rewrites reclustering. A few important differences:

  • It now uses Markers from vamb.parsemarkers, avoiding shelling out to prodigal
    and hmmer
  • The algorithm used to pick the best disjoint bins in the DBScan algorithm is
    faster, and should also produce better results.
  • The code is almost completely statically analyzable
  • Pandas is no longer used

It also refactors parsemarkers.py.
It is built on #339, so that needs to be merged first.

TODO

@jakobnissen jakobnissen force-pushed the recluster branch 3 times, most recently from 3e28676 to 12d6dde Compare July 22, 2024 08:57
@jakobnissen jakobnissen added Needs benchmark Must benchmark before merging this needs tests Needs workflow run Test the associated Snakemake workflow before merge labels Jul 22, 2024
@jakobnissen
Copy link
Member Author

Hm, it may be that the changed deduplication is actually worse - perhaps because most contigs have no marker information, so this new approach that dynamically finds the best clusters is not as good as globally finding the best eps value, allowing the clusters with markers to inform the eps value of the clusters without markers. Needs tests.

This commit makes parsemarkers work even when the split contigs do not have
integer identifiers.
It also allows easier subsetting of the contigs to predict genes for.
The API is still a little bad, but it's being restricted by Python's bad
multiprocessing.
This commit completely rewrites reclustering. A few important differences:
* It now uses Markers from vamb.parsemarkers, avoiding shelling out to prodigal
  and hmmer
* The algorithm used to pick the best disjoint bins in the DBScan algorithm is
  faster, and should also produce better results.
* The code is almost completely statically analyzable
* Pandas is no longer used
Commit cb93655 removed the last use of Pandas in the codebase.
Good riddance!
@jakobnissen jakobnissen marked this pull request as ready for review November 11, 2024 09:30
@jakobnissen
Copy link
Member Author

I'm going to merge this and then commence the larger quality control and testing needed for v5. That implies there will probably be some bugs in this commit.

@jakobnissen jakobnissen merged commit 1127238 into master Nov 11, 2024
6 checks passed
@jakobnissen jakobnissen deleted the recluster branch November 11, 2024 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs benchmark Must benchmark before merging this needs tests Needs workflow run Test the associated Snakemake workflow before merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant