Giter VIP home page Giter VIP logo

vcftotable's Introduction

VCF to table maker

Description

Many NGS variant analysis tasks require generation of variants in variant call format (VCF). These files are large and inconsistently formatted. This package allows one to run basic snpEff annotation on a variant call format VCF file and then convert this output to a wide table. One can use the output to load into a database system for quick lookup and filtering on different column names.

Input format

The input VCF files must be compressed and indexed with tabix. To prepare raw VCF files that are not compressed or tabix-indexed, do:

#Make input files tabix compressed
bgzip file.vcf
tabix -p vcf file.vcf.gz

Requirements

A UNIX/Linux environment is ideal for running this pipeline. I've been running this on Mac OSX and Ubuntu OS. This is a command line program.

Clone/Download this repository and optionally add the folder location to your UNIX ${PATH}.

Bioinformatics tools

  • snpEff (>= version 4)
  • tabix ( version 0.2.5 or higher).
  • bcftools (Version: 1.3 (using htslib 1.3) or higher)

R libraries

  • R (> 3.1.2)
  • R data.table i.e.
  • R stringr

installation of R packages can be done as following

install.packages(c("stringr","data.table"))

Usage

With snpEff Annotation

Once you have a snpEff database e.g. hg19, Set the $SNPEFF variable in the vcf_shortAnnotationTable.sh script to the snpEff installation on your system. A minimum memory requirement of ~2G RAM is recommended to run this pipeline.

.Run the pipeline as below

vcf_shortAnnotationTable.sh   snpeff_db input.vcf.gz output

Without Annotation

If you're simply trying to convert an annotated VCF file without wanting to run snpEff then you may do the following

VCF_printAllTags.sh inputvariants.vcf.gz > output.tsv

Each INFO field in the VCF will be printed.

To parse out these fields in a very quick and dirty way, one can do

With VcfAnno annotation

The VCFAnno package is a great toolset to use

bash  vcfToTable/VCF_printAllTags.sh  inputvariants.anno.vcf.gz  |perl -w vcfToTable/effParser.pl > output.txt 2> warnings.txt

vcftotable's People

Contributors

freezecoder avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

novapyth

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.