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?
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:
- 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.
- snp file: each row contains information of each SNP, for example:
snp_name, chr#, genetic_distance(cM), Physical_distance, Ref_allele, Alt_allele
1 answer
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?
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...
Log in to answer this question.
paste a sample of the format this software requires here
I have added more details to make my question clearer. Thanks
t 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.
how do you resolve this one issue, Actually I am trying to do this test please help me if you did this test.
Did you performed this test