Git Product home page Git Product logo

htsbox's Introduction

Introduction

HTSbox is a fork of early HTSlib. It is a collection of small experimental tools manipulating HTS-related files. While some of these tools are already part of the official SAMtools package, others are for niche use cases in my own work, so are maintained by myself. Please keep in mind that HTSbox is NOT the official repository. It lags far behind HTSlib in terms of features, activity, clarity and robustness. If you are looking for a high-quality library and related tools, the SAMtools organization repositories are the right place.

Usage by examples

  1. Summary pileup:

    htsbox pileup -f ref.fa sorted1.bam sorted2.bam

    This gives the number of observed alleles, including InDels, in each input BAM. Additional options can be applied for filtering:

    htsbox pileup -f ref.fa -Q20 -q30 -l90 sorted.bam

    This filters alignments shorter than 90bp and with mapping quality lower than 20 and filters bases with quality lower than 20.

  2. Naive variant calling:

    htsbox pileup -f ref.fa -Q20 -q30 -cs3 sorted.bam

    The output in VCF gives positions with ALT alleles appearing 3 or more times. Note that variant calling in this way is very crude. It is usually not recommended to use this for whole-genome and exon variant calling from short reads. Nonetheless, `pileup' is a proper tool to call variants from contigs, in particular unitigs produced by fermi:

    htsbox pileup -cuf ref.fa unitig.bam

    Option -u enables multiple settings.

  3. Generate consensus FASTA:

    htsbox pileup -f ref.fa -Q20 -q30 -Fs3 sorted.bam
  4. Pairwise alignment summary:

    htsbox samview -p aln.bam

    In the output, each line gives QName, QLen, QStart, QEnd, Strand, RName, RLen, RStart, REnd, PerBaseDivergence, MapQ and semicolon-delimited misc information.

  5. Count alignment break points (mainly used to evaluate misassemblies):

    htsbox abreak name-srt.sam.gz

    or call structural variantions:

    htsbox abreak -u name-srt.sam.gz
  6. Reduce quality resolution with Illumina binning:

    htsbox qualbin -t2 -bm7 in.bam

    This is the only command so far that explores multi-threading.

  7. Evaluate empirical base quality, similar to MAQ's mapcheck:

    htsbox mapchk sorted.bam ref.fa

    The output is a bit complicated. Let me know if you are interested (I will see if it is worth documenting the output).

  8. Generate per-base read depth:

    htsbox depth -p0 sorted.bam

    The last two columns give the total read depth and depth of reads mapped with high mapQ (threshold defaults to 20). When -p takes a value between 0 and 1, it will use the CODOC strategy to find windows with relatively stable read depth. The output can be much smaller as it loses some information.

htsbox's People

Contributors

lh3 avatar ifiddes avatar mcshane avatar

Watchers

James Cloos avatar  avatar  avatar

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.