Convert VCF files to input file format requiered by XP-CLR1.0 software
1
0
Entering edit mode
20 months ago
Famf ▴ 30

I attempt to do a selective sweep analysis by using the software XP-CLR1.0. My genotypic data is VCF format so wonder if someone with experience on this package could recommend any tool to convert from VCF to the input file format required by this software?

Input files are:

  1. geno file: contains the genotype of a single SNP, for example:
    1 0 1 1 9 9
    1 1 1 0 0 0

It contains two SNPs (rows) from three individuals (columns). First two columns are the two alleles of individual #1. Values 1 and 0 correspond to two allele types. 9 denotes missing data.

  1. snp file: each row contains information of each SNP, for example:
    snp_name, chr#, genetic_distance(cM), Physical_distance, Ref_allele, Alt_allele
XP-CLR • 1.7k views
ADD COMMENT
0
Entering edit mode

paste a sample of the format this software requires here

ADD REPLY
1
Entering edit mode

I have added more details to make my question clearer. Thanks

ADD REPLY
0
Entering edit mode
20 months ago

You can use VCFTOOLS to generate a PED file from your VCF; with that file, ped2geno in R can get you the .geno files you need. As for the snp file, I'm not really sure. You can extract things like chromosome number, ref_allele, alt_allele using bcftools query. For example something like

bcftools query -f '%CHROM\t%POS\t%ID\t%REF\t%ALT\n' your_vcf_file.vcf > snp_file.txt

but I don't know how you would get an "snp_name" from a vcf. Do you have more info on the snp file type?

ADD COMMENT
0
Entering edit mode

The only information I have regarding snp.file is that it has to have six columns (mentioned in my question). Regarding genetic_distance (cM) column, is it possible to get that information from a VCF file?

ADD REPLY
0
Entering edit mode

To my knowledge, I don't think you can get genetic distance from vcfs alone, i.e. it'll take more than just data wrangling. You will probably need a genetic map, which I don't actually know how to make myself...

ADD REPLY

Login before adding your answer.

Traffic: 1606 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