# NOT RUN {
id <- c("9031", "9823", "9606", "9470")
id_class <- classification(id, db = 'ncbi')
lowest_common(id[2:4], db = "ncbi")
lowest_common(id[2:4], db = "ncbi", low_rank = 'class')
lowest_common(id[2:4], db = "ncbi", low_rank = 'family')
lowest_common(id[2:4], class_list = id_class)
lowest_common(id[2:4], class_list = id_class, low_rank = 'class')
lowest_common(id[2:4], class_list = id_class, low_rank = 'family')
# COL
taxa <- c('Nycticebus coucang', 'Homo sapiens', 'Sus scrofa')
cls <- classification(taxa, db = "col")
lowest_common(taxa, class_list = cls, db = "col")
lowest_common(get_colid(taxa), class_list = cls)
xx <- get_colid(taxa)
lowest_common(xx, class_list = cls)
# TOL
taxa <- c("Angraecum sesquipedale", "Dracula vampira",
"Masdevallia coccinea")
(cls <- classification(taxa, db = "tol"))
lowest_common(taxa, db = "tol", class_list = cls)
lowest_common(get_tolid(taxa), class_list = cls)
xx <- get_tolid(taxa)
lowest_common(xx, class_list = cls)
spp <- c("Sus scrofa", "Homo sapiens", "Nycticebus coucang")
lowest_common(spp, db = "ncbi")
lowest_common(get_uid(spp))
lowest_common(spp, db = "itis")
lowest_common(get_tsn(spp))
gbifid <- c("2704179", "3119195")
lowest_common(gbifid, db = "gbif")
spp <- c("Poa annua", "Helianthus annuus")
lowest_common(spp, db = "gbif")
lowest_common(get_gbifid(spp))
cool_orchid <- c("Angraecum sesquipedale", "Dracula vampira",
"Masdevallia coccinea")
orchid_ncbi <- get_uid(cool_orchid)
orchid_gbif <- get_gbifid(cool_orchid)
cool_orchids2 <- c("Domingoa haematochila", "Gymnadenia conopsea",
"Masdevallia coccinea")
orchid_itis <- get_tsn(cool_orchids2)
orchid_hier_ncbi <- classification(orchid_ncbi, db = 'ncbi')
orchid_hier_gbif <- classification(orchid_gbif, db = 'gbif')
orchid_hier_itis <- classification(orchid_itis, db = 'itis')
lowest_common(orchid_ncbi, low_rank = 'class')
lowest_common(orchid_ncbi, class_list = orchid_hier_ncbi,
low_rank = 'class')
lowest_common(orchid_gbif, low_rank = 'class')
lowest_common(orchid_gbif, orchid_hier_gbif, low_rank = 'class')
lowest_common(get_uid(cool_orchid), low_rank = 'class')
lowest_common(get_uid(cool_orchid), low_rank = 'family')
lowest_common(orchid_ncbi, class_list = orchid_hier_ncbi,
low_rank = 'subfamily')
lowest_common(orchid_gbif, class_list = orchid_hier_gbif,
low_rank = 'subfamily')
lowest_common(orchid_itis, class_list = orchid_hier_itis,
low_rank = 'class')
## Pass in sci. names
nms <- c("Angraecum sesquipedale", "Dracula vampira", "Masdevallia coccinea")
lowest_common(x = nms, db = "ncbi")
lowest_common(x = nms, db = "gbif")
# lowest_common(x = nms, db = "itis")
## NAs due to taxon not found, stops with error message
# lowest_common(orchid_itis, db = "itis")
# lowest_common(get_tsn(cool_orchid))
# }
Run the code above in your browser using DataLab