Coder Social home page Coder Social logo

bamkit's Introduction

Overview

bamkit is a toolkit designed to analyze and process bam/sam files. More functions will be continuously added.

Installation

To install bamkit from the source code, you need to first download/compile htslib, setup the corresponding environmental variables, and then compile the source code of bamkit.

Install htslib

Download htslib (license) from (http://www.htslib.org/) with version 1.5 or higher. Choose a directory for installation and set the environment variable HTSLIB for that. For example, for Unix platforms, do the following:

export HTSLIB="/directory/to/your/htslib/install"

Use the following to build libhts.a:

autoheader
autoconf
./configure --disable-bz2 --disable-lzma --disable-gcs --disable-s3 --enable-libcurl=no --prefix=$HTSLIB
make
make install

Compile bamkit

The compilation of bamkit requires automake and autoconf packages. If they have not been installed, on linux platform, do the following:

sudo apt-get install autoconf
sudo apt-get install automake

bamkit might also requires other libraries, such as libz, depending on your system. Install them if you encounter errors when compiling.

After that run the script build.sh, which will generate the executable file src/src/bamkit.

Usage

The current version of bamkit supports the following functionalities:

./bamkit ts2XS <input.bam> <output.bam>

The ts tag (used in minimap2 aligner) will be transformed into XS tag (used in STAR, HISAT alingers) and the resuting alignments will be written to output.bam.

./bamkit count <input.bam>

A statistic will be returned about the input.bam, including the number of reads and basepairs aligned, etc.

./bamkit strand <input.bam>

A report about the strandness of the input.bam will be written to standard output.

./bamkit alignPairEval <input.bam> <groundTruth.bam>

This command is about evaluation of aligners(like STAR). input.bam is the result of aligner and groundTruth.bam is the ground truth based on output of flux simulator. Evaluation results of the aligner will be written to standard output.

./bamkit bridgeEval <input.coral.bam> <input.aligner.bam> <groundTruth.bam> <reference.gtf>

This command is about evaluation of aligners and tools that bridge paired reads(like coral). input.coral.bam is the result of coral, input.aligner.bam is the result of aligner and groundTruth.bam is the ground truth based on output of flux simulator. reference.gtf is the annotation used to simulate reads. Evaluation results of the aligner and coral will be written to standard output.

bamkit's People

Contributors

rachelshiq avatar shaomingfu avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

lehmannn

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.