Commit 9521ab27 authored by Konrad Zych's avatar Konrad Zych

summarize_features - better handling of original names

parent 7d764a73
Pipeline #5453 passed with stage
in 28 seconds
......@@ -57,9 +57,9 @@ summarize.features <- function(siamcat, level = "g__",
generaSpVecMap <- generaSpVecMap[!duplicated(generaSpVecMap[,1]),]
summarized <- NULL
for(genus in seq_along(1:nrow(generaSpVecMap))){
for(genus in generaSpVecMap[,1]){
curRows <- feat[which(generaSpVec==genus),]
curRows <- feat[grep(paste0(level,genus),rownames(feat)),]
if(!is.null(dim(curRows))){
......@@ -76,8 +76,8 @@ summarize.features <- function(siamcat, level = "g__",
if (verbose > 2) message("+++ summarized features table contains: ",
nrow(summarized)," features\n")
rownames(summarized) <- unique(generaSpVec)
if(any(rownames(summarized)==""))){
rownames(summarized) <- generaSpVecMap[,1]
if(any(rownames(summarized)=="")){
summarized <- summarized[-which(rownames(summarized)==""),]
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment