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

Add Count Thresholding #18

Closed
Adamtaranto opened this issue Sep 10, 2024 · 0 comments · Fixed by #28
Closed

Add Count Thresholding #18

Adamtaranto opened this issue Sep 10, 2024 · 0 comments · Fixed by #28
Assignees
Labels
enhancement New feature or request

Comments

@Adamtaranto
Copy link
Collaborator

It is often useful to exclude low abundance (erroneous) or high abundance (repeat associated) kmers from a count table.

As a user I'd expect a method called .min() to return all the kmers with the minimum observed count and .max() to be all kmers with the max observed count.

For thresholding at some cutoff value, maybe something like .mincut() and .maxcut() ?

Suggested use:

table = oxli.KmerCountTable(3)
kmers = ["AAA", "GGG", "GGG"]

for kmer in kmers:
    table.count(kmer)

table.mincut(2)
>> "Dropped 1 hash with fewer than 2 counts."

table.get("AAA")
>> 0

table.get("GGG")
>> 2

@ctb?

@Adamtaranto Adamtaranto added the enhancement New feature or request label Sep 10, 2024
@Adamtaranto Adamtaranto self-assigned this Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant