<p>I attempt to do a selective sweep analysis by using the software <a href="https://bioweb.pasteur.fr/packages/pack@XP-CLR@1.0" rel="nofollow noreferrer">XP-CLR1.0</a>. My genotypic data is VCF format, so I 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?</p>
<p>Output files I need are:</p>
<ol>
<li>geno file: contains the genotype of a single SNP, for example:</li>
</ol>
<pre><code>1 0 1 1 9 9
1 1 1 0 0 0
</code></pre>
<p>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.</p>
<ol start="2">
<li>snp file: each row contains information of each SNP, for example:</li>
</ol>
<pre><code>snp_name, chr#, genetic_distance(cM), Physical_distance, Ref_allele, Alt_allele
</code></pre>

CC BY-SA 4.0
2023-04-08T12:39:07.943Z
Please [edit] your question and explain exactly what the expected output format is. Ideally, add a small example of your input file and then the output you would expect from that example. Read the tool's documentation, read the paper describing it, understand the format and then tell us what it is and we can help you get there.
terdon
CC BY-SA 4.0
2023-04-08T16:14:15.533Z
Please let me know if the question clear now.
Fersal
CC BY-SA 4.0
2023-04-09T17:32:47.050Z
Not really, I'm afraid. What is the expected output from your example input? What is the _exact_ input and output format you have and need?
terdon
CC BY-SA 4.0
2023-04-10T14:02:08.543Z
What I need to do is to convert VCF files to both of the formats explained above in my question (geno.file and snp.file).
Fersal
CC BY-SA 4.0
2023-04-10T18:47:23.253Z
OK, so please add an example input, one or two variant lines from a VCF file, and then show the output you would want from that input. Tell us how we can know what values "genetic_distance", "physical_distance" etc., should have, where that information is in the vcf file.
terdon
CC BY-SA 4.0
2023-04-11T04:05:13.040Z
Perhaps https://github.com/hardingnj/xpclr would solve the problem? Looks like this version of the software runs the XP-CLR algorithm and accepts vcf files as input. Probably worth a look
jared_mamrot
<vcf>
How to convert VCF files to input file format required by XP-CLR1.0 software?
# How to convert VCF files to input file format required by XP-CLR1.0 software?

(Asked by: username_0 on 2023-04-08)

I attempt to do a selective sweep analysis by using the software XP-CLR1.0. My genotypic data is VCF format, so I 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?
Output files I need 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

**Tags:** vcf
> **Comments:**
> **username_1**: Please [edit] your question and explain exactly what the expected output format is. Ideally, add a small example of your input file and then the output you would expect from that example. Read the tool's documentation, read the paper describing it, understand the format and then tell us what it is and we can help you get there.  
> **username_0**: Please let me know if the question clear now.  
> **username_1**: Not really, I'm afraid. What is the expected output from your example input? What is the _exact_ input and output format you have and need?  
> **username_0**: What I need to do is to convert VCF files to both of the formats explained above in my question (geno.file and snp.file).  
> **username_1**: OK, so please add an example input, one or two variant lines from a VCF file, and then show the output you would want from that input. Tell us how we can know what values "genetic_distance", "physical_distance" etc., should have, where that information is in the vcf file.  
> **username_2**: Perhaps https://github.com/hardingnj/xpclr would solve the problem? Looks like this version of the software runs the XP-CLR algorithm and accepts vcf files as input. Probably worth a look  

---

## 0 answers

