Question: How can you update position field in a VCF?
0
gravatar for rshoobs
7 weeks ago by
rshoobs10
rshoobs10 wrote:

I am attempting to LiftOver a set of vcf files from hg19 to hg38. I attempted to use the picard LiftOverVCF tool developed by the broad institute, however I have found that the amount of required RAM is large and is not feasible on my machine. Instead I have extracted my set of SNPs from my vcf file and used standard LiftOver to get the hg38 positions of my SNPs. Is there a way I could update this information in my VCF file? I've looked into bcftools annotate but it seems to only edit the ID, QUAL, FILTER, INFO and FORMAT fields. The other option is to convert all the files to a more accessible format, update them there and then either convert back to vcf or continue to process them in that manner.

gene • 88 views
ADD COMMENTlink written 7 weeks ago by rshoobs10

I'm not aware of an application that directly modifies the positions of the variants (alignment of indels excluded), but I'd be interested in hearing if anyone else has.

If it were me, I'd simply process the VCFs as text (it's delimited after the header), looking for a chromosome/pos/ref/alt combination, and modify the position accordingly. There are a number of ways to do this using standard Unix tools, Python, R, Perl, etc.

ADD REPLYlink written 7 weeks ago by Brice Sarver3.5k
0
gravatar for jared.andrews07
7 weeks ago by
jared.andrews075.3k
St. Louis, MO
jared.andrews075.3k wrote:

You could also consider splitting your files by chromosome, lifting them over, and then concatenating them all back together. A bit tedious, but gets around the memory issue nicely and prevents you from having to do much thinking in terms of manual data wrangling.

ADD COMMENTlink written 7 weeks ago by jared.andrews075.3k
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: 1321 users visited in the last hour