Question: Change ALT field in VCF
gravatar for sonia.olaechea
7 months ago by
sonia.olaechea90 wrote:

Hi all,

I have 2 vcf files for the same positions but with different individuals which I would like to merge. However, in one of the files some of my variants have a . in the ALT field, which I would like to replace by the corresponding allele. I've tried to obtain those alternatives alleles from my other vcf which looks apparently correct. I'm using the following command of vcftools:

plink --vcf my.vcf --const-fid 0 --a1-allele ALT.txt 5 3 '#' --recode --out myfile.mod.vcf

ALT.txt contains two columns: SNPID and ALTfield of my other vcf file (I've tried both with and without header). Still, the program says: Error: Fewer tokens than expected on line 1 of --a1-allele file.

I don't know what I'm doing wrong so I would appreciate it if anyone sees something that I'm not seeing or if anyone recommends other tools. Thank you very much in advanced :)

snps gwas vcf • 298 views
ADD COMMENTlink written 7 months ago by sonia.olaechea90

what is the output of

 head ALT.txt


file ALT.txt
ADD REPLYlink written 7 months ago by Pierre Lindenbaum122k
head ALT.txt 
rs10032042      G
rs10174691      C
rs10221923      G
rs10223644      G
rs1028771       C
rs10305678      G
rs10404081      G
rs10421281      C
rs1042478       G
rs10459252      C`

file ALT.txt 
file ALT.txt: ASCII text`
ADD REPLYlink modified 7 months ago • written 7 months ago by sonia.olaechea90
Please log in to add an answer.


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