Coder Social home page Coder Social logo

snptoseq's Introduction

SNPtoSEQ.py

SNPtoSEQ.py is a simple Python program that captures SNP contextual sequence and provides a BED and/or FASTA file with the sequences

$ ./SNPtoSEQ.py
usage: SNPtoSEQ.py -v VCF FILE -r REFERENCE FASTA FILE [-w WINDOW SIZE]
                   [-o OUTPUT NAME] [--no-fasta | --no-bed]

Capture SNP contextual sequences into BED and/or FASTA format

Input Options:
  Provide a VCF file of SNPs and a reference genome in FASTA format

  -v VCF FILE, --vcf VCF FILE
                        SNPs in VCF format
  -r REFERENCE FASTA FILE, --reference REFERENCE FASTA FILE
                        Reference genome in FASTA format

Window options:
  Select a one-sided window size to capture in contextual sequence; this
  size represents the amount of sequence on each side of the SNP to capture

  -w WINDOW SIZE, --window WINDOW SIZE
                        Set the window size, defaults to 120

Output Options:
  Provide an output name as well as choose if we suppress some output

  -o OUTPUT NAME, --outname OUTPUT NAME
                        Basename for the output file(s), defaults to the name
                        of '-v | --vcf' with modified extensions
  --no-fasta            Do we suppress FASTA output? Incompatible with '--no-
                        bed'
  --no-bed              Do we suppress BED output? Incompatible with '--no-
                        fasta'

Inputs

SNPtoSEQ.py requires a VCF file with SNP information and a reference genome in FASTA format. Please ensure that the chromosome information in the VCF matches the sequence identifiers in the FASTA file. To check, use UNIX grep and cut to find the chromosome information in both files:

grep -v '#' ${MY_VCF} | cut -f 1
grep '>' ${MY_REFERENCE}

Outputs

SNPtoSEQ.py creates between one and two output files:

File name Contents
output.bed BED file describing the SNP contextual sequence; suppressed with --no-bed
output.fasta FASTA file with containing the SNP contextual sequences; sequence identifiers are the SNP name; suppressed-with --no-fasta

Dependencies

SNPtoSEQ.py depends on the following:

BioPython and overload are available through PyPi and can be downloaded using pip3 (included with Python 3.4 or greater)

snptoseq's People

Contributors

mojaveazure avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

morrelllab

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.