Initial commit
This commit is contained in:
15
R/resolution.R
Normal file
15
R/resolution.R
Normal file
@@ -0,0 +1,15 @@
|
||||
#'@import ROBITaxonomy
|
||||
#'@include ROBIBarcodes.R
|
||||
NULL
|
||||
|
||||
|
||||
#'@export
|
||||
resolution = function(taxonomy,ecopcr) {
|
||||
l = aggregate(ecopcr$taxid,
|
||||
by=list(barcode=ecopcr$sequence),
|
||||
function(x) lowest.common.ancestor(taxo,x))
|
||||
r = taxonomicrank(taxo,l$x)
|
||||
names(r)=as.character(l$barcode)
|
||||
|
||||
return(r[as.character(ecopcr$sequence)])
|
||||
}
|
Reference in New Issue
Block a user