This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Add rsid to LD output from vcftools

Hi,

I have generated an LD file using 1000Genomes data and vcftools, the output looks like this:

CHR    POS1    POS2    N_INDV    R^2
8    10422    478479    1092    1
8    31112    362524    1092    1
8    31112    399048    1092    1
8    31112    486796    1092    1
8    39995    400169    1092    1
8    66822    147206    1092    0.627054
8    66822    151755    1092    0.525159
8    66822    152156    1092    0.613962
8    66822    154878    1092    0.623578

Is there any automatic way to add a column corresponding to the rsID? the file is huge because I have calculated the pairwise LD in a window of 500kb and only filtering for r2 (only SNPs with r2 > 0.5 are reported)

Thanks

vcf snp ld vcftools

1 answer

you can try intersecting first 3 columns with dbsnp vcf with bedtools.

Log in to answer this question.