From 2ee7bb83655b651a8b146a1c22cbb638e64267c1 Mon Sep 17 00:00:00 2001 From: Will Nickols Date: Tue, 27 Dec 2022 08:52:03 -0600 Subject: [PATCH] Update merge_tax_and_abundance.R --- assembly_tasks/merge_tax_and_abundance.R | 4 ---- 1 file changed, 4 deletions(-) diff --git a/assembly_tasks/merge_tax_and_abundance.R b/assembly_tasks/merge_tax_and_abundance.R index 6215198..e2c3cda 100644 --- a/assembly_tasks/merge_tax_and_abundance.R +++ b/assembly_tasks/merge_tax_and_abundance.R @@ -130,10 +130,6 @@ mapped_props <- as.data.frame(mapped_props) mapped_props$prop <- as.numeric(as.character(mapped_props$prop)) for (ID in mapped_props$ID) { - if (mapped_props$prop[mapped_props$ID==ID] == 0 ) { - total_profile[,'new'] <- rep(0, nrow(total_profile)) - colnames(total_profile)[colnames(total_profile)=="new"] <- ID - } total_profile[,ID] <- total_profile[,ID] * mapped_props$prop[mapped_props$ID==ID] total_profile[total_profile$Taxonomy=="UNKNOWN", ID] <- total_profile[total_profile$Taxonomy=="UNKNOWN", ID] + 100 * (1-mapped_props$prop[mapped_props$ID==ID])