Git Product home page Git Product logo

vcf2arlequindiploid's Introduction

VCF2ArlequinDiploid

Description:

A script designed to convert GBS/RAD/DNASEQ vcf data to arlequin diploid .arp format files. The program should properly convert most any vcf that uses vcf format >= 4.0 to an Arlequin 3.5.22 loadable .arp file.

Setup

Use >= Python 3.7:

This program has 0 dependencies, i.e. if you have base python 3.7 it will run without issue. It is possible this program will run with any >= py3 version of python, but it hasn't been extensively tested.

If you dont have python 3.7 install it via conda:

conda create -n py37
conda install -n py37 python=3.7

Build a tab delimited population file:

samp1 <\t> population_E
samp2 <\t> population_E
samp3 <\t> population_F
samp4 <\t> population_F
samp5 <\t> population_R

The population file defines the expected relationship of each sample (column 1) with population (column 2). The above is an example with 5 samples defining 3 different populations. The sample name MUST BE EXACTLY THE SAME as it is in the vcf header line starting with #CHROM<\t>POS<\t>ID... Building a tab delimited text can be done on the command line or via excel, for a further example of a functional population file see the ./testData/inputFormats/population.txt

Usage:

Convert your vcf into an arlequin formated diploid file (.arp):

activate the proper python environment

conda activate py37

run your vcf2ArlequinDiploid analysis

python /Users/deansanders/Desktop/DS_Github/VCF2ArlequinDiploid/vcf2ArlequinDiploid.py --vcf SNPs.mergedAll.vcf --popFile population.txt --splitContigs

Program Options:

  • --vcf: The path to the vcf to convert to arlequin format (VCF format >= 4.0)
  • --popFile: A two column tab delimited text file defining the expected relationship of each sample with the other samples in the population
  • --splitContigs: split the input .vcf data into several output .arp files by contig
  • --debug: run debug and print every relevant processing field for every individual in each population

Runtime:

Not extensive... Using the longest --splitContigs method, 100k SNPs can be converted to .arp format in < 5 minutes

vcf2arlequindiploid's People

Contributors

sandman2127 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.