Giter Site home page Giter Site logo

cmguodong / bamql Goto Github PK

View Code? Open in Web Editor NEW

This project forked from boutroslaboratory/bamql

0.0 0.0 0.0 516 KB

Query language for filtering SAM/BAM reads

Home Page: http://labs.oicr.on.ca/boutros-lab/software/BAMQL

License: Other

Shell 0.24% C++ 81.37% C 4.63% Makefile 1.78% M4 4.93% Roff 7.05%

bamql's Introduction

BAMQL

This software is a simple query language for filtering SAM/BAM sequences.

Installation

In order to compile, LLVM 14, HTSlib, and libuuid are required.

On Debian/Ubuntu, these can be installed by:

sudo apt-get install autotools-dev build-essential libhts-dev libtool libpcre++-dev llvm-dev pkg-config uuid-dev zlib1g-dev

On RedHat/Fedora, these can be installed by:

sudo yum groupinstall "Development Tools"
sudo yum install libtool pcre-devel llvm-devel pkgconfig libuuid-devel zlib-devel

and HTSlib must be installed from sources.

In the source directory,

autoreconf -i && ./configure && make && sudo make install

The Query Language

The language consists of a number of predicates, things which match sequences, and connectives, which compose predicates.

For example, the following query will match sequences on chromosome 7 which are from the read group labelled “RUN3”:

chr(7) & read_group : RUN3

To filter read, use bamql like this:

bamql -i input.bam -o reads_i_live.bam -O reads_i_loathe.bam 'chr(7) & read_group : RUN3'

The following will take a sub-sample for mitochondrial sequences and all the sequences that have matched to chromosomes starting with “ug”:

chr(M) & random(0.2) | chr(ug*)

Again, to filter, use bamql like this:

bamql -f input.bam -o mitochondrial_subsample_with_traps.bam 'chr(M) & random(0.2) | chr(ug*)'

The details can be found in the manual page, which can be viewed by typing man bamql_queries at the command prompt or view the manual online.

bamql's People

Contributors

apmasell avatar clalansingh avatar chriscooper 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.