You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: expose RustQC as a library crate
Adds a [lib] target alongside the existing [[bin]] so RustQC's analysis
modules can be consumed as a Rust library, not just via the CLI.
- New src/lib.rs publishes config, cpu, gtf, io, rna, summary as the
public API and hosts the Strandedness enum at the crate root.
- main.rs is slimmed to bin-only modules (cli, ui, citations) and pulls
the rest from rustqc::*.
- Strandedness moves out of cli.rs (which now imports it from the lib)
so the 6 analysis modules using it no longer depend on the CLI module.
- format_count, format_pct, format_duration move from ui.rs to io.rs so
library consumers can reach them; ui.rs uses them privately.
Closes#72
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore: fix pre-existing clippy warnings
Clean up the 9 lints that were already failing on main, so the
pre-commit clippy hook passes again.
- counting.rs: replace manual zero-check + division with checked_div
- index.rs: sort_unstable_by_key with std::cmp::Reverse instead of by-cmp
- accumulators.rs: rewrite GC-bin compute with checked_div on read_len
- read_distribution.rs: collapse 4 nested if-blocks into match guards
- config.rs (tests): drop unnecessary borrow and avoid PathBuf-for-cmp
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs: document the new Rust library API
- src/lib.rs: expand crate-level rustdoc with install snippet, module
index, stability note, and two compiling examples (GTF parse and
Strandedness usage). Both examples are exercised by `cargo test --doc`.
- docs/usage/library.mdx: new Astro page covering installation, the
module surface, quick examples, and the current stability caveats
(no pipeline-level entry point yet).
- docs/astro.config.mjs: add the new page to the Usage sidebar.
- README.md: short "Use as a Rust library" section pointing to the
guide and to docs.rs/rustqc.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,6 +82,17 @@ cargo install rustqc
82
82
83
83
See the [documentation](https://seqeralabs.github.io/RustQC/) for full usage details, configuration options, output file descriptions, and benchmark results.
84
84
85
+
## Use as a Rust library
86
+
87
+
The crate is also published as a library, so the QC analysis modules (GTF parsing, dupRadar, featureCounts, RSeQC, Qualimap, preseq, samtools-style outputs) can be embedded into other Rust programs:
88
+
89
+
```toml
90
+
[dependencies]
91
+
rustqc = "0.2"
92
+
```
93
+
94
+
See the [library guide](https://seqeralabs.github.io/RustQC/usage/library/) and the full API reference on [docs.rs/rustqc](https://docs.rs/rustqc).
95
+
85
96
## AI & Provenance
86
97
87
98
RustQC was developed with substantial assistance from AI coding agents (primarily [Claude](https://claude.ai/)), using the upstream tool source code as reference. Correctness is validated by comparing output against the original tools on real sequencing data, not by manual code review alone. See the [AI & Provenance](https://seqeralabs.github.io/RustQC/about/ai-statement/) documentation for full details, including known validation gaps.
0 commit comments