SplinectomeR Enables Group Comparisons in Longitudinal Microbiome Studies https://www.frontiersin.org/articles/10.3389/fmicb.2018.00785/full

“SplinectomeR’s implementation is straightforward and complements recently developed mixed-effects models that are used for discovering differentiating taxa (Chen and Li, 2016). At the core of the tests is the loess spline that uses weighted local polynomials to model data that may not follow any classical model or shape (as is common in real biological data) (Cleveland, 1979; Cleveland and Devlin, 1988). Null distributions are generated by permutation of the data, similar to methods implemented in multivariate tests such as PERMANOVA (Anderson, 2001).”

library(plyr)
library(dplyr)
library(tibble)
library(ggplot2)
library(reshape2)
library(tidyr)
library(splinectomeR)
library(vegan)
library(cowplot)
library(phyloseq)
library(file2meco)
library(microeco)
library(magrittr)
library(DT)

set.seed(11)  # For reproducibility

range01 <- function(x){(x-min(x))/(max(x)-min(x))}

permutations <- 999

I modified the original script slightly so that it would stop trimming 5% off each end.

permuspliner_full <- function(data = NULL, xvar = NULL, yvar = NULL, category = NULL,
                         cases = NULL, groups = NA, perms = 999, retain_perm = TRUE,
                         test_direction = 'more', cut_low = NA,
                         ints = 1000, quiet = FALSE, cut_sparse = 4, ...) {
  
  suppargs <- list(...)
  if ("set_spar" %in% names(suppargs)) {
    set_spar = as.numeric(suppargs$set_spar)
  } else {set_spar <- NULL}
  
  if ("set_tol" %in% names(suppargs)) {
    set_tol = as.numeric(suppargs$set_tol)
  } else {set_tol <- 1e-4}
  
  if ("pmethod" %in% names(suppargs)) {
    pmethod = as.character(suppargs$pmethod)
  } else {pmethod <- 'loess'}
  
  # reqs = c(data, category, xvar, yvar, cases)
  if (missing(data) | missing(category) | missing(xvar) | missing(yvar) | missing(cases)) {
    stop('Missing required parameter(s). Run ?permuspliner to see help docs')
  }
  
  if ((test_direction == 'more' | test_direction == 'less') == FALSE) {
    stop('Error in test direction option: must be either "more" or "less"')
  }
  
  perms = as.numeric(perms)
  ints = as.numeric(ints)
  cases = as.character(cases)
  groups = as.character(groups)
  
  in_df <- data
  # Determine the two groups to compare
  if (is.na(groups[1])) {
    if (length(unique(in_df[, category])) > 2) {
      stop('More than two groups in category column. Define groups with (groups = c("Name1","Name2"))')
    }
    v1 <- as.character(unique(in_df[, category])[1])
    v2 <- as.character(unique(in_df[, category])[2])
  } else {
    v1 <- as.character(groups[1])
    v2 <- as.character(groups[2])
  }
  # Trim data if some cases have too few observations
  if (!is.na(cut_low)) {
    cut_low <- as.numeric(cut_low)
    keep_ids <- data.frame(table(in_df[, cases]))
    keep_ids <- as.character(keep_ids[keep_ids$Freq > cut_low, ]$Var1)
    in_df <- in_df[in_df[, cases] %in% keep_ids, ]
  }
  if (quiet == FALSE) {
    cat(paste('\nGroups detected:', v1, 'and', v2, '.\n'))
    cat(paste('\nNow testing between variables', v1, 'and', v2, 'for a difference in the response labeled', yvar, '\n'))
    cat(paste('\nScalpel please: performing permusplinectomy with', perms, 'permutations...\n'))
  }
  
  # The experimentally reported response
  df_v1 <- in_df[in_df[, category] %in% c(v1) & !is.na(in_df[, xvar]), ]
  df_v2 <- in_df[in_df[, category] %in% c(v2) & !is.na(in_df[, xvar]), ]
  if (length(df_v1[, xvar]) < cut_sparse | length(df_v2[, xvar]) < cut_sparse) {
    stop('Not enough data in each group to fit spline')
  }
  # Prevent issues arising from identical case labels across groups
  if (length(intersect(df_v1[, cases], df_v2[, cases])) > 0) {
    stop('\nIt appears there may be identically labeled cases in both groups.\n
         ...Please ensure that the cases are uniquely labeled between the two groups\n')
  }
  # Fit the splines for each group
  if (pmethod=='cubic') {
    df_v1_spl <- with(df_v1,
                      smooth.spline(x=df_v1[, xvar], y=df_v1[, yvar],
                                    spar = set_spar, tol = set_tol))
    df_v2_spl <- with(df_v2,
                      smooth.spline(x=df_v2[, xvar], y=df_v2[, yvar],
                                    spar = set_spar, tol = set_tol))
  } else if (pmethod == 'loess') {
    testform <- reformulate(termlabels = xvar, response = yvar)
    if (is.null(set_spar)) {
      df_v1_spl <- with(df_v1, loess(testform, data=df_v1))
      df_v2_spl <- with(df_v2, loess(testform, data=df_v2))
    } else {
      df_v1_spl <- with(df_v1, loess(testform, data=df_v1, span = set_spar))
      df_v2_spl <- with(df_v2, loess(testform, data=df_v2, span = set_spar))
    }
  }
  x0 <- max(c(min(df_v1_spl$x)), min(df_v2_spl$x))
  x1 <- min(c(max(df_v1_spl$x)), max(df_v2_spl$x))
  #x0 <- x0 + ((x1 - x0) * 0.1)  # Trim the first and last 10% to avoid low-density artifacts , removed
  #x1 <- x1 - ((x1 - x0) * 0.1)
  xby <- (x1 - x0) / (ints - 1)
  xx <- seq(x0, x1, by = xby)  # Set the interval range
  v1_spl_f <- data.frame(predict(df_v1_spl, xx))  # Interpolate across the spline
  if (ncol(v1_spl_f)==1) v1_spl_f <- cbind(xx,v1_spl_f)
  colnames(v1_spl_f) <- c('x', 'var1')
  v2_spl_f <- data.frame(predict(df_v2_spl, xx))
  if (ncol(v2_spl_f)==1) v2_spl_f <- cbind(xx,v2_spl_f)
  colnames(v2_spl_f) <- c('x', 'var2')
  real_spl_dist <- merge(v1_spl_f, v2_spl_f, by = 'x')
  real_spl_dist$abs.distance <- abs(real_spl_dist$var1 - real_spl_dist$var2)  # Measure the real group distance
  real_area <- sum(real_spl_dist$abs.distance) / ints  # Calculate the area between the groups
  if (quiet == FALSE) {
    cat(paste('\nArea between groups successfully calculated, now spinning up permutations...\n'))
  }
  # Define the permutation function
  case_shuff <- 'case_shuff'  # Dummy label
  .spline_permute <- function(randy) {
    randy_meta <- randy[!duplicated(randy[, cases]), ]  # Pull out the individual IDs
    randy_meta$case_shuff <- sample(randy_meta[, category])  # Shuffle the labels
    randy_meta <- randy_meta[, c(cases, case_shuff)]
    randy <- merge(randy, randy_meta, by = cases, all = T)
    randy_v1 <- randy[randy[, case_shuff] %in% c(v1) & !is.na(randy[, xvar]), ]
    randy_v2 <- randy[randy[, case_shuff] %in% c(v2) & !is.na(randy[, xvar]), ]
    # Fit the splines for the permuted groups
    if (pmethod == 'cubic') {
      randy_v1_spl <- with(randy_v1,
                           smooth.spline(x=randy_v1[, xvar], y=randy_v1[, yvar],
                                         spar = set_spar, tol = set_tol))
      randy_v2_spl <- with(randy_v2,
                           smooth.spline(x=randy_v2[, xvar], y=randy_v2[, yvar],
                                         spar = set_spar, tol = set_tol))
    } else if (pmethod == 'loess') {
      if (is.null(set_spar)) {
        randy_v1_spl <- with(randy_v1, loess(testform, data=randy_v1))
        randy_v2_spl <- with(randy_v2, loess(testform, data=randy_v2))
      } else {
        randy_v1_spl <- with(randy_v1, loess(testform, data=randy_v1, span = set_spar))
        randy_v2_spl <- with(randy_v2, loess(testform, data=randy_v2, span = set_spar))
      }
    }
    randy_v1_fit <- data.frame(predict(randy_v1_spl, xx))
    if (ncol(randy_v1_fit)==1) randy_v1_fit <- cbind(xx,randy_v1_fit)
    colnames(randy_v1_fit) <- c('x', 'var1')
    randy_v2_fit <- data.frame(predict(randy_v2_spl, xx))
    if (ncol(randy_v2_fit)==1) randy_v2_fit <- cbind(xx,randy_v2_fit)
    colnames(randy_v2_fit) <- c('x', 'var2')
    spl_dist <- merge(randy_v1_fit, randy_v2_fit, by = 'x')
    spl_dist$abs_distance <- abs(spl_dist$var1 - spl_dist$var2)  # Calculate the distance between permuted groups
    if (retain_perm == TRUE) {
      transfer_perms <- spl_dist[, 2:4]
      colnames(transfer_perms) <- c(paste0('v1perm_',ix),
                                    paste0('v2perm_',ix),
                                    paste0('pdistance_',ix))
      if (ix > 1) perm_retainer <- perm_output$perm_retainer
      perm_retainer <- cbind(perm_retainer, transfer_perms)
      perm_output$perm_retainer <- perm_retainer
      perm_area <- sum(spl_dist$abs_distance, na.rm = T) / sum(!is.na(spl_dist$abs_distance))  # Calculate the area between permuted groups
      
      if (ix > 1) permuted <- perm_output$permuted
      permuted <- append(permuted, perm_area)
      perm_output$permuted <- permuted
      return(perm_output)
    } else if (retain_perm == FALSE) {
      # print(summary(xx))
      # spl_dist$abs_distance <- abs(spl_dist$var1 - spl_dist$var2)
      perm_area <- sum(spl_dist$abs_distance, na.rm = T) / sum(!is.na(spl_dist$abs_distance))
      permuted <- append(permuted, perm_area)
      return(permuted)
    }
  }
  
  # Run the permutation over desired number of iterations
  in_rand <- rbind(df_v1, df_v2)
  permuted <- list()
  if (retain_perm == TRUE) {
    perm_output <- list()
    perm_retainer <- data.frame(row.names = xx)
    for (ix in 1:perms) {
      perm_output <- .spline_permute(randy = in_rand)
    }
    if (quiet == FALSE) {
      cat(paste('...permutations completed...\n'))
    }
    if (test_direction == 'more') {
      pval <- (sum(perm_output$permuted >= as.numeric(real_area)) + 1) / (perms + 1)
    } else if (test_direction == 'less') {
      pval <- (sum(perm_output$permuted <= as.numeric(real_area)) + 1) / (perms + 1)
    }
  } else if (retain_perm == FALSE) {
    permuted <- replicate(perms, 
                          .spline_permute(randy = in_rand))
    if (quiet == FALSE) {
      cat(paste('...permutations completed...\n'))
    }
    if (test_direction == 'more') {
      pval <- (sum(permuted >= as.numeric(real_area)) + 1) / (perms + 1)
    } else if (test_direction == 'less') {
      pval <- (sum(permuted <= as.numeric(real_area)) + 1) / (perms + 1)
    }
  }
  
  # Return the p-value
  if (quiet == FALSE) {
    cat(paste('\np-value =', round(pval, digits = 5), '\n\n'))
  }
  # Return the filtered data used for the splines and permutations
  v1_data <- df_v1; v2_data <- df_v2
  v1_data[, category] <- droplevels(factor(v1_data[, category]))
  v2_data[, category] <- droplevels(factor(v2_data[, category]))
  
  # Return the results list
  if (retain_perm == TRUE) {
    result <- list("pval" = pval, "category_1" = v1, "category_2" = v2,
                   "v1_interpolated" = v1_spl_f, "v2_interpolated" = v2_spl_f,
                   "v1_spline" = df_v1_spl, "v2_spline" = df_v2_spl,
                   "permuted_splines" = perm_output$perm_retainer,
                   "true_distance" = real_spl_dist,
                   "v1_data" = v1_data, "v2_data" = v2_data)
  } else if (retain_perm == FALSE) {
    result <- list("pval" = pval,
                   "v1_interpolated" = v1_spl_f, "v2_interpolated" = v2_spl_f,
                   "v1_spline" = df_v1_spl, "v2_spline" = df_v2_spl,
                   "v1_data" = v1_data, "v2_data" = v2_data)
  }
  if (quiet == FALSE) {
    cat(paste('To visualize your results, try the following command, where "data" is your results object:'))
    cat(paste0('\npermuspliner.plot.permdistance(data, xlabel="', xvar,'")'))
    if (retain_perm == TRUE) {
      cat(paste0('\nor\npermuspliner.plot.permsplines(data, xvar="', xvar, '", yvar="', yvar, '")'))
    }
  }
  return(result)
}

Load the Data

## combine the abundance CSV files created in microeco

ps <- readRDS("C:/Congo/psCongo_V4.rds")

samples <- subset_samples(ps, Type=="sample")

## remove the following three samples. Subsetting for longitudinal is done by "timepoint", so it includes these three samples but they are not included in the ancom bc analysis because those samples are done by 6w, 6M or 3M checkup visits.
samples = subset_samples(samples, sampleId != "G37_PT1") 
samples = subset_samples(samples, sampleId != "G12_MV1")
samples = subset_samples(samples, sampleId != "G20_MV1")

dataset <- phyloseq2meco(samples)

dataset$tidy_dataset()

dataset$tax_table %<>% base::subset(Kingdom == "k__Archaea" | Kingdom == "k__Bacteria")

dataset$filter_pollution(taxa = c("mitochondria", "chloroplast"))
dataset$tidy_dataset()

dataset$cal_abund()

dataset$save_abund(dirpath = "C:/Congo/taxa_abund") ## set the path to store the abundance files

spe <- read.csv("C:/Congo/taxa_abund/Species_abund.csv", header = TRUE, sep=",")

metadata <- read.csv("C:/Congo/Congo_metadata_V4.csv", header = TRUE, sep=",")

names(metadata)[names(metadata) == "Individual"] <- "baby_id"
names(metadata)[names(metadata) == "X5_WeeksOld"] <- "timepoint"
names(metadata)[names(metadata) == "sampleId"] <- "sampleID"
metadata$sampleID_weeks <- paste(metadata$baby_id,metadata$timepoint, sep="_")
metadata <- metadata[!(metadata$baby_id=="MC"),]
metadata <- metadata[!(metadata$Type=="sequencereplicate"),]
metadata <- metadata[!(metadata$Type=="extractionreplicate"),]
metadata <- metadata[!(metadata$sampleID=="G12_PT1"),] ## remove 
metadata <- metadata[!(metadata$sampleID=="G7_MV2"),] ## 
metadata <- metadata[(metadata$timepoint=="6" | metadata$timepoint=="12" | metadata$timepoint=="24"),] 

## altered here for the composite data #############################################################

scores <- read.csv(file="C:/Congo/final_maternal_stress_scores_20220131.csv", header = TRUE, sep=",")
#scores <- scores[,-1]
names(scores)[names(scores) == "id"] <- "Individual"

scores <- scores[scores$Individual != "G6", ]
scores <- scores[scores$Individual != "G18", ] 
scores <- scores[scores$Individual != "G32", ] 
scores <- scores[scores$Individual != "G44", ]
scores <- scores[scores$Individual != "G49",]

scaledscores <- scores
scaledscores$general_trauma <- range01(scores$general_trauma)
scaledscores$sexual_events <- range01(scores$sexual_events)
scaledscores$stress <- range01(scores$stress)
scaledscores$ptsd <- range01(scores$ptsd)
scaledscores$violence <- range01(scores$violence)
scaledscores$depression <- range01(scores$depression)
scaledscores$coping <- range01(scores$coping)
scaledscores$anxiety <- range01(scores$anxiety)
scaledscores$pregnancy <- range01(scores$pregnancy)

scaledscores$Composite <- scaledscores$general_trauma + scaledscores$sexual_events + scaledscores$anxiety + scaledscores$depression + scaledscores$ptsd + scaledscores$stress + scaledscores$violence + scaledscores$pregnancy


## and add it into the main dataset too!
dataset$sample_table <- merge(dataset$sample_table, scaledscores, by="Individual", all.x=TRUE)
row.names(dataset$sample_table) <- dataset$sample_table$sampleId

dataset$tidy_dataset()

Composite_categorical<- arules::discretize(scaledscores[,11], method="cluster", breaks = 2, labels = c("Low", "High"))
table(Composite_categorical)
## Composite_categorical
##  Low High 
##   26   21
scores$Composite_categorical <- as.factor(Composite_categorical) ## appends sample table

dataset$sample_table <- merge(dataset$sample_table, scores[,c(10,11)], by="Individual", all.x=TRUE)
row.names(dataset$sample_table) <- dataset$sample_table$sampleId

metadata$Individual <- metadata$baby_id

metadata <- merge(metadata, scores[,c(10,11)], by="Individual", all.x=TRUE)
row.names(metadata) <- metadata$sampleID

metadata <- metadata %>% relocate(Composite_categorical, .before = Malaria)

Custom function to get summarized data https://rrshieldscutler.github.io/splinectomeR/

# Define a function for all the tedious flipping, splitting, and merging
flip_split_merge <- function(otus_in, metadata) {
  row.names(otus_in) <- otus_in$OTU_ID
  otus_in$OTU_ID <- NULL
  otus_in <- data.frame(t(otus_in))
  otus_in <- tibble::rownames_to_column(otus_in, var = 'sampleID')
  otus_split <- otus_in %>% separate(sampleID, c('baby_id', 'sampletime'), sep = '_')
  #otus_split$timepoint <- as.numeric(otus_split$timepoint)  # Trouble recognizing numbers
  row.names(otus_split) <- otus_in$sampleID
  otus_split <- rownames_to_column(otus_split, var = 'sampleID')
  otus_meta <- merge(metadata, otus_split, by = 'sampleID')
  #otus_meta <- otus_meta[c('sampleID', setdiff(names(otus_meta), 'sampleID'))]
  return(otus_meta)
}

Species

otus <- spe
names(otus)[names(otus) == "X"] <- "OTU_ID"

otust <- as.data.frame(t(otus))
otust <- otust[-1,]

otust$Composite_categorical <- metadata$Composite_categorical[match(rownames(otust),rownames(metadata))] 
otust$Week <- metadata$Time[match(rownames(otust),rownames(metadata))] 
otus_species <- otus

otus_species_sum <- otus_species
otus_species_sum$f__abun <- rowSums(otus_species[, 2:ncol(otus_species)])
otus_species_sum <- otus_species_sum[c('f__abun',
                                     setdiff(names(otus_species_sum), 'f__abun'))]
otus_species_sum <- otus_species_sum[order(-otus_species_sum$f__abun), ]
species_tax_metadata <- flip_split_merge(otus, metadata)
top_10_species <- otus_species_sum[1:10, 2]
top_10_species <- lapply(top_10_species, FUN = function(x) gsub(x, pattern = '|',
                                                                  replacement = '.',
                                                                  fixed = T))
top_species_meta <- species_tax_metadata %>%
  gather(key = 'species', value = 'relative_abundance', 175:as.numeric(ncol(species_tax_metadata))) %>%
  filter(species %in% top_10_species)
unique(top_species_meta$species)
## [1] "k__Bacteria.p__Actinobacteriota.c__Actinobacteria.o__Bifidobacteriales.f__Bifidobacteriaceae.g__Bifidobacterium.s__longum" 
## [2] "k__Bacteria.p__Proteobacteria.c__Gammaproteobacteria.o__Enterobacterales.f__Enterobacteriaceae.g__Escherichia.s__coli"     
## [3] "k__Bacteria.p__Bacteroidota.c__Bacteroidia.o__Bacteroidales.f__Bacteroidaceae.g__Bacteroides.s__fragilis"                  
## [4] "k__Bacteria.p__Firmicutes.c__Bacilli.o__Lactobacillales.f__Streptococcaceae.g__Streptococcus.s__salivarius"                
## [5] "k__Bacteria.p__Actinobacteriota.c__Actinobacteria.o__Bifidobacteriales.f__Bifidobacteriaceae.g__Bifidobacterium.s__breve"  
## [6] "k__Bacteria.p__Proteobacteria.c__Gammaproteobacteria.o__Enterobacterales.f__Enterobacteriaceae.g__Klebsiella.s__pneumoniae"
## [7] "k__Bacteria.p__Bacteroidota.c__Bacteroidia.o__Bacteroidales.f__Bacteroidaceae.g__Bacteroides.s__vulgatus"                  
## [8] "k__Bacteria.p__Bacteroidota.c__Bacteroidia.o__Bacteroidales.f__Prevotellaceae.g__Prevotella_9.s__"
otus_species_sum[1:10, 1:2]
##      f__abun
## 1  43.271368
## 2   7.333616
## 3   6.861403
## 4   5.666334
## 5   4.310980
## 6   4.224487
## 7   2.726171
## 8   2.693400
## 9   1.882376
## 10  1.662421
##                                                                                                                        OTU_ID
## 1   k__Bacteria|p__Actinobacteriota|c__Actinobacteria|o__Bifidobacteriales|f__Bifidobacteriaceae|g__Bifidobacterium|s__longum
## 2       k__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacterales|f__Enterobacteriaceae|g__Escherichia|s__coli
## 3                    k__Bacteria|p__Bacteroidota|c__Bacteroidia|o__Bacteroidales|f__Bacteroidaceae|g__Bacteroides|s__fragilis
## 4                  k__Bacteria|p__Firmicutes|c__Bacilli|o__Lactobacillales|f__Streptococcaceae|g__Streptococcus|s__salivarius
## 5     k__Bacteria|p__Firmicutes|c__Negativicutes|o__Veillonellales-Selenomonadales|f__Veillonellaceae|g__Veillonella|s__ratti
## 6    k__Bacteria|p__Actinobacteriota|c__Actinobacteria|o__Bifidobacteriales|f__Bifidobacteriaceae|g__Bifidobacterium|s__breve
## 7  k__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacterales|f__Enterobacteriaceae|g__Klebsiella|s__pneumoniae
## 8                    k__Bacteria|p__Bacteroidota|c__Bacteroidia|o__Bacteroidales|f__Bacteroidaceae|g__Bacteroides|s__vulgatus
## 9               k__Bacteria|p__Firmicutes|c__Clostridia|o__Clostridiales|f__Clostridiaceae|g__Clostridium sensu stricto 1|s__
## 10                          k__Bacteria|p__Bacteroidota|c__Bacteroidia|o__Bacteroidales|f__Prevotellaceae|g__Prevotella_9|s__
top_species_meta$relative_abundance <- as.numeric(top_species_meta$relative_abundance)
plot.df <- top_species_meta
plot.df <- separate(plot.df, col = species, sep = 's__', remove = T,
                    into = c('uplevel', 'species'))
plot.df$uplevel <- NULL

plot.df$timepoint <- as.numeric(plot.df$timepoint)
plot.df$relative_abundance <- as.numeric(plot.df$relative_abundance)

ggplot(plot.df, aes(color = species, x = timepoint, y = relative_abundance)) +
  theme_bw() + geom_smooth(method='loess') +
  labs(x = 'weeks', y = 'relative abundance') +
  theme(legend.position = 'right')

top_20_species <- otus_species_sum[, 2]
top_20_species <- lapply(top_20_species, FUN = function(x) gsub(x, pattern = '|',
                                                                  replacement = '.',
                                                                  fixed = T))
species_meta <- species_tax_metadata %>% 
  gather(key = 'species', value = 'relative_abundance', 175:526)# %>%
  #filter(species %in% top_20_species)
# Double check that it worked:
#unique(species_meta$species) ## need to clean this area up a bit 
#otus_species_sum[1:20, 1:2]

species_meta <- species_meta %>% drop_na(Composite_categorical)

#Create a list containing each species's OTU+metadata table
# f_species_pvals <- list()
# for (f in unique(species_meta$species)) {
#   f__df <- species_meta %>% filter(species == f)
#   cat(f)
#   f.result <- permuspliner(data = f__df, xvar = 'timepoint',
#                        yvar = 'relative_abundance', perms = permutations,
#                        category = 'Composite_categorical', cases = 'baby_id.x', quiet = T)
#   cat(paste0(', p = ',f.result$pval,'\n'))
#   f_species_pvals <- append(f_species_pvals, f.result$pval)
# }
# f_species_qvals <- p.adjust(f_species_pvals, method = 'fdr')  # Adjusted p values
# 
# df <- as.data.frame(unique(species_meta$species))
# 
# df$pval <- f_species_pvals
# df$fdr_pval <- f_species_qvals
# df1 <- df[ which(df$fdr_pval < 0.8), ]
# #df1[,c(1,3)]
# datatable(df1,
#           filter = "top",
#           rownames = FALSE,
#           width = '100%',
#           options = list(scrollX = TRUE))
# df <- apply(df,2,as.character)

#write.csv(df, "C:/Congo/longitudinal_species.csv")

6 Weeks, 3 Months and 6 Months

k__Bacteria.p__Firmicutes.c__Bacilli.o__Lactobacillales.f__Lactobacillaceae.g__Lactobacillus.s__gasseri

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Firmicutes.c__Bacilli.o__Lactobacillales.f__Lactobacillaceae.g__Lactobacillus.s__gasseri')
f__species_result <- permuspliner_full(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'Individual', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.232 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

gasseri <- permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'Time',
                              yvar = 'Relative Abundance')

gasseri <- gasseri + labs(title="L. gasseri") + theme(plot.title = element_text(face = "italic"))

gasseri <- gasseri + scale_x_continuous(limits = c(6, 24), breaks=c(6, 12, 24), labels=c("6 Weeks", "3 Months", "6 Months"))

gasseri

f__species.top_species_meta$relative_abundance <- as.numeric(f__species.top_species_meta$relative_abundance)

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

6 Weeks and 3 Months

k__Bacteria.p__Actinobacteriota.c__Actinobacteria.o__Bifidobacteriales.f__Bifidobacteriaceae.g__Bifidobacterium.s__pseudocatenulatum

A healthy or “protective” strain. More present in babies with mother’s who reported lower composite stress.

https://www.nature.com/articles/s41598-017-09395-8

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Actinobacteriota.c__Actinobacteria.o__Bifidobacteriales.f__Bifidobacteriaceae.g__Bifidobacterium.s__pseudocatenulatum')
f__species_result <- permuspliner_full(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.075 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

pseudo <- permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'Time',
                              yvar = 'Relative Abundance')

pseudo <- pseudo +labs(title="B. pseudocatenulatum") + theme(plot.title = element_text(face = "italic")) + theme(legend.position = c(0.8, 0.8)) + guides(color= guide_legend(title='Maternal Composite\nStress Score'))
pseudo

pseudo <- pseudo + scale_x_continuous(limits = c(6, 24), breaks=c(6, 12, 24), labels=c("6 Weeks", "3 Months", "6 Months"))

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Firmicutes.c__Negativicutes.o__Veillonellales-Selenomonadales.f__Veillonellaceae.g__Veillonella.s__dispar

k__Bacteria.p__Firmicutes.c__Negativicutes.o__Veillonellales-Selenomonadales.f__Veillonellaceae.g__Veillonella.s__dispar

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Firmicutes.c__Negativicutes.o__Veillonellales.Selenomonadales.f__Veillonellaceae.g__Veillonella.s__dispar')
f__species_result <- permuspliner_full(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.799 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

dispar <- permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'Time',
                              yvar = 'Relative Abundance')

dispar <- dispar + ggtitle("V. dispar") + theme(plot.title = element_text(face = "italic"))
dispar

dispar <- dispar + scale_x_continuous(limits = c(6, 24), breaks=c(6, 12, 24), labels=c("6 Weeks", "3 Months", "6 Months"))

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Bacteroidota.c__Bacteroidia.o__Bacteroidales.f__Bacteroidaceae.g__Bacteroides.s__ovatus

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Bacteroidota.c__Bacteroidia.o__Bacteroidales.f__Bacteroidaceae.g__Bacteroides.s__ovatus')
f__species_result <- permuspliner_full(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.808 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

ovatus <- permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'Time',
                              yvar = 'Relative Abundance')

ovatus <- ovatus + ggtitle("B. ovatus") + theme(plot.title = element_text(face = "italic"))
#ovatus

ovatus <- ovatus + scale_x_continuous(limits = c(6, 24), breaks=c(6, 12, 24), labels=c("6 Weeks", "3 Months", "6 Months"))

ovatus

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Firmicutes.c__Negativicutes.o__Veillonellales.Selenomonadales.f__Veillonellaceae.g__Megasphaera.s__micronuciformis

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Firmicutes.c__Negativicutes.o__Veillonellales.Selenomonadales.f__Veillonellaceae.g__Megasphaera.s__micronuciformis')
f__species_result <- permuspliner_full(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.384 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

micronu <- permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'Time',
                              yvar = 'Relative Abundance')

micronu <- micronu + ggtitle("M. micronuciformis") + theme(plot.title = element_text(face = "italic"))
micronu

micronu <- micronu + scale_x_continuous(limits = c(6, 24), breaks=c(6, 12, 24), labels=c("6 Weeks", "3 Months", "6 Months"))

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Firmicutes.c__Clostridia.o__Oscillospirales.f__Oscillospiraceae.g__Flavonifractor.s__plautii

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Firmicutes.c__Clostridia.o__Oscillospirales.f__Oscillospiraceae.g__Flavonifractor.s__plautii')
f__species_result <- permuspliner_full(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.033 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

plautii <- permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'Time',
                              yvar = 'Relative Abundance')

plautii <- plautii + ggtitle("F. plautii") + theme(plot.title = element_text(face = "italic"))

plautii

plautii <- plautii + scale_x_continuous(limits = c(6, 24), breaks=c(6, 12, 24), labels=c("6 Weeks", "3 Months", "6 Months"))

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

Manuscript Figure

#legend <- get_legend(gasseri)


# fig4<- plot_grid(gasseri + theme(legend.position="none") + theme(axis.title.x = element_blank()),
#                 pseudo + theme(legend.position="none") + theme(axis.title.x = element_blank()) + theme(axis.title.y = element_blank()),
#                 plautii + theme(legend.position = "none") + theme(axis.title.x = element_blank()), 
#                 dispar + theme(legend.position = "none") + theme(axis.title.y = element_blank())  + theme(axis.title.x = element_blank()),
#                 ovatus + theme(legend.position = "none"),
#                 legend,
#                 labels = c("A", "B", "C", "D", "E", ""), ncol=2)

fig4_v3 <- plot_grid(gasseri + theme(legend.position="none") + theme(axis.title.x = element_blank(), axis.text.x=element_blank()), pseudo + theme(axis.title.x = element_blank(), axis.text.x=element_blank()) + theme(axis.title.y = element_blank()), ovatus + theme(legend.position="none") + theme(axis.title.x = element_blank(), axis.text.x=element_blank()),dispar + theme(legend.position = "none") + theme(axis.title.x = element_blank(), axis.text.x=element_blank()) + theme(axis.title.y = element_blank()), micronu + theme(legend.position="none"),  plautii + theme(legend.position="none") + theme(axis.title.y = element_blank()), labels = c("A", "B", "C", "D", "E", "F"), align = "v", ncol=2)

fig4_v3

Only 6 Weeks

k__Bacteria.p__Actinobacteriota.c__Actinobacteria.o__Propionibacteriales.f__Propionibacteriaceae.g__Cutibacterium.s__avidum

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Actinobacteriota.c__Actinobacteria.o__Propionibacteriales.f__Propionibacteriaceae.g__Cutibacterium.s__avidum')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.764 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Firmicutes.c__Bacilli.o__Lactobacillales.f__Enterococcaceae.g__Enterococcus.s__gilvus

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Firmicutes.c__Bacilli.o__Lactobacillales.f__Enterococcaceae.g__Enterococcus.s__gilvus')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.474 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Bacteroidota.c__Bacteroidia.o__Bacteroidales.f__Bacteroidaceae.g__Bacteroides.s__uniformis

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Bacteroidota.c__Bacteroidia.o__Bacteroidales.f__Bacteroidaceae.g__Bacteroides.s__uniformis')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.894 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Firmicutes.c__Bacilli.o__Staphylococcales.f__Staphylococcaceae.g__Staphylococcus.s__haemolyticus

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Firmicutes.c__Bacilli.o__Staphylococcales.f__Staphylococcaceae.g__Staphylococcus.s__haemolyticus')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.66 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Actinobacteriota.c__Actinobacteria.o__Bifidobacteriales.f__Bifidobacteriaceae.g__Bifidobacterium.s__breve

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Actinobacteriota.c__Actinobacteria.o__Bifidobacteriales.f__Bifidobacteriaceae.g__Bifidobacterium.s__breve')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.1 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Firmicutes.c__Bacilli.o__Staphylococcales.f__Staphylococcaceae.g__Staphylococcus.s__epidermidis

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Firmicutes.c__Bacilli.o__Staphylococcales.f__Staphylococcaceae.g__Staphylococcus.s__epidermidis')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.608 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Firmicutes.c__Clostridia.o__Peptostreptococcales.Tissierellales.f__species.XI.g__Finegoldia.s__magna

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Firmicutes.c__Clostridia.o__Peptostreptococcales.Tissierellales.f__Family.XI.g__Finegoldia.s__magna')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.161 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Firmicutes.c__Bacilli.o__Lactobacillales.f__Streptococcaceae.g__Streptococcus.s__mitis

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Firmicutes.c__Bacilli.o__Lactobacillales.f__Streptococcaceae.g__Streptococcus.s__mitis')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.853 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

Only 3 Months

k__Bacteria.p__Actinobacteriota.c__Actinobacteria.o__Actinomycetales.f__Actinomycetaceae.g__Actinomyces.s__pacaensis

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Actinobacteriota.c__Actinobacteria.o__Actinomycetales.f__Actinomycetaceae.g__Actinomyces.s__pacaensis')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.554 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Firmicutes.c__Bacilli.o__Lactobacillales.f__Carnobacteriaceae.g__Granulicatella.s__adiacens

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Firmicutes.c__Bacilli.o__Lactobacillales.f__Carnobacteriaceae.g__Granulicatella.s__adiacens')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.92 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Proteobacteria.c__Gammaproteobacteria.o__Enterobacterales.f__Enterobacteriaceae.g__Klebsiella.s__oxytoca

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Proteobacteria.c__Gammaproteobacteria.o__Enterobacterales.f__Enterobacteriaceae.g__Klebsiella.s__oxytoca')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.818 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Proteobacteria.c__Gammaproteobacteria.o__Enterobacterales.f__Enterobacteriaceae.g__Citrobacter.s__freundii

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Proteobacteria.c__Gammaproteobacteria.o__Enterobacterales.f__Enterobacteriaceae.g__Citrobacter.s__freundii')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.978 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Firmicutes.c__Bacilli.o__Lactobacillales.f__Enterococcaceae.g__Enterococcus.s__faecium

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Firmicutes.c__Bacilli.o__Lactobacillales.f__Enterococcaceae.g__Enterococcus.s__faecium')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.623 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

Only 6 Months

k__Bacteria.p__Firmicutes.c__Clostridia.o__Oscillospirales.f__Ruminococcaceae.g__Faecalibacterium.s__prausnitzii

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Firmicutes.c__Clostridia.o__Oscillospirales.f__Ruminococcaceae.g__Faecalibacterium.s__prausnitzii')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.248 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Firmicutes.c__Clostridia.o__Lachnospirales.f__Lachnospiraceae.g__Anaerostipes.s__hadrus

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Firmicutes.c__Clostridia.o__Lachnospirales.f__Lachnospiraceae.g__Anaerostipes.s__hadrus')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.005 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Proteobacteria.c__Gammaproteobacteria.o__Enterobacterales.f__Pasteurellaceae.g__Haemophilus.s__parainfluenzae

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Proteobacteria.c__Gammaproteobacteria.o__Enterobacterales.f__Pasteurellaceae.g__Haemophilus.s__parainfluenzae')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.71 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Bacteroidota.c__Bacteroidia.o__Bacteroidales.f__Tannerellaceae.g__Parabacteroides.s__distasonis

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Bacteroidota.c__Bacteroidia.o__Bacteroidales.f__Tannerellaceae.g__Parabacteroides.s__distasonis')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.922 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Firmicutes.c__Bacilli.o__Lactobacillales.f__Enterococcaceae.g__Enterococcus.s__durans

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Firmicutes.c__Bacilli.o__Lactobacillales.f__Enterococcaceae.g__Enterococcus.s__durans')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.803 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Actinobacteriota.c__Coriobacteriia.o__Coriobacteriales.f__Eggerthellaceae.g__Eggerthella.s__lenta

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Actinobacteriota.c__Coriobacteriia.o__Coriobacteriales.f__Eggerthellaceae.g__Eggerthella.s__lenta')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.125 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Campylobacterota.c__Campylobacteria.o__Campylobacterales.f__Campylobacteraceae.g__Campylobacter.s__jejuni

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Campylobacterota.c__Campylobacteria.o__Campylobacterales.f__Campylobacteraceae.g__Campylobacter.s__jejuni')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.026 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Firmicutes.c__Bacilli.o__Erysipelotrichales.f__Erysipelatoclostridiaceae.g__Erysipelatoclostridium.s__ramosum

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Firmicutes.c__Bacilli.o__Erysipelotrichales.f__Erysipelatoclostridiaceae.g__Erysipelatoclostridium.s__ramosum')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.549 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Proteobacteria.c__Gammaproteobacteria.o__Pseudomonadales.f__Moraxellaceae.g__Acinetobacter.s__towneri

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Proteobacteria.c__Gammaproteobacteria.o__Pseudomonadales.f__Moraxellaceae.g__Acinetobacter.s__towneri')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.148 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Actinobacteriota.c__Actinobacteria.o__Micrococcales.f__Micrococcaceae.g__Rothia.s__mucilaginosa

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Actinobacteriota.c__Actinobacteria.o__Micrococcales.f__Micrococcaceae.g__Rothia.s__mucilaginosa')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.679 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Bacteroidota.c__Bacteroidia.o__Bacteroidales.f__Prevotellaceae.g__Prevotella_9.s__copri

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Bacteroidota.c__Bacteroidia.o__Bacteroidales.f__Prevotellaceae.g__Prevotella_9.s__copri')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.008 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Firmicutes.c__Clostridia.o__Lachnospirales.f__Lachnospiraceae.g__Blautia.s__wexlerae

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Firmicutes.c__Clostridia.o__Lachnospirales.f__Lachnospiraceae.g__Blautia.s__wexlerae')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.156 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Firmicutes.c__Bacilli.o__Lactobacillales.f__Streptococcaceae.g__Streptococcus.s__peroris

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Firmicutes.c__Bacilli.o__Lactobacillales.f__Streptococcaceae.g__Streptococcus.s__peroris')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.565 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Actinobacteriota.c__Coriobacteriia.o__Coriobacteriales.f__Coriobacteriaceae.g__Collinsella.s__aerofaciens

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Actinobacteriota.c__Coriobacteriia.o__Coriobacteriales.f__Coriobacteriaceae.g__Collinsella.s__aerofaciens')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.09 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Firmicutes.c__Clostridia.o__Lachnospirales.f__Lachnospiraceae.g__.Ruminococcus..torques.group.s__faecis

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Firmicutes.c__Clostridia.o__Lachnospirales.f__Lachnospiraceae.g__.Ruminococcus..torques.group.s__faecis')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.662 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Firmicutes.c__Clostridia.o__Clostridiales.f__Clostridiaceae.g__Clostridium.sensu.stricto.1.s__butyricum

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Firmicutes.c__Clostridia.o__Clostridiales.f__Clostridiaceae.g__Clostridium.sensu.stricto.1.s__butyricum')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.722 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Firmicutes.c__Bacilli.o__Lactobacillales.f__Enterococcaceae.g__Enterococcus.s__gallinarum

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Firmicutes.c__Bacilli.o__Lactobacillales.f__Enterococcaceae.g__Enterococcus.s__gallinarum')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.092 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Firmicutes.c__Bacilli.o__Erysipelotrichales.f__Erysipelotrichaceae.g__.Clostridium..innocuum.group.s__innocuum

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Firmicutes.c__Bacilli.o__Erysipelotrichales.f__Erysipelotrichaceae.g__.Clostridium..innocuum.group.s__innocuum')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.996 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Firmicutes.c__Clostridia.o__Clostridiales.f__Clostridiaceae.g__Clostridium.sensu.stricto.1.s__paraputrificum

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Firmicutes.c__Clostridia.o__Clostridiales.f__Clostridiaceae.g__Clostridium.sensu.stricto.1.s__paraputrificum')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.402 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Firmicutes.c__Clostridia.o__Oscillospirales.f__Ruminococcaceae.g__Faecalibacterium.s__prausnitzii

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Firmicutes.c__Clostridia.o__Oscillospirales.f__Ruminococcaceae.g__Faecalibacterium.s__prausnitzii')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.237 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

k__Bacteria.p__Firmicutes.c__Bacilli.o__Lactobacillales.f__Enterococcaceae.g__Enterococcus.s__raffinosus

top_species_meta <- species_meta
top_species_meta <- top_species_meta %>% drop_na(Composite_categorical)

f__species.top_species_meta <- top_species_meta %>% filter(species == 'k__Bacteria.p__Firmicutes.c__Bacilli.o__Lactobacillales.f__Enterococcaceae.g__Enterococcus.s__raffinosus')
f__species_result <- permuspliner(data = f__species.top_species_meta, xvar = 'timepoint',
                       yvar = 'relative_abundance', perms = permutations,
                       category = 'Composite_categorical', cases = 'baby_id.x', retain_perm = T)
## 
## Groups detected: High and Low .
## 
## Now testing between variables High and Low for a difference in the response labeled relative_abundance 
## 
## Scalpel please: performing permusplinectomy with 999 permutations...
## 
## Area between groups successfully calculated, now spinning up permutations...
## ...permutations completed...
## 
## p-value = 0.299 
## 
## To visualize your results, try the following command, where "data" is your results object:
## permuspliner.plot.permdistance(data, xlabel="timepoint")
## or
## permuspliner.plot.permsplines(data, xvar="timepoint", yvar="relative_abundance")
permuspliner.plot.permdistance(f__species_result, xlabel = 'timepoint')

permuspliner.plot.permsplines(data = f__species_result,
                              xvar = 'timepoint',
                              yvar = 'relative_abundance')

result <- sliding_spliner(data = f__species.top_species_meta, xvar = "timepoint", yvar = "relative_abundance", cases = 'baby_id.x', category = 'Composite_categorical', cut_low = 3)
## Running sliding spline test with 100 time points extrapolated from splines...
## 
## Groups detected: High and Low .
## 
## Data organization successfull;
## ...now testing for significant differences in the response labeled relative_abundance 
## Splines successfully generated for each case; now testing for significance over 100 intervals
## Testing completed, just organizing the results a bit...
## 
## Done! To visualize your results, try the following commands, where "data" is your results object:
## sliding_spliner.plot.splines(data, xvar="timepoint", yvar="relative_abundance", category="Composite_categorical")
## or
## sliding_spliner.plot.pvals(data, xvar="timepoint")
sliding_spliner.plot.pvals(result, xvar = 'timepoint')
## Number of observations per interval is uniform; points will not be plotted.

Session information

sessionInfo()
R version 4.1.3 (2022-03-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] DT_0.24            magrittr_2.0.3     microeco_0.12.1    file2meco_0.4.0   
 [5] phyloseq_1.38.0    cowplot_1.1.1      vegan_2.6-2        lattice_0.20-45   
 [9] permute_0.9-7      splinectomeR_0.1.0 tidyr_1.2.0        reshape2_1.4.4    
[13] ggplot2_3.3.6      tibble_3.1.8       dplyr_1.0.10       plyr_1.8.7        

loaded via a namespace (and not attached):
 [1] Biobase_2.53.0         sass_0.4.2             jsonlite_1.8.0        
 [4] splines_4.1.3          foreach_1.5.2          bslib_0.4.0           
 [7] assertthat_0.2.1       highr_0.9              stats4_4.1.3          
[10] arules_1.7-4           GenomeInfoDbData_1.2.7 yaml_2.3.5            
[13] pillar_1.8.1           glue_1.6.2             digest_0.6.29         
[16] RColorBrewer_1.1-3     XVector_0.33.0         colorspace_2.0-3      
[19] htmltools_0.5.3        Matrix_1.4-1           pkgconfig_2.0.3       
[22] zlibbioc_1.39.0        purrr_0.3.4            scales_1.2.1          
[25] mgcv_1.8-40            farver_2.1.1           generics_0.1.3        
[28] IRanges_2.27.2         ellipsis_0.3.2         cachem_1.0.6          
[31] withr_2.5.0            BiocGenerics_0.40.0    cli_3.3.0             
[34] survival_3.4-0         crayon_1.5.1           evaluate_0.16         
[37] fansi_1.0.3            nlme_3.1-159           MASS_7.3-58.1         
[40] tools_4.1.3            data.table_1.14.2      lifecycle_1.0.3       
[43] stringr_1.4.1          Rhdf5lib_1.15.2        S4Vectors_0.31.5      
[46] munsell_0.5.0          cluster_2.1.4          Biostrings_2.61.2     
[49] ade4_1.7-19            compiler_4.1.3         jquerylib_0.1.4       
[52] GenomeInfoDb_1.30.1    rlang_1.0.6            rhdf5_2.37.4          
[55] grid_4.1.3             RCurl_1.98-1.8         iterators_1.0.14      
[58] rhdf5filters_1.5.0     biomformat_1.22.0      rstudioapi_0.14       
[61] htmlwidgets_1.5.4      igraph_1.3.4           labeling_0.4.2        
[64] bitops_1.0-7           rmarkdown_2.16         multtest_2.49.0       
[67] gtable_0.3.1           codetools_0.2-18       DBI_1.1.3             
[70] R6_2.5.1               knitr_1.40             fastmap_1.1.0         
[73] utf8_1.2.2             ape_5.6-2              stringi_1.7.8         
[76] parallel_4.1.3         Rcpp_1.0.9             vctrs_0.4.1           
[79] tidyselect_1.1.2       xfun_0.32