<p>Hi I have a dataset with chromosome and position.</p>
<pre><code>VARIANT_ID   chromosome position
17_26797415_147499  17  26797415
17_26797556_147500  17  26797556    
</code></pre>
<p>How can I assign rs id using R? This data have more than 500 SNPs.</p>
<hr />
<ul>
<li>Update: <a href="https://www.ensembl.org/info/data/biomart/index.html" rel="nofollow noreferrer">BioMart</a> was used as suggested by @RamRS</li>
<li>'NA NOT FOUND' was a resulting error.</li>
<li>@RamRS recommended inputing <code>na.omit</code> in the input vector</li>
<li>This appear to have resolved the situation</li>
</ul>

CC BY-SA 4.0
2020-08-21T19:05:43.187Z
You may want to explore reutils or biomaRt. See this thread on biostars: https://www.biostars.org/p/323319/
Ram RS
CC BY-SA 4.0
2020-08-21T20:38:20.727Z
Thank you. I tried, but I got a strange error message .
Query ERROR: caught BioMart::Exception::Usage: Filter NA NOT FOUND
susuauidikd
CC BY-SA 4.0
2020-08-21T22:48:04.047Z
That's not strange - one your inputs is NA. Wrap the input vector with `na.omit` and you should not see the error.
Ram RS
CC BY-SA 4.0
2020-08-22T00:26:48.347Z
Thank you! I understand it.
susuauidikd
<r><variants>
About getting rs id from chromosome and position
# About getting rs id from chromosome and position

(Asked by: username_0 on 2020-08-21)

Hi I have a dataset with chromosome and position.
VARIANT_ID   chromosome position
17_26797415_147499  17  26797415
17_26797556_147500  17  26797556    

How can I assign rs id using R? This data have more than 500 SNPs.


Update: BioMart was used as suggested by @RamRS
'NA NOT FOUND' was a resulting error.
@RamRS recommended inputing na.omit in the input vector
This appear to have resolved the situation

**Tags:** r, variants
> **Comments:**
> **username_1**: You may want to explore reutils or biomaRt. See this thread on biostars: https://www.biostars.org/p/323319/  
> **username_0**: Thank you. I tried, but I got a strange error message . Query ERROR: caught BioMart::Exception::Usage: Filter NA NOT FOUND  
> **username_1**: That's not strange - one your inputs is NA. Wrap the input vector with `na.omit` and you should not see the error.  
> **username_0**: Thank you! I understand it.  

---

## 0 answers

