From 90800058b35fce52bec810205424db4840b58201 Mon Sep 17 00:00:00 2001 From: Liam Fitzstevens <71883978+liamfitzstevens@users.noreply.github.com> Date: Tue, 20 Aug 2024 18:42:27 -0400 Subject: [PATCH] Update mg_profiling.R --- R/mg_profiling.R | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/R/mg_profiling.R b/R/mg_profiling.R index f94cc45..079352e 100644 --- a/R/mg_profiling.R +++ b/R/mg_profiling.R @@ -27,14 +27,14 @@ read_bracken = function(infile, nrows=Inf, keep_frac=TRUE, } dt = data.table::fread(infile, sep='\t', nrows=nrows, check.names=TRUE, nThread=nThread, ...) %>% - tidytable::select.(-taxIDs, -ends_with(!!to_rm)) %>% - tidytable::mutate.(taxonomy = gsub(';[pcofgs]__', ';', taxonomy), + tidytable::select(-taxIDs, -ends_with(!!to_rm)) %>% + tidytable::mutate(taxonomy = gsub(';[pcofgs]__', ';', taxonomy), taxonomy = gsub('^d__', '', taxonomy)) %>% - tidytable::separate.(taxonomy, tax_levs, sep=';') %>% - tidytable::pivot_longer.(cols=ends_with(!!to_keep), + tidytable::separate(taxonomy, tax_levs, sep=';') %>% + tidytable::pivot_longer(cols=ends_with(!!to_keep), names_to='Sample', values_to='Abundance') %>% - tidytable::mutate.(Sample = gsub('(_frac|_num)$', '', Sample)) + tidytable::mutate(Sample = gsub('(_frac|_num)$', '', Sample)) return(dt) }