#sequencing #command-line-tool #data #docker #command

bin+lib ngs

Command line tool for processing next-generation sequencing data

4 releases (breaking)

new 0.4.0 Mar 24, 2023
0.3.0 Oct 10, 2022
0.2.0 Sep 18, 2022
0.1.0 May 10, 2022

#1054 in Command line utilities


10K SLoC


CI: Status crates.io version crates.io downloads License: Apache 2.0 License: MIT

Command line utility for working with next-generation sequencing files.
Explore the docs »

Request Feature · Report Bug · ⭐ Consider starring the repo! ⭐

🎨 Features

  • ngs convert. Convert between next-generation sequencing formats.
  • ngs derive. Forensic analysis tool for next-generation sequencing data.
  • ngs generate. Generates a BAM file from a given reference genome.
  • ngs index. Generates the index file to various next-generation sequencing files.
  • ngs list. Utility to list various supported items in this command line tool.
  • ngs plot. Produces plots for data generated by ngs qc.
  • ngs qc. Generates quality control metrics for BAM files.
  • ngs view. Views various next-generation sequencing files, sometimes with a query region.

Guiding Principles

  • Modern, reliable foundation for everyday bioinformatics analysis—written in Rust. ngs aims to package together a fairly comprehensive set of analysis tools and utilities for everyday work in bioinformatics. It is built with modern, multi-core systems in mind and written in Rust. Though we are not there today, we plan to work towards this goal in the future.
  • Runs on readily available hardware/software. We aim for every subcommand within ngs to run within most computing environments without the need for special hardware or software. Practically, this means we've designed ngs to run in any UNIX-like environment that has at least four (4) cores and sixteen (16) GB of RAM. Often, tools will run with fewer resources. This design decision is important and sometimes means that ngs runs slower than it otherwise could.

📚 Getting Started


To install the latest released version, you can simply use cargo.

cargo install ngs

To install the latest version on main, you can use the following command.

cargo install --locked --git https://github.com/stjude-rust-labs/ngs.git

Using Docker

docker pull ghcr.io/stjude-rust-labs/ngs
docker run -it --rm --volume "$(pwd)":/data ghcr.io/stjude-rust-labs/ngs

/data is the working directory of the docker image. Running this command from the directory with your data will allow the continer to act on those files.

Note: Currently the latest tag refers to the latest release of ngs and not the most recent code changes in this repository.

🖥️ Development

To bootstrap a development environment, please use the following commands.

# Clone the repository
git clone git@github.com:stjude-rust-labs/ngs.git
cd ngs

# Run the command line tool using cargo.
cargo run -- -h

🚧️ Tests

# Run the project's tests.
cargo test

# Ensure the project doesn't have any linting warnings.
cargo clippy

# Ensure the project passes `cargo fmt`.
cargo fmt --check

Minimum Supported Rust Version (MSRV)

The minimum supported Rust version for this project is 1.64.0.

🤝 Contributing

Contributions, issues and feature requests are welcome! Feel free to check issues page.

📝 License

  • All code related to the ngs derive instrument subcommand is licensed under the AGPL v2.0. This is not due to any strict requirement, but out of deference to some code that inspired our strategy (and from which patterns were copied), the decision was made to license this code consistently.
  • The rest of this project is licensed as either Apache 2.0 or MIT at your discretion.

Copyright © 2021-Present St. Jude Children's Research Hospital.


~494K SLoC