Skip to content

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tabix-filter

Build Status

This is a modified version of tabix query, which allows to filter SNP by position and by alternative variants. It can be used as a part of a SNP annotation pipeline which includes multiple variants in the same locus.

Usage

You can query for specific variant from a command line:

tabix annotation.tsv
tabix_filter annotation.tsv 'Y:2655034;C'

You can also use a query file for large batch lookups:

#variants.tsv
Y 21154600 A
Y 21154600 T
Y 25375708 A
Y 25375708 T
tabix_filter annotation.tsv -V variants.tsv

Installation

Dependencies

The code depends on htslib. Please see installation details here.

It should also be possible to install htslib with linuxbrew and homebrew.

brew install htslib

Building

Simply run make

make

There is also a debug target of MacOS:

make tabix_filter_debug_osx

Testing

There is a simple set of scripts that test main functionality. The tests run against a small bundled fixture and do not require a network connection.

make test

Full example

# Download some annotations for CADD:
curl 'http://krishna.gs.washington.edu/download/CADD/v1.3/ExAC_r0.3.tsv.gz' -o exac_cadd.tsv.gz

# Create an index with regular tabix:
tabix -s1 -b2 -e2 exac_cadd.tsv.gz

# Write some data into test_query.tsv file:
cat <<EOF > test_query.tsv
Y 21154600 A
Y 21154600 T
Y 25375708 A
Y 25375708 T
EOF

# Use tabix_filter to retrieve CADD annotations for the variants
# -v specifies which column contains alternative variant (default: 4)
./tabix_filter exac_cadd.tsv.gz -v 4 -V test_query.tsv

Caveats

The program was made for use with SNP annotation pipelines. Therefore, the query string only accepts a single position, not position ranges.

The code performs simple string comparison for an exact match.

About

A modified version of tabix query which allows to filter by variants

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages