fastq-generator

Crates.iofastq-generator
lib.rsfastq-generator
version0.1.1
created_at2025-02-08 12:24:37.02677+00
updated_at2025-02-08 13:52:36.498828+00
descriptionA fastq generator for generation of synthetic fastq files.
homepage
repositoryhttps://github.com/michaelbest55/fastq-generator
max_upload_size
id1548007
size51,118
Michael Best (mbestipa)

documentation

https://docs.rs/fastq-generator/

README

fastq-generator

Rust Version crates.io Documentation Dependency Status

A simple cli tool for generating fastq files.

Table of Contents

This project started at a time when I needed to generate a large number of fastq files quickly and with a large number of reads. I wanted a simple tool that could generate fastq files with a large number of reads quickly. I also wanted to learn more about Rust and how to write a simple CLI tool in Rust. This project is the result of that. As this is my first time writing in Rust, I am sure there are many things that could be done better. I am open to suggestions and PRs.

Installation

fastq-generator is a single binary that must be placed somewhere in your $PATH. One can either download 64-bit Linux binaries from the Release Page or one can also compile from source.

Compile from Source

Ensure you have a Rust toolchain installed. Some of the dependencies also require gcc to be installed.

$ git clone https://github.com/michaelbest55/fastq-generator
$ cd fastq-generator
$ cargo build --release
$ sudo cp target/release/fastq-generator /usr/local/bin/

Usage

# Reverse complement
fastq_generator reverse_complement --input path/to/input.fasta --output path/to/output.fasta

# Generate a FASTA file
fastq_generator generate_fasta --sequence-size 100 --nb-seq 10 --output path/to/output.fasta

# Generate random single-end FASTQ
fastq_generator generate_random_fastq_se --sequence-size 50 --nb-seq 5 --output path/to/output.fastq

# Generate random paired-end FASTQ
fastq_generator generate_random_fastq_pe --sequence-size 50 --nb-seq 5 --output path/to/output.fastq

# Generate mapped single-end FASTQ
fastq_generator generate_mapped_fastq_se --ref-fasta path/to/reference.fasta --sequence-size 75 --coverage 10 --output path/to/output.fastq

# Generate mapped paired-end FASTQ
fastq_generator generate_mapped_fastq_pe --ref-fasta path/to/reference.fasta --sequence-size 75 --coverage 10 --insertion-size 300 --output path/to/output.fastq

License

This crate is licensed under MIT license.

Commit count: 0

cargo fmt