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

Feature Request: Provide access to alignment score #69

Closed
rob-p opened this issue Aug 16, 2024 · 7 comments
Closed

Feature Request: Provide access to alignment score #69

rob-p opened this issue Aug 16, 2024 · 7 comments

Comments

@rob-p
Copy link

rob-p commented Aug 16, 2024

If the user is building an Aligner with the cigar option, it will be very useful to have access to the computed alignment score (what would arise as the AS tag if we were producing a SAM file with minimap2). Would it be easy to add support for accessing this information? I believe it is computed and stored in the ksw result which is exposed in the sys crate.

@jguhlin
Copy link
Owner

jguhlin commented Aug 16, 2024 via email

@rob-p
Copy link
Author

rob-p commented Aug 16, 2024

Ok, dumb question --- what invocation should I make in my Cargo.toml if I want to have both this branch of minimap2-rs as well as minimap2-sys in my project. Right now I have:

minimap2 = { version = "0.1.20", features = [
  "simde",
], git = "https://github.com/jguhlin/minimap2-rs.git", branch = "alignment-score" }
minimap2-sys = { version = "0.1.19", features = ["simde"] }

but I get the error:

error: failed to select a version for `minimap2-sys`.
    ... required by package `minimap2 v0.1.20+minimap2.2.28 (https://github.com/jguhlin/minimap2-rs.git?branch=alignment-score#ab0680c0)`
    ... which satisfies git dependency `minimap2` of package `oarfish v0.5.1 (/mnt/scratch1/rob/lrquant/oarfish)`
versions that meet the requirements `*` are: 0.1.19+minimap2.2.28

the package `minimap2-sys` links to the native library `libminimap2`, but it conflicts with a previous package which links to `libminimap2` as well:
package `minimap2-sys v0.1.19+minimap2.2.28`
    ... which satisfies dependency `minimap2-sys = "^0.1.19"` of package `oarfish v0.5.1 (/mnt/scratch1/rob/lrquant/oarfish)`
Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies
 so that only one package uses the `links = "libminimap2"` value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.

failed to select a version for `minimap2-sys` which could resolve this conflict

@jguhlin
Copy link
Owner

jguhlin commented Aug 16, 2024

@rob-p I've just set the Cargo.toml to be a specific version, run cargo update and you should be good to go.

@rob-p
Copy link
Author

rob-p commented Aug 16, 2024

Bravo! Thanks :).

@jguhlin
Copy link
Owner

jguhlin commented Aug 20, 2024

This is merged into the main branch. Won't push a release out until we've added all the new features and handled the bugs you dig up though!

@rob-p
Copy link
Author

rob-p commented Aug 20, 2024

Thanks @jguhlin; it seems to be working great for our purposes!

@rob-p
Copy link
Author

rob-p commented Aug 25, 2024

This is working great and we can replicate the precise results of command-line minimap2 on non-trivial datasets now, so I’m closing this issue.

@rob-p rob-p closed this as completed Aug 25, 2024
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