<p>Download dbsnp VCF file from <a href="https://ftp.ncbi.nih.gov/snp/organisms/human_9606/VCF/" rel="nofollow noreferrer">https://ftp.ncbi.nih.gov/snp/organisms/human_9606/VCF/</a>. 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.</p>
<p>See <a href="https://www.ncbi.nlm.nih.gov/variation/docs/human_variation_vcf/" rel="nofollow noreferrer">https://www.ncbi.nlm.nih.gov/variation/docs/human_variation_vcf/</a> for more information on the dbsnp files.</p>

CC BY-SA 4.0
2022-07-25T10:49:30.223Z
2022-07-25T10:49:30.223Z
Niek de Klein
<p>I have ~500,000 rsids - but want which chromosome each SNP resides on. How can I do this?</p>
<pre><code>MarkerName A1 A2 
rs2326918 a g 
rs7929618 c g 
rs66941928 t c 
</code></pre>
<p>I want the chromosome number associated with each MarkerName. So the output would be like this:</p>
<pre><code>MarkerName A1 A2 Chr
rs2326918 a g     6 
rs7929618 c g     6
rs66941928 t c    6
</code></pre>
<p>How can i do this?</p>

CC BY-SA 4.0
2022-07-14T13:22:50.617Z
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.
Community
CC BY-SA 4.0
2022-07-14T14:20:53.463Z
Thanks for the clarification @workhorse
M__
CC BY-SA 4.0
2022-07-14T23:50:10.770Z
I'd recommend consulting the RefSNP documentation https://www.ncbi.nlm.nih.gov/snp/docs/RefSNP_about/
Maximilian Press
CC BY-SA 4.0
2023-09-14T12:14:29.713Z
@Workhorse thanks for your question. Please consider upvoting/accepting the answer by NiekdeKlein
M__
<bioconductor>
Retrieve chromosome number with just RSID?
# Retrieve chromosome number with just RSID?

(Asked by: username_0 on 2022-07-14)

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?

**Tags:** bioconductor
> **Comments:**
> **username_1**: 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.  
> **username_2**: Thanks for the clarification @workhorse  
> **username_3**: I'd recommend consulting the RefSNP documentation https://www.ncbi.nlm.nih.gov/snp/docs/RefSNP_about/  
> **username_2**: @Workhorse thanks for your question. Please consider upvoting/accepting the answer by NiekdeKlein  

---

## 1 answers

### Answer by username_4 on 2022-07-25. Score: 2

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.


---

