0

I'm pretty novice in using R. I'm facing a problem that I used ontological codes in collecting my data (ICD-10, NCBITaxon and CHEBI).

My data is in a long format:

   ID    Disease  Organism        Antibiotic 
1  654   N18.0    NCBITaxon:1280  CHEBI:8232 
2 1122   C92.0    NCBITaxon:28037 CHEBI:43968 

How can I replace the coded ontology with the corresponding meanings?

Peyman Mohamadpour
  • 17,954
  • 24
  • 89
  • 100

1 Answers1

0

I'm not an expert, so I don't know if my advises are useful. R is a big community so there is many initiatives to create packages. The two packages where I guid may help you. I think that for a more useful help you should search a bit by yourself and when you have precise enought questions we can answer them. For the moment, the only advises I can give you are the packages above :

install.packages('icd')

library('icd')
library(magrittr)

For more help look their.

For taxon look at this :

install.packages( "taxize")
library(taxize)
genbank2uid(id = 1280)
genbank2uid(id = 28037)

For Chebi have a look here.

I hope it helps.

Rémi Coulaud
  • 1,684
  • 1
  • 8
  • 19
  • 1
    Here's a partial solution based on what @Rémi Coulau offered. `code_data %>% mutate(Disease_name = icd::explain_code(Disease)) ` – markhogue Dec 22 '19 at 05:21