using Haplotypearray in scikit-allel
0
0
Entering edit mode
2.9 years ago
peter ▴ 20

I have downloaded a vcf file from 1000 genomes:

vcf file from 1000 genomes

I want to convert this vcf file to ms-style output. I came across this python package scikit-allel that I can use to read a vcf file and convert that to haplotypeArray. I have read the vcf file using scikit-allel:

import allel
callset = allel.read_vcf('example.vcf')

Callset is a dictionary. I can use key 'calldata/GT' to get my genotype 3D array which is of shape (2548903, 2548, 2) where my first dimension are the variants, second dimension are the samples. I want to take this vcf file and convert this into Haplotype array. How can I do that using scikit-allel or is there any tool that could convert my vcf file to ms-style output? Insights will be appreciated.

Link to scikit-allel scikit-allel

vcf ms-style python scikit-allel • 858 views
ADD COMMENT

Login before adding your answer.

Traffic: 2052 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6