GithubHelp home page GithubHelp logo

mullinslab / dwindling Goto Github PK

View Code? Open in Web Editor NEW
0.0 5.0 0.0 296 KB

A tool to summarize the NGS read count stats at each stage of a pipeline

License: Other

Makefile 3.57% R 10.80% Perl 85.63%

dwindling's Introduction

Dwindling Reads

Usage:

dwindling-reads [--csv] --stage <stage1> <files> [--stage <stage2> <files> [--stage <stage3> <files>]
dwindling-reads --help

This program collates summary information from a set of next-gen sequencing paired-end reads at each stage of your pipeline.

Each stage is specified by --stage, followed by two to four arguments. The first argument is an arbitrary name of your choosing to identify that stage. Both FastQ (uncompressed and gzipped) and BAM files are supported. FastQ stages must specify at least two files for forward and reverse reads. An optional third file may be specified for single-end orphans, such as those commonly produced by quality trimmers. BAM stages must specify only a single .bam file.

CSV output may be piped into dwindling-plot to produce an SVG plot of the read counts through the various stages.

Options:

--csv     output CSV instead of formatted text
--help    print usage message and exit

Examples:

dwindling-reads --stage raw     raw/ABC_R1.fq.gz raw/ABC_R2.fq.gz \
                --stage sickle  trimmed/ABC_R1.fq trimmed/ABC_R2.fq trimmed/ABC_orphans.fq \
                --stage mapped  ABC.bam

Example output:

196300 raw = 98150 forward + 98150 reverse

161640 sickle = 80820 forward + 80820 reverse (= 82.34% of raw)
  6278 single-end orphans (= 3.20% of raw)
 34660 discarded, including orphans (= 17.66% of raw)

161910 mapped = 80820 forward + 80820 reverse (= 100.17% of sickle)
  -270 discarded (= -0.17% of sickle)

(In this case, bwa mem found 270 reads with secondary mappings so the reads are growing not dwindling!)

dwindling-plot example

plot example

Installation

dwindling-reads

Requires:

  • Perl 5.14 or newer
  • zcat (distributed with gzip)
  • wc (distributed with coreutils)
  • samtools

The first three are generally pre-installed on most Linux/Unix operating systems.

In addition, several Perl libraries from CPAN are needed and described in the cpanfile. The quickest way to satisfy the Perl prerequisites is by running:

make bundle

from within a clone of the git repository. This command will download cpanm and use it to install the required dependencies into the inc/ directory. The dwindling-reads program will automatically use libraries in this directory if they exist.

dwindling-plot

Requires:

You can generally just install the two R packages like so:

Rscript -e 'install.packages(commandArgs(T))' ggplot2 Cairo

To install them system-wide, use sudo Rscript.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.