I have ~500,000 rsids - but want which chromosome each SNP resides on. How can I do this?

MarkerName A1 A2 
rs2326918 a g 
rs7929618 c g 
rs66941928 t c 

I want the chromosome number associated with each MarkerName. So the output would be like this:

MarkerName A1 A2 Chr
rs2326918 a g     6 
rs7929618 c g     6
rs66941928 t c    6

How can i do this?

  • 2
    $\begingroup$ Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. $\endgroup$
    – Community Bot
    Commented Jul 14, 2022 at 13:22
  • $\begingroup$ Thanks for the clarification @workhorse $\endgroup$
    – M__
    Commented Jul 14, 2022 at 14:20
  • $\begingroup$ I'd recommend consulting the RefSNP documentation ncbi.nlm.nih.gov/snp/docs/RefSNP_about $\endgroup$ Commented Jul 14, 2022 at 23:50
  • $\begingroup$ @Workhorse thanks for your question. Please consider upvoting/accepting the answer by NiekdeKlein $\endgroup$
    – M__
    Commented Sep 14, 2023 at 12:14

1 Answer 1


Download dbsnp VCF file from https://ftp.ncbi.nih.gov/snp/organisms/human_9606/VCF/. This contains rs IDs and chromosome info (among other info). Can match your rs IDs to the rs IDs in dbsnp VCF, and extract chromosome from there.

See https://www.ncbi.nlm.nih.gov/variation/docs/human_variation_vcf/ for more information on the dbsnp files.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.