Giter VIP home page Giter VIP logo

basic-variant-parser's Introduction

Basic-Variant-Parser: A Variant File Parser

Introduction

Ensembl's Variant Effect Predictor (vep) provides functional annotations of genomic variants. However, the output of vep, as well as variant-calling format (vcf) files, can be hard to parse especially due nested key-value pair fields common to both file types. This script, implemented in Haskell, provides a conversion of the standard output of vep and vcf to a fully tab-delimited version of output that is fully and easily accessible to downstream filtration and further parsing.

Prerequisites

bvp.hs assumes you have a the GHC compiler and packages installed that it imports. The easiest way to do this is to download the Haskell Platform.

Installing required packages

To install the peripheral packages bvp.hs requires, you can call the following command assuming you have cabal, a package manager and build system for Haskell, installed on your system (it comes with the Haskell Platform).

$ cabal install [packagename]

Required packages

  • Data.List
  • Data.List.Extra
  • Data.List.Split
  • Data.Ord
  • Data.Tuple
  • System.Console.GetOpt
  • System.Directory
  • System.Environment
  • System.Exit
  • System.IO
  • System.IO.Temp
  • System.Process

Input

A prerequisite for getting useful output from this script is to have the correct input file structure. This script requires that you provide a file that was produced using vep, or a vcf file.

Usage

bvp.hs is easy to use.

You can call it using the runghc command provided by the GHC compiler as such:
$ runghc bvp.hs -I vcf -O tvcf -g -G -o output.vcf example.vcf.gz

For maximum performance, please compile and run the source code as follows:
$ ghc -O2 -o BVP bvp.hs
$ ./BVP -I vcf -O tvcf -g -G -o output.vcf example.vcf.gz

Arguments

bvp.hs has few different command line arguments:

Basic Variant Parser, Copyright (c) 2019 Matthew Mosior.
Usage: bvp [-vV?IoOgG] [file]
  -v          --verbose             Output on stderr.
  -V, -?      --version             Show version number.
  -I IN       --InFormat=IN         The format of the input file.
  -O OUT      --OutFormat=OUT       The format of the output file.
  -o OUTFILE  --OutputFile=OUTFILE  The output file.
  -g          --GzipIn              Gzipped input file?
  -G          --GzipOut             Gzipped output file?
              --help                Print this help message.

The -v option, the verbose option, will provide a full error message.
The -V option, the version option, will show the version of bvp in use.
The -I option, the InFormat option, specifies the format of the input file, and is required to run bvp.hs.
The -O option, the OutFormat option, specifies the format of the output file, and is required to run bvp.hs.
The -o option, the outputfile option, is used to output the operation on the input file into a output file, whose name is specified by the user.
The -g option, the GzipIn option, specifies that the input file is gzip compressed.
The -G option, the GzipOut option, specifies that the output file is to be compressed using gzip.
Finally, the --help option outputs the help message seen above.

Docker

A docker-based solution (Dockerfile) is availible in the corresponding repository. Currently, this Dockerfile assumes that you run docker interactively.

Credits

Documentation was added March 2019.
Author : Matthew Mosior

basic-variant-parser's People

Contributors

matthew-mosior avatar

Stargazers

 avatar

Watchers

 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.