From 27b72df0d13428ab6e9b992967cfa87a5db8fdf6 Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Fri, 20 May 2016 19:42:12 +0200 Subject: [PATCH] Patch the resolution function --- .gitignore | 1 + R/resolution.R | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e4e41cd..509c65c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /man/ +.Rproj.user diff --git a/R/resolution.R b/R/resolution.R index ebc606d..ac6fe78 100644 --- a/R/resolution.R +++ b/R/resolution.R @@ -7,8 +7,8 @@ NULL 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) + function(x) lowest.common.ancestor(taxonomy,x)) + r = taxonomicrank(taxonomy,l$x) names(r)=as.character(l$barcode) return(r[as.character(ecopcr$sequence)])