Question: Hapmap to vcf
0
gravatar for shinken123
4 months ago by
shinken12380
México
shinken12380 wrote:

Hi all,

I have a hapmap file from tassel and I want to convert it to a vcf. Tassel can convert the file but takes the major allele as the reference and the minor as the alternative.

I want to use the reference genome for the reference alleles and set the alleles different from the reference genome as the alternative. I also tried GATK but it gives me the error NULL alleles are not supported.

My hapmap file looks like this and is tab deleimited:

rs# alleles chrom   pos strand  assembly#   center  protLSID    assayLSID   panelLSID   QCcode  sample1 sample2 sample3 sample4 sample5 sample6 sample7 
S1_134  C/T 1   134 +   N   N   N   N   N   N   C   C   C   N   N   C   C   
S1_204  G/A 1   204 +   N   N   N   N   N   N   G   G   R   N   N   G   G   
S1_340  C/T 1   340 +   N   N   N   N   N   N   C   C   C   N   N   C   C   
S1_477  C/T 1   477 +   N   N   N   N   N   N   C   C   Y   N   C   C   C

There is a tool to perform what I want?

Best,

Eric

convert hapmap vcf • 322 views
ADD COMMENTlink modified 4 months ago by RamRS20k • written 4 months ago by shinken12380

I want to use the reference genome for the reference alleles and set the alleles different from the reference genome as the alternative.

You can correct this using bcftools +fixref:

$ bcftools +fixref input.vcf -Ov -o output.vcf -- -f genome.fa -m flip

fin swimmer

ADD REPLYlink written 4 months ago by finswimmer9.8k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 875 users visited in the last hour