This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Get rs ids using chromsome coordinates

I have: CHR START END Effect_Allele Ref_Allele columns (hg38)

I want: CHR START END Effect_Allele Ref_Allele RS_ID

I would like to get the SNP rs id using chromosome coordinates, please let me know how I can do this?

Thanks in Advance

rs id chromosome coordinates hg38

You can download dbSNP in VCF format and then use bcftools to extract %CHROM\t%POS\t%REF\t%ALT\t%ID\n as a tab separated file from this VCF. Then, use R (data.table) to join your table to this table withIDs. That's how I'd do it.

Hi, RamRS ~ Thanks for your suggestion. Do you mind sharing the detailed steps and R code?

Yes, I do mind sharing that. Please invest some effort and let us know if you have any specific questions.

Thanks for your advice RamRS. Let me look into that.

  1. Download UCSC vcf (hg 38)
  2. Intersect with bcftools or bed tools for ID column. Both bcftools and bedtools, support tab and vcf formats for intersection.

0 answers

No answers yet.

Log in to answer this question.