2016-01-13 10:23:54 +01:00
|
|
|
#'@import ROBITaxonomy
|
|
|
|
#'@include ROBIBarcodes.R
|
|
|
|
NULL
|
|
|
|
|
|
|
|
|
|
|
|
#'@export
|
|
|
|
resolution = function(taxonomy,ecopcr) {
|
|
|
|
l = aggregate(ecopcr$taxid,
|
|
|
|
by=list(barcode=ecopcr$sequence),
|
2016-05-20 19:42:12 +02:00
|
|
|
function(x) lowest.common.ancestor(taxonomy,x))
|
|
|
|
r = taxonomicrank(taxonomy,l$x)
|
2016-01-13 10:23:54 +01:00
|
|
|
names(r)=as.character(l$barcode)
|
|
|
|
|
|
|
|
return(r[as.character(ecopcr$sequence)])
|
|
|
|
}
|