This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Convert phased vcf to Chromosome/scaffold + Tag Haplotype Matrix

Hello all,

I am wanting to convert a phased vcf to a Chromosome/scaffold + Tag Haplotype Matrix that has the format of this example file to then use for fineRADStructure.

I produced my phased information using SHAPEITv2, which I then subsequently converted to a vcf format. Here is the first three lines of my vcf (excluding the header) the show you the format that need converting:

SUPER_10        182080  .       C       G       .       PASS    .       GT      0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0  0|0      0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0  0|0      0|0     0|0     0|0     0|0     0|0     0|1     0|0     1|1     0|1     0|0     0|0     0|0     0|1     0|1     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0  0|0      0|0     0|0     0|1     0|0     0|1     0|0     0|0     0|0     0|0     0|0     0|0     0|0     1|1     0|0     0|1     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0  0|0      0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|1     0|0     0|0     0|0     0|0     0|0     0|0     0|0  0|0      0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|1     0|0     0|0     0|0     0|0     0|0     0|0  0|0      0|0     0|0     0|0     0|0     0|0     0|1     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0
SUPER_10        182095  .       T       A       .       PASS    .       GT      1|1     0|0     0|1     0|1     1|1     0|1     0|0     1|1     1|1     1|1     0|1     1|1     0|1     1|1  1|1      0|1     1|1     0|1     1|1     1|1     1|1     1|1     1|1     0|1     0|1     0|0     1|1     1|1     0|0     0|1     1|1     0|0     1|1     0|1     0|1     1|1     1|1     0|1  1|1      0|1     0|0     1|1     0|0     1|1     1|1     0|1     1|1     1|1     0|1     0|0     1|1     0|1     0|1     1|1     0|1     0|0     1|1     0|0     0|0     0|1     0|1     0|0  0|1      1|1     0|1     0|1     0|1     0|0     0|1     1|1     1|1     1|1     0|0     0|1     1|1     1|1     0|1     1|1     0|1     1|1     1|1     0|1     1|1     1|1     0|0     1|1  0|0      1|1     1|1     1|1     1|1     0|1     0|0     1|1     1|1     0|1     1|0     0|0     0|1     0|1     0|0     1|1     0|1     1|1     1|1     1|1     1|1     1|1     1|1     0|1  1|1      0|0     1|1     0|1     0|1     0|1     0|1     1|1     0|1     1|1     1|1     0|1     0|1     0|0     0|1     0|0     1|1     0|1     1|1     0|1     1|1     1|1     0|0     1|1  0|0      0|1     1|1     0|1     0|1     1|1     0|1     0|1     1|1     1|1     1|1     0|0     1|1     1|1     0|1     1|0     1|0     1|1     0|1     0|0
SUPER_10        182129  .       C       T       .       PASS    .       GT      0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0  0|0      0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0  0|0      0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0  0|0      0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|1     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0  0|0      0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0  0|0      0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0  0|0      0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0     0|0

Thank you in advance for your help.

If you need anymore information to help address the question, please let me know.

Thank you!

vcf phased haplotypes shapeit bcftools

Seems like there is a function called hapsFromVCF which is in fineradstructure - did you try that?

Hello, Yes I have tried that but it doesnt seem to take chromosome information through - so I wanted to try this other format to see if I get a different result.

OK. In that case, I'd maybe contact the authors directly. I think this is quite a niche issue which people here probably won't be able to help you with. Good luck!

Ok thank you for your help :)

0 answers

No answers yet.

Log in to answer this question.