1
$\begingroup$

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
$\endgroup$
4
  • 1
    $\begingroup$ You may want to explore reutils or biomaRt. See this thread on biostars: biostars.org/p/323319 $\endgroup$
    – Ram RS
    Aug 21, 2020 at 19:05
  • $\begingroup$ Thank you. I tried, but I got a strange error message . Query ERROR: caught BioMart::Exception::Usage: Filter NA NOT FOUND $\endgroup$ Aug 21, 2020 at 20:38
  • 2
    $\begingroup$ That's not strange - one your inputs is NA. Wrap the input vector with na.omit and you should not see the error. $\endgroup$
    – Ram RS
    Aug 21, 2020 at 22:48
  • 1
    $\begingroup$ Thank you! I understand it. $\endgroup$ Aug 22, 2020 at 0:26

0

Your Answer

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

Browse other questions tagged or ask your own question.