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

n_unique_kmers doesn't exist #71

Open
bluegenes opened this issue Mar 13, 2023 · 2 comments
Open

n_unique_kmers doesn't exist #71

bluegenes opened this issue Mar 13, 2023 · 2 comments

Comments

@bluegenes
Copy link

Had an error shared with me (🎉):

Error in `dplyr::select()`:
! Can't subset columns that don't exist
x Column `n_unique_kmers` doesn't exist.
Run `rlang::last_error()` to see where the error occurred.

I see that the n_unique_kmers column is added during read_taxonomy_annotate, so the error is likely caused by using read_csv rather than read_taxonomy_annotate to read the file.

Would it be worth changing this internal column to n_unique_weighted_found to avoid this error for sourmash v4.5+, since we have the column now? We figured this name more clearly described the column info, but I'm not sure we discussed outside of the sourmash PR that added it.

Or if you want to force folks to use read_taxonomy_annotate (I see you do a couple other things in there) is there a way to catch the error + suggest the solution?

thanks for the awesome software!

@taylorreiter
Copy link
Member

oh nice, thank you for reporting! I didn't know n_unique_weighted_found was added in v4.5+! let me noodle on this for a couple days and then I'll implement a fix. I will def switch to that naming scheme and only calculate that column if it isn't already in the output file...need to think if there are other things I can do to "catch" this. thank you again!

@bluegenes
Copy link
Author

Here's where we calculate n_unique_weighted_found, in case it's helpful:

https://github.com/sourmash-bio/sourmash/blob/latest/src/sourmash/search.py#L496-L510

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants