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

help info for use as a library #12

Open
jianshu93 opened this issue Feb 10, 2023 · 6 comments
Open

help info for use as a library #12

jianshu93 opened this issue Feb 10, 2023 · 6 comments

Comments

@jianshu93
Copy link

Hello Jim,

Is that possible that a detailed function of comparing 2 genomes using skani can be added to readme so that when users want to rely on skani as library in other tools et.al. (or in other words make it modular). I can see that it is somewhere in the dist.rs

Thanks,

Jianshu

@bluenote-1577
Copy link
Owner

bluenote-1577 commented Feb 10, 2023

Hi jianshu,

If there is enough interest in using skani as a library, I'm not opposed to setting a more detailed Readme to use skani as a rust library with actual docs. I'll leave this up for now to see if there is other interest.

Maybe also, see https://github.com/althonos/pyskani by @althonos for how python bindings were generated for skani. His code is cleaner than mine and gives an idea for how to use skani's rust internals.

I can probably set up a small Readme for how to compare two genomes. Would that be sufficient for you?

@jianshu93
Copy link
Author

Hello Jim,
Thanks for pointing me to pyani and I think it will be very useful for many who love python. Yes a readme for Rust users will be very helpful, for example reading 2 genomes and then print out ANI (or even compare 2 list of genomes in parallel et.al., two main usage cases).

Thanks,

Jianshu

@bluenote-1577
Copy link
Owner

bluenote-1577 commented Feb 10, 2023

Hi Jianshu,

I've written up a quick minimal example on how to use skani here: https://github.com/bluenote-1577/skani-lib-example.

Let me know how it goes. For now, you'll have to go through skani's code to understand the function specifications (or https://docs.rs/skani/0.1.0/skani/), but maybe I'll support skani as a true library with docs one day :), depending on requests.

Jim

@jianshu93
Copy link
Author

Oh Many thanks!

This is very helpful! I am going to try to use it a another tool.

Jianshu.

@AroneyS
Copy link

AroneyS commented Jul 14, 2023

Are you planning on updating the crate (https://docs.rs/skani/latest/skani/)? I can only find up to v0.1.1.

@bluenote-1577
Copy link
Owner

Hi @AroneyS,

I currently am not planning on updating crate for two reasons.

  1. I have not changed the underlying algorithms much in 0.1; changes have mostly been bug fixes and file-io things unrelated to the core algorithm.
  2. Cargo has an annoying thing where you can not publish a crate if you specify a dependency directly from github. I had to swap to a github dependency in v0.1.3 so I can't publish it on crates.io right now.

If you have any questions about usage, let me know. I'm still keeping this open to gauge interest in skani's usage as a library

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

3 participants