Rustyread is a drop in replacement of badread simulate.

Overview

Test Lints MSRV CodeCov Documentation License

Rustyread

Rustyread is a drop in replacement of badread simulate. Rustyread is very heavily inspired by badread, it reuses the same error and quality model file. But Rustyreads is multi-threaded and benefits from other optimizations.

WARNING:

  • Rustyread has not yet been evaluated or even compared to any other long read generators
  • Rustyread is tested only on Linux
  • Rustyread is still in developpement many thing can change or be break

Usage

If previously you called badread like this:

badread simulate --reference {reference path} --quantity {quantity} > {reads}.fastq

you can now replace badread by rustyread:

rustyread simulate --reference {reference path} --quantity {quantity} > {reads}.fastq

But by default rustyread use all avaible core you can control it with option threads:

rustyread --theads {number of thread} simulate --reference {reference path} --quantity {quantity} > {reads}.fastq

If you have badread installed in your python sys.path rustyread can found error and quality model automatically, but you can still use --error_model and --qscore_model option.

Control memory usage

Rustyread memory usage could be estimated with formula: 2 * reference base + 2 * targeted base + epsilon, to limit memory impact of Rustyread you can use parameter number_base_store it's take an absolute value or a relative depth, if this option is set memory usage became 2 * reference base + 2 number_base_store + epsilon.

Full usage

rustyread 0.3 Arcanine
Pierre Marijon 
A long read simulator based on badread idea and model

USAGE:
    rustyread [FLAGS] [OPTIONS] 

FLAGS:
    -h, --help         Prints help information
    -v, --verbosity    verbosity level also control by environment variable RUSTYREAD_LOG if flag is
                       set RUSTYREAD_LOG value is ignored
    -V, --version      Prints version information

OPTIONS:
    -t, --threads     Number of thread use by rustyread, 0 use all avaible core, default
                               value 0

SUBCOMMANDS:
    help        Prints this message or the help of the given subcommand(s)
    simulate    Generate fake long read
rustyread-simulate
Generate fake long read

USAGE:
    rustyread simulate [FLAGS] [OPTIONS] --reference  --quantity 

FLAGS:
    -h, --help                  Prints help information
        --small_plasmid_bias    If set, then small circular plasmids are lost when the fragment
                                length is too high (default: small plasmids are included regardless
                                of fragment length)
    -V, --version               Prints version information

OPTIONS:
        --chimera 
            Percentage at which separate fragments join together [default: 1]

        --end_adapter 
            Adapter parameters for read ends (rate and amount) [default: 50,20]

        --end_adapter_seq 
            Adapter parameters for read ends [default: GCAATACGTAACTGAACGAAGT]

        --error_model 
            Path to an error model file [default: nanopore2020]

        --glitches 
            Read glitch parameters (rate, size and skip) [default: 10000,25,25]

        --identity 
            Sequencing identity distribution (mean, max and stdev) [default: 85,95,5]

        --junk_reads 
            This percentage of reads wil be low complexity junk [default: 1]

        --length 
            Fragment length distribution (mean and stdev) [default: 15000,13000]

        --number_base_store 
            Number of base, rustyread can store in ram before write in output in absolute value
            (e.g. 250M) or a relative depth (e.g. 25x)

        --output                      Where read is write
        --qscore_model 
            Path to an quality score model file [default: nanopore2020]

        --quantity 
            Either an absolute value (e.g. 250M) or a relative depth (e.g. 25x)

        --random_reads 
            This percentage of reads wil be random sequence [default: 1]

        --reference                Reference fasta (can be gzipped, bzip2ped, xzped)
        --seed 
            Random number generator seed for deterministic output (default: different output each
            time)

        --start_adapter 
            Adapter parameters for read starts (rate and amount) [default: 90,60]

        --start_adapter_seq 
            Adapter parameters for read starts [default: AATGTACTTCGTTCAGTTACGTATTGCT]

Installation

Bioconda

If you haven't bioconda setup follow this instruction

conda|mamba install rustyread

With rust environment

If you haven't a rust environment you can use rustup or your package manager.

With cargo

cargo install --git https://github.com/natir/rustyread.git

From source

git clone https://github.com/natir/rustyread.git
cd rustyread
git checkout 0.3
cargo install --path .

Minimum supported Rust version

Currently the minimum supported Rust version is 1.45.0.

Difference with badread

  • option small_plasmid_bias is silently ignored but small plasmid is 'sequence'
You might also like...
Modern Drop-in Replacement for Nginx AutoIndex / FancyIndex!
Modern Drop-in Replacement for Nginx AutoIndex / FancyIndex!

MeowIndex A cute, feature-rich file listing module to replace nginx's autoindex / fancyindex. Features List files Show file icons Clickable, length-sa

A mostly drop-in replacement for mercantile written w/ rust, plus several other util(e)ities.

utiles utiles = utils + tiles A mostly drop-in replacement for mercantile written w/ rust, plus several other util(e)ities. Installation pip install u

A lightweight, no-fuss, drop-in replacement for Rudderstack

Welcome to Stilgar! Stilgar is a lightweight, no-fuss, drop-in replacement for Rudderstack. Key features: Seamlessly compatible with all Rudderstack c

Drop-in replacement for the Actix Web HTTP Logger middleware

actix-contrib-logger Logger middleware for the Actix Web framework. Actually it's a copy & paste from the official Logger middleware (original source

Bevy plugin to simulate and preview different types of Color Blindness.
Bevy plugin to simulate and preview different types of Color Blindness.

Bevy Color Blindness Simulation Bevy plugin to simulate and preview different types of Color Blindness. This lets you ensure that your game is accessi

An app designed to simulate real poker events to upskill players
An app designed to simulate real poker events to upskill players

Poker Trainer Version this application is run on: NPM: 8.17.0 Rust: 1.62.0 Available Scripts In the project directory, you can run: npm start Runs the

Simple crate to login to Pinterest and get the cookies via Chromiumoxide to simulate a browser

Simple crate to login to Pinterest and get the cookies via Chromiumoxide to simulate a browser (open a real browser actually), to use the Pinterest API without needing a developer account or an API key or anything that costs money :).

Drop-in Access Control via NFT Ownership
Drop-in Access Control via NFT Ownership

niftygate - Signature-Based Authenticating Proxy What is it? niftygate is a proxy for HTTP services, that validates signatures, providing an AuthN lay

Drop-in proxy for Discord gateway connections and sessions allowing for zero downtime deploys

gateway-proxy This is a very hacky project, so it might stop working if Discord changes their API core. This is unlikely, but keep that in mind while

Contains the source code to compile the drop'in language into WebAssembly files

drop'in compiler This repository contains the source code to compile the drop'in language into WebAssembly files. This source code is in an experiment

Drop ownership from "method position"

disown Drop ownership from "method position". Motivation Normally, unowned data is automatically dropped at the end of its residing block. We can also

 DexiosGUI - Simple cross-platform drag-and-drop Dexios file encryption
DexiosGUI - Simple cross-platform drag-and-drop Dexios file encryption

DexiosGUI Simple cross-platform drag-and-drop Dexios file encryption. Latest Windows x64 release is here. DexiosGUI is a Qt/C++ app for encrypt and de

A simple tool to test sqlx with postgres. It will automatically create a database and drop it after the test.

sqlx-db-tester This a tool to test sqlx with postgres. It only supports tokio runtime at this moment. How to use it You should first create a TestDb d

Make a DAO Drop!

DAO drop tool This tool parses a Cosmos SDK chain export JSON file, to produce a CSV list of addresses and amounts. It can handle extremely large file

Fast, concurrent, arena-based allocator with drop support

blink-alloc Blink-alloc is extremely fast allocator based on the common idea of allocating linearly zipping a cursor through memory chunk and reset ev

Drop-in embedded database
Drop-in embedded database

Struct DB 🔧 🔩 Provides a drop-in, fast, and embedded database solution, focusing on maintaining coherence between Rust types and stored data with mi

A tiling layout engine for egui with drag-and-drop and resizing
A tiling layout engine for egui with drag-and-drop and resizing

egui_tiles Layouting and docking for egui. Supports: Horizontal and vertical layouts Grid layouts Tabs Drag-and-drop docking Trying it cargo r --examp

A modern replacement for ps written in Rust
A modern replacement for ps written in Rust

procs procs is a replacement for ps written in Rust. Documentation quick links Features Platform Installation Usage Configuration Features Output by t

A modern replacement for ‘ls’.
A modern replacement for ‘ls’.

exa exa is a modern replacement for ls. README Sections: Options — Installation — Development exa is a modern replacement for the venerable file-listi

Comments
  • compile error with clap

    compile error with clap

    Hi

    I got a load of clap errors while attempting to compile via cargo

    Rust version seems sufficient?

    rustc --version
    rustc 1.60.0 (7737e0b5c 2022-04-04)
    

    cargo install --path .

    error: cannot find attribute `clap` in this scope
      --> src/cli/mod.rs:30:7
       |
    30 |     #[clap(
       |       ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    For more information about this error, try `rustc --explain E0433`.
    error: failed to compile `rustyread v0.4.0 (/home/hpc/davenpor/programs/rustyread)`, intermediate artifacts can be found at `/home/hpc/davenpor/programs/rustyread/target`
    
    Caused by:
      could not compile `rustyread` due to 26 previous errors
    

    This PR in another repo seems to be a solution. Does it make sense to implement this (I could do a PR)?

    https://github.com/LedgerHQ/cargo-ledger/pull/7/files

    thanks

    opened by colindaven 4
Releases(0.4.1)
  • 0.4.1(Mar 2, 2022)

  • 0.4(May 21, 2021)

    Change:

    • Add benchmark to evaluate performance of error add in raw sequence
    • Add a snakemake pipeline and jupyter notebook, to evaluate performance and result of rustyread
    • Fix error in choose of reference probability, this fix improve shape of read length distribution
    • Improve test coverage and check model statistic result
    • To add error in read now rustyread, iterate over position and test if error should be add or not, this methodology could add less error on end of read
    Source code(tar.gz)
    Source code(zip)
  • 0.3(Apr 23, 2021)

    Change:

    • User can 'control' memory usage of rustyread with option --number_base_store
    • Improve test coverage
    • Use random model in same seed test
    • Mean error rate generate is closer to the target
    Source code(tar.gz)
    Source code(zip)
  • 0.2(Apr 12, 2021)

    Change:

    • Two run with same seed and parameter produce same output (except for the order of the reads)
    • Add random error model
    • Add ideal and random quality score model
    • Better default value for output parameter
    • Improve test coverage
    • "Better" error message
    Source code(tar.gz)
    Source code(zip)
  • 0.1(Apr 10, 2021)

Owner
Pierre Marijon
Pierre Marijon
Modern Drop-in Replacement for Nginx AutoIndex / FancyIndex!

MeowIndex A cute, feature-rich file listing module to replace nginx's autoindex / fancyindex. Features List files Show file icons Clickable, length-sa

Hykilpikonna 4 Feb 25, 2023
Fast, concurrent, arena-based allocator with drop support

blink-alloc Blink-alloc is extremely fast allocator based on the common idea of allocating linearly zipping a cursor through memory chunk and reset ev

Zakarum 55 Mar 5, 2023
A flexible, simple to use, immutable, clone-efficient String replacement for Rust

flexstr A flexible, simple to use, immutable, clone-efficient String replacement for Rust Overview Rust is great, but it's String type is optimized as

Scott Meeuwsen 119 Dec 12, 2022
A direct replacement for `assert_eq` for unordered collections

assert_unordered A direct replacement for assert_eq for unordered collections This macro is useful for any situation where the ordering of the collect

Scott Meeuwsen 10 Nov 29, 2022
age-encrypted secrets for NixOS; drop-in replacement for agenix

ragenix ragenix provides age-encrypted secrets for NixOS systems which live in the Nix store and are decrypted on system activation. Using ragenix to

YAXI 91 Jan 8, 2023
🐱‍👤 Drop-in HTTP replacement module for Garry's Mod

??‍?? gmsv_reqwest This module is a drop-in replacement for Garry's Mod's HTTP function, inspired by gmsv_chttp created by timschumi. The module uses

William 38 Dec 12, 2022
A drop-in replacement for `dapp` and `seth` in Rust

dapptools.rs Rust port of DappTools dapp example Usage Run Solidity tests Any contract that contains a function starting with test is being tested. Th

Georgios Konstantopoulos 5k Jan 1, 2023
A (mostly) drop-in replacement for Rust's Result that provides backtrace support

Errant A (mostly) drop-in replacement for Rust's Result that provides backtrace support. Please note that Errant is still very early in development an

Joshua Barretto 17 Dec 26, 2022
drop-in replacement for libfuzzer

Fazi A reimplementation of libfuzzer in Rust with some improvements Supported Features libFuzzer's mutations SanCov feedback Building without a main()

Lander Brandt 56 Nov 2, 2022
messloc is a drop in replacement for malloc that can transparently recover from memory fragmentation without any changes to application code.

messloc is a drop in replacement for malloc that can transparently recover from memory fragmentation without any changes to application code. Goals Al

null 11 Dec 10, 2022