Analysis preparation

##      fastqcr          mia       miaViz       ggpubr   data.table        dplyr 
##         TRUE         TRUE         TRUE         TRUE         TRUE         TRUE 
##        tidyr       readxl        readr       qvalue        Hmisc      writexl 
##         TRUE         TRUE         TRUE         TRUE         TRUE         TRUE 
##      forcats      ecodist      rstatix     corrplot       tibble           DT 
##         TRUE         TRUE         TRUE         TRUE         TRUE         TRUE 
##         pals      stringr        Hmisc      ggplot2      picante        vegan 
##         TRUE         TRUE         TRUE         TRUE         TRUE         TRUE 
##     corrplot          ape RColorBrewer         lme4     reshape2      viridis 
##         TRUE         TRUE         TRUE         TRUE         TRUE         TRUE 
##        broom      moments    gridExtra     outliers       sjPlot      effects 
##         TRUE         TRUE         TRUE         TRUE         TRUE         TRUE 
##        MuMIn     showtext    patchwork      cowplot        Jmisc         here 
##         TRUE         TRUE         TRUE         TRUE         TRUE         TRUE 
##         mice       ggmice   ggcorrplot       jtools      foreach     Maaslin2 
##         TRUE         TRUE         TRUE         TRUE         TRUE         TRUE 
##        stats     devtools 
##         TRUE         TRUE
## [1] "C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE"

Load microbiome data

rm(list=ls()) 
biom = here("PRIDE100bphdf5.biom")
 meta = here("Jip_Mapping_file_complete_final2.csv")
 tree = here("all_otus.tree")
#
 biom_complete= importBIOM(biom)

#
names(rowData(biom_complete)) <- c("Kingdom", "Phylum", "Class", "Order",
                        "Family", "Genus", "Species")
# Goes through the whole DataFrame. Removes '.*[kpcofg]__' from strings, where [kpcofg]
# is any character from listed ones, and .* any character.
rowdata_modified <- BiocParallel::bplapply(rowData(biom_complete),
                                           FUN = stringr::str_remove,
                                           pattern = '.*[kpcofgs]__')

# # rowdata_modified is a list, so it is converted back to DataFrame format.
rowdata_modified <- DataFrame(rowdata_modified)
#
# # And then assigned back to the SE object
 rowData(biom_complete) <- rowdata_modified
#
#
 sample_meta <- DataFrame(read.table(meta, sep = ";", header = TRUE))
 rownames(sample_meta) = sample_meta$sampleID

meta_reordered <- sample_meta[match(colnames(biom_complete), rownames(sample_meta)),]

# # Then it can be added to colData
 colData(biom_complete) <- DataFrame(meta_reordered)
#
# # Convert to tse format
 tse <- as(biom_complete, "TreeSummarizedExperiment")
#
# # Reads the tree file
 tree_file <- ape::read.tree(tree)
# # Add tree to rowTree
 rowTree(tse) <- tree_file
#
 saveRDS(tse,  here("outputmia", "tse_complete.rds"))

## or import phyloseq and convert to tse ##


# add sequencing depth to the sample data in the complete phyloseq 
colData(tse)$SeqDepth = colSums(assay(tse))

# Create a phyloseq with only MOCK (1), only negative control (2), and only biological samples (3)
colData(tse)$MOCK_rows <- str_detect(colData(tse)$sampleID, "MOCK|refmock3|refmock4")
colData(tse)$negcontrol_rows <- str_detect(colData(tse)$Description, "neg_control|empty|neg._control|STAR|water_maxwell|water")
tse.mock = tse[ , tse$MOCK_rows == TRUE]
tse.negcontrol = tse[,tse$negcontrol_rows==TRUE]
saveRDS(tse.mock, here("outputmia", "tse.mock.rds"))
saveRDS(tse.negcontrol, here("outputmia", "tse.negcontrol.rds"))


tse.onlybio <- tse[, !tse$MOCK_rows==TRUE & !tse$negcontrol_rows==TRUE] # only bio
saveRDS(tse.onlybio, here("outputmia", "tse.onlybio.rds"))

QC mocks and negative controls

# Mock files composition plots
tse.mock =  mergeFeaturesByRank(tse.mock, rank = "Genus", agglomerateTree = TRUE)

# Correlation
otu_table <- as.matrix(assay(tse.mock))
odd_indexes <- c(seq(1,31,2), 32)
#odd_indexes <- append(odd_indexes, 32)
even_indexes <- c(seq(2,30,2), 33)
#even_indexes <- append(even_indexes, 33)
MOCK.com.gen.matrix_1 <- otu_table[, odd_indexes]
MOCK.com.gen.matrix_2 <- otu_table[, even_indexes]
cor_MOCK_files_1 <- cor(MOCK.com.gen.matrix_1, method = "pearson")
cor_MOCK_files_2 <- cor(MOCK.com.gen.matrix_2, method = "pearson")
# Plot
plot2 <- corrplot(cor_MOCK_files_1, method = "square", is.corr=FALSE)

plot3 <- corrplot(cor_MOCK_files_2, method = "square", is.corr=FALSE)

tse.mock = transformAssay(tse.mock,assay.type = "counts", method = "relabundance")
tse.mock_odd = tse.mock[,odd_indexes]
tse.mock_odd_genus = agglomerateByRank(tse.mock_odd, rank="Genus")
top_taxa = getTopFeatures(tse.mock_odd_genus, top = 11, assay.type= "relabundance")
tse.mock_top_odd= tse.mock_odd_genus[top_taxa,]

oddmocks = colData(tse.mock_top_odd)$X.sampleID
mockplotodd = miaViz::plotAbundance(tse.mock_top_odd, assay_name = "relabundance", rank = "Genus", features= "X.sampleID",
add_x_text = TRUE)[[1]] + theme(axis.text.x = element_text(angle = 90))
mockplotodd

tse.mock_even = tse.mock[,even_indexes]
top_taxa = getTopFeatures(tse.mock_even, top = 11, assay.type= "relabundance")
tse.mock_top_even= tse.mock_even[top_taxa,]
mockploteven = miaViz::plotAbundance(tse.mock_top_even, assay_name = "relabundance", rank = "Genus", features= "X.sampleID",
add_x_text = TRUE)[[1]] + theme(axis.text.x = element_text(angle = 90))
mockploteven

# Plot the sequencing depth by library
plot(tse.negcontrol$SeqDepth, tse.negcontrol$LibraryNumber, xlab="Sequencing Depth", ylab="Library Number")

tse.negcontrol =  mergeFeaturesByRank(tse.negcontrol, rank = "Genus", agglomerateTree = TRUE)
tse.negcontrol = transformAssay(tse.negcontrol,assay.type = "counts", method = "relabundance")
top_taxa = getTopFeatures(tse.negcontrol, top = 20, assay.type= "relabundance")
tse.negcontrol = tse.negcontrol[top_taxa]

negcontrolplot = miaViz::plotAbundance(tse.negcontrol, assay_name = "relabundance", rank = "Genus", features= "sampleID",
add_x_text = TRUE)[[1]]+ theme(axis.text.x = element_text(angle = 90))
#add_x_text = TRUE)[[1]]  + theme(axis.text.x = element_text(angle = 90))

Import ASQ and other metadata

rm(list=ls()) 
# load in data
#MB
tse.onlybio = readRDS(here("outputmia", "tse.onlybio.rds"))
Additional_metadata <- read_excel("Additional_data.xlsx", na = "NA")
tse.onlybio$Deelnemerscode_rem <- str_remove(tse.onlybio$Deelnemerscode, ".$") # remove the last character from deelnemerscode
meta <- data.frame(colData(tse.onlybio)) %>%
  dplyr::left_join(., Additional_metadata, by = c("Deelnemerscode_rem" = "Deelnemerscode"))
meta <- meta %>%
  mutate(Timepoint = case_when(
    Timepoint == 1 ~ 2,
    Timepoint == 2 ~ 4,
    Timepoint == 3 ~ 6,
    Timepoint == 4 ~ 9,
    Timepoint == 5 ~ 12,
      ))
rownames(meta) <- meta$sampleID
colData(tse.onlybio) = DataFrame(meta)

# remove all non-bacterial ASV's
dim(tse.onlybio)
## [1] 6015  843
tse.onlybio= subsetFeatures(tse.onlybio, rowData(tse.onlybio)$Kingdom=="Bacteria")
dim(tse.onlybio)
## [1] 5970  843
colData(tse.onlybio)$numASV <- colSums(assay(tse.onlybio) != 0)

saveRDS(tse.onlybio, here("outputmia", "tse.onlybio.rds"))

tse.onlybio$Relationship <- factor(tse.onlybio$Relationship, labels = c("Mother", "Baby")) # factorize relationship
table(tse.onlybio$Relationship)
## 
## Mother   Baby 
##    325    518
meta = data.frame(colData(tse.onlybio))
timepointsrelationship_count <- meta%>%
   dplyr::group_by(Deelnemerscode, Relationship) %>%
   dplyr::summarise(count =  dplyr::n_distinct(Timepoint))
## `summarise()` has grouped output by 'Deelnemerscode'. You can override using
## the `.groups` argument.
print(table(timepointsrelationship_count$count))
## 
##  1  2  3  4  5 
##  6 12 99  9 96
print(table(timepointsrelationship_count$Relationship, timepointsrelationship_count$count))
##         
##           1  2  3  4  5
##   Mother  6 11 99  0  0
##   Baby    0  1  0  9 96
tse.baby <-tse.baby <- tse.onlybio[, tse.onlybio$Relationship=="Baby"] # only babies

# #fecal sample descriptives - Assess missing values per timepoint
meta = data.frame(colData(tse.baby))

timepoints_count <- meta%>%
  group_by(Deelnemerscode) %>%
   dplyr::summarise(count =  dplyr::n_distinct(Timepoint))

print(table(timepoints_count$count))
## 
##  2  4  5 
##  1  9 96
print(sum(table(timepoints_count$count)))
## [1] 106
#polygon
ggplot(timepoints_count, aes(count)) + geom_freqpoly(bins = 10) + theme_bw()

saveRDS(tse.onlybio, here("outputmia", "tse.onlybio.rds"))

saveRDS(tse.baby, here("outputmia", "tse.baby.rds"))

Preprocess ASQ data

rm(list=ls())
# load ASQ-3 and ESAT measurements
ASQ_df <- read_excel(here("ASQ-3.xlsx"), na = "NA")
extraASQ = read_excel(here("PRIDE-BIOME Questionnaire data_230622.xlsx"), na = "NA")
extraASQ$Id = sub("^", "PRIDE_", extraASQ$Id )
names(extraASQ)[names(extraASQ)== "Id"] = "Deelnemerscode"

ASQ_8 = merge(ASQ_df,extraASQ, by = "Deelnemerscode")

# Negatively asked questions in the ASQ are:
EC17 <- paste0("EC17", c("d", "i", "k", "l", "n", "p", "r", "s", "t", "u")) #Q5 total of 21 questions
FB1 <- paste0("FB1", c("f", "i", "l", "n", "o", "r", "u")) #Q6 total of 21 questions
GB5 <- paste0("GB5", c("b", "h", "i", "k", "l", "m", "q", "w", "y", "z")) # Q7 total of 26 questions
HB1 <- paste0("HB1", c("b", "e", "i", "k", "m", "p", "q", "u", "w", "y")) # Q8 total of 25 questions          
IB1 <- paste0("IB1", c("c", "g", "h", "j", "k", "p", "y", "z", "ab")) # Q9 total of 28 questions
JB1 <- paste0("JB1", c("d", "f", "l", "o", "s", "u", "v", "x", "ac", "ad", "ae", "af", "ag")) # Q10 total of 33 questions
LB1 <- paste0("LB1", c("b", "h", "k", "p","v", "w", "y", "ae", "af", "ag")) #Q12 total of 33 questions
NB1 <- paste0("NB1", c("b", "i", "l", "p","v", "w", "y", "ad", "af", "ag"))#Q13 total of 33 questions

torecode <- c(EC17, FB1, GB5, HB1, IB1, JB1, LB1, NB1)

recode_var <- function(var) {
  dplyr::recode(var, '1'= 3, '2'= 2, '3'= 1)
}

# copy ASQ_df into new df
ASQ_3_recoded <- ASQ_8
ASQ_3_recoded[torecode] <- sapply(ASQ_3_recoded[torecode], recode_var) # recode variables in torecode

# Check if recoding was successful (i.e., are the number of 1 in old df == number of 3 in recoded df)
sum(ASQ_8[,torecode] == 1, na.rm = T) == sum(ASQ_3_recoded[,torecode] == 3, na.rm = T)  # 1 == 3
## [1] TRUE
sum(ASQ_8[,torecode] == 3, na.rm = T) == sum(ASQ_3_recoded[,torecode] == 1, na.rm = T) # 3 == 1
## [1] TRUE
#items are rated on a 4-point scale (0, 5, 10, or 15 points:most of the time,sometimes,rarely or never, and check if this is a concern)
ASQ_3_recoded[ASQ_3_recoded == 1] <- 0
ASQ_3_recoded[ASQ_3_recoded == 2] <- 5
ASQ_3_recoded[ASQ_3_recoded == 3] <- 10


# Plot total number of 0, 5, 10 and NAs 
ASQ_3_recoded$N_samples= NULL
ASQ.m <- melt(ASQ_3_recoded, id.vars = "Deelnemerscode")
ASQ.m$value <- factor(ASQ.m$value)

ggplot(data = ASQ.m, aes(x = value, fill = value)) +
  geom_bar() +
  theme_bw()

# Save the recoded dataframe as an excel 
write_xlsx(x = ASQ_3_recoded, path = here("outputmia", "ASQ-8-recoded.xlsx"), col_names = TRUE)
saveRDS(ASQ_3_recoded, here("outputmia", "ASQ-8-recoded.rds"))

Compute average score per timepoint ASQ

rm(list=ls())
ASQ_8_recoded <- readRDS(here("outputmia", "ASQ-8-recoded.rds"))

starts <- c("EC", "FB", "GB", "HB", "IB", "JB", "LB", "NB")
timepoints <- c("6months", "12months", "18months", "24months", "30months", "36months", "48months", "60months")

# Assess missing values per timepoint
miceplots <- lapply(starts, function(x) ggmice::plot_pattern(ASQ_8_recoded[str_detect(colnames(ASQ_8_recoded), x)], rotate = TRUE))
#ggarrange(plotlist = miceplots)

# Loop over timepoints and calculate mean for each individuals on each timepoint.
# within the mutate function is implemented: if the number of NAs is smaller than 3 (i.e., 0,1 or 2) compute the average disregarding the NAs.
# if the number of NAs is 3 or more: do not compute an average, but give NA instead

for (i in 1:length(starts)) {
  ASQ_8_recoded <- ASQ_8_recoded %>% 
    mutate(!!paste0("ASQ_", timepoints[i], "_mean") := ifelse(rowSums(is.na(select(ASQ_8_recoded, starts_with(starts[i])))) < 3, rowMeans(select(ASQ_8_recoded, starts_with(starts[i])), na.rm = TRUE), NA))
} 

# calculate totals for those questionnaires with <3 items missing
for (i in 1:length(starts)) {
  ASQ_8_recoded <- ASQ_8_recoded %>% 
    mutate(!!paste0("ASQ_", timepoints[i], "_totaal") := ifelse(rowSums(is.na(select(ASQ_8_recoded, starts_with(starts[i])))) < 3, rowSums(select(ASQ_8_recoded, starts_with(starts[i])), na.rm = TRUE), NA))
}

# Plot overview of missing values per timepoint
#ASQ_8_recoded %>%
 # dplyr::select(ends_with("mean")) %>%
  #ggmice::plot_pattern(rotate = TRUE)

# Compute a grand average across timepoint. Each timepoint has equal weight
# Includes ifstatement: compute only if: 1) 3 or less missing, 2) 1st timepoint not missing, 3) 7th or 8th timepoint not missing

ASQ_8_recoded$ASQ_mean_total <- ifelse(rowSums(is.na(select(ASQ_8_recoded, ends_with("_mean")))) <= 3 & !is.na(ASQ_8_recoded$ASQ_6months_mean) & (!is.na(ASQ_8_recoded$ASQ_48months_mean) | !is.na(ASQ_8_recoded$ASQ_60months_mean)),  rowMeans(select(ASQ_8_recoded, ends_with("mean")), na.rm = TRUE), NA)

# Check if computation of the mean worked correctly
ASQ_8_recoded %>%
  dplyr::select(contains("mean")) %>% 
  ggmice::plot_pattern(rotate = TRUE)

saveRDS(ASQ_8_recoded, here("outputmia", "ASQ-8-recoded_wmeans.rds"))

Computing the slope

rm(list=ls())
ASQ_8_recoded <- readRDS(here("outputmia", "ASQ-8-recoded_wmeans.rds")) 

# Melt data into long format
ASQ_8_melt <- ASQ_8_recoded %>%
  filter(!is.na(ASQ_8_recoded$ASQ_mean_total)) %>%  # filter participants with too many missing (based on missing asq_mean)
  dplyr::select(Deelnemerscode, ends_with("_mean")) %>%
  melt(id.vars = "Deelnemerscode", variable.name = "Timepoint", value.name = "ASQ_mean") %>%
  mutate(Timepoint = as.character(Timepoint))
  
# Cast the timepoints as numeric
ASQ_8_melt$Timepoint <- as.numeric(str_remove_all(ASQ_8_melt$Timepoint, "ASQ_|months_mean"))
#as.factor(ASQ_8_melt$Timepoint)

# Create an empty dataframe with a variable for deelnemerscode, intercept and slope 
df <- data.frame(Deelnemerscode = character(), ASQ_intercept = numeric(), ASQ_slope = numeric(), ASQ_residual = numeric())

# Create an empty list for the slope/intercept plots
pltlist <- list()

# For loop to compute an intercept and slope for all individuals
for (code in unique(ASQ_8_melt$Deelnemerscode)) {

  # run linear regression on only the data from one participant (specified by the subset argument)
  mod <- lm(ASQ_mean ~ Timepoint, data = ASQ_8_melt, subset = (Deelnemerscode == code))
  summary(mod)
  
  # add the statistics (intercept and slope) to dataframe
  df <- df %>%
    add_row(Deelnemerscode = code, 
            ASQ_intercept = mod$coefficients[1], 
            ASQ_slope = mod$coefficients[2], 
            ASQ_residual = sum(abs(mod$residuals)) / length(mod$residuals))
  
  # Plot the data and slope to check fit 
  pltlist[[length(pltlist) + 1]] <- 
    ggplot(data = filter(ASQ_8_melt, Deelnemerscode == code), aes(x = Timepoint, y = ASQ_mean, color = Deelnemerscode)) +
    geom_point(size = 3)+
    geom_path(size = 1.5) +
    ggtitle(code) +
    theme(legend.position = "none") +
    geom_abline(slope = mod$coefficients[2], intercept = mod$coefficients[1], size = 0.75)
  
}
df$ASQ_slope_grouped <- as.vector(Hmisc::cut2(df$ASQ_slope, g=2))
#1 is early concern, 2 is late concern
df$ASQ_slope_grouped_numeric <- ifelse(df$ASQ_slope_grouped == "[ 0.00692,0.05365]", 2, 1)

df$ASQ_slope_zerogrouped <- ifelse(df$ASQ_slope >0, 2, 1)

ASQ_8_recoded <- ASQ_8_recoded %>%
  dplyr::full_join(., df, by = "Deelnemerscode") 

# write to xlsx file
write_xlsx(x = ASQ_8_recoded, path = here("outputmia", "ASQ-8-recoded_wmeanslope.xlsx"), col_names = TRUE)
saveRDS(ASQ_8_recoded, here("outputmia", "ASQ-8-recoded_wmeansslope.rds")) 

Add ASQ_8 to tse object

rm(list=ls())

ASQ_8_recoded <- readRDS(here("outputmia", "ASQ-8-recoded_wmeansslope.rds"))

tse.onlybio <- readRDS(here("outputmia", "tse.onlybio.rds"))
tse.onlybio$Relationship <- factor(tse.onlybio$Relationship, labels = c("Mother", "Baby")) # factorize relationship 
tse.baby_asq8 <- tse.onlybio[, tse.onlybio$Relationship=="Baby"] # only babies
tse.mother_asq8 <- tse.onlybio[, tse.onlybio$Relationship=="Mother"] #
tse.mother_asq8$Deelnemerscode <- gsub( "M", "",tse.mother_asq8$Deelnemerscode)
tse.baby_asq8$Deelnemerscode <- gsub( "B", "",tse.baby_asq8$Deelnemerscode)

#Deelnemer codes for the non missing ASQ values
unique_ASQ= ASQ_8_recoded[!is.na(ASQ_8_recoded$ASQ_slope),]
unique_ASQ= data.frame(unique(unique_ASQ$Deelnemerscode))

unique_fecal= data.frame(unique(colData(tse.baby_asq8)$Deelnemerscode))

IDsASQnofeces = setdiff(unique_fecal[,1], unique_ASQ[,1])
IDsfecesnoASQ = setdiff(unique_ASQ[,1], unique_fecal[,1])


# Select only ASQ summary variables 
ASQ_8_recoded_sub <- ASQ_8_recoded %>%
  select(Deelnemerscode, contains("ASQ"))

meta <- data.frame(colData(tse.baby_asq8)) %>%
  dplyr::left_join(., ASQ_8_recoded_sub, by = c("Deelnemerscode" = "Deelnemerscode"))
rownames(meta) <- meta$sampleID 

colData(tse.baby_asq8) = DataFrame(meta)


meta_mother <- data.frame(colData(tse.mother_asq8)) %>%
  dplyr::left_join(., ASQ_8_recoded_sub, by = c("Deelnemerscode" = "Deelnemerscode"))
rownames(meta_mother) <- meta_mother$sampleID 

colData(tse.mother_asq8) = DataFrame(meta_mother)


# number and IDs of infants with both fecal sample and ASQ_slope
unique_ASQ_tse= data.frame(colData(tse.baby_asq8))
unique_ASQ_tse=  unique_ASQ_tse[!is.na(unique_ASQ_tse$ASQ_slope),]
uniques_ASQ_tse= data.frame(unique(unique_ASQ_tse$Deelnemerscode))

### From here on use only the tse.baby_asq8 and dataframes containing the overlapping sample with both feces and ASQ slope ### 

tse.baby_asq8 <- tse.baby_asq8[ , tse.baby_asq8$Deelnemerscode %in% uniques_ASQ_tse[,1]]
saveRDS(tse.baby_asq8, here("outputmia", "tse.baby_asq8.rds"))

tse.mother_asq8 <- tse.mother_asq8[ , tse.mother_asq8$Deelnemerscode %in% uniques_ASQ_tse[,1]]
saveRDS(tse.mother_asq8, here("outputmia", "tse.mother_asq8.rds"))

ASQ_8_recoded_sub =  ASQ_8_recoded_sub %>% filter(Deelnemerscode %in% uniques_ASQ_tse[,1])

write_xlsx(x = ASQ_8_recoded_sub, path = here("outputmia", "ASQ-8-recoded_wmeanslope_sub.xlsx"), col_names = TRUE)
saveRDS(ASQ_8_recoded_sub, here("outputmia", "ASQ-8-recoded_wmeansslope_sub.rds")) 

# demographics for overlapping fecal - ASQ infants
meta_baby = colData(tse.baby_asq8)
uniques <- unique(meta_baby$Deelnemerscode_rem)

# Find the row indices for the first instance of each unique value
first_instance_indices <- sapply(uniques, function(unique_value) {
  which(meta_baby$Deelnemerscode_rem == unique_value)[1]
})
# Get the row names for these indices
first_instance_row_names <- rownames(meta_baby)[first_instance_indices]
# this gives meta data of the sample of 81 infants - only first instance - for baseline demographics
meta_uniquesample = data.frame(meta_baby[first_instance_row_names,])

resultgender = t.test(ASQ_slope ~Gender, data = meta_uniquesample ) 
resultgender
## 
##  Welch Two Sample t-test
## 
## data:  ASQ_slope by Gender
## t = 1.5109, df = 78.487, p-value = 0.1348
## alternative hypothesis: true difference in means between group 1 and group 2 is not equal to 0
## 95 percent confidence interval:
##  -0.001601357  0.011687544
## sample estimates:
## mean in group 1 mean in group 2 
##     0.008954520     0.003911426
pre_pregnancyBMI =  meta_uniquesample$Weight_beforepregnancy/ (meta_uniquesample$Height/100)^2
meta_uniquesample$pre_pregnancyBMI =pre_pregnancyBMI
median(pre_pregnancyBMI,  na.rm=TRUE)
## [1] 22.94812
sd(pre_pregnancyBMI, na.rm=TRUE)
## [1] 4.117163
range(pre_pregnancyBMI, na.rm=TRUE)
## [1] 17.95918 36.25047
mean_total  = sum(meta_uniquesample$GA_weeks, na.rm = TRUE) / length(meta_uniquesample$GA_weeks)
missing     = sum(is.na(meta_uniquesample$GA_weeks))
mean(meta_uniquesample$GA_weeks, na.rm=TRUE)
## [1] 39.675
meta_uniquesample %>%
  summarise(across(c(GA_weeks, BW_infant, Maternal_age,pre_pregnancyBMI), 
                   list(
                     total_n    = ~ n(),
                     missing    = ~ sum(is.na(.)),
                     mean_total = ~ sum(., na.rm = TRUE) / n(),
                     sd         = ~ sd(., na.rm = TRUE),
                     min        = ~ min(., na.rm = TRUE),
                     max        = ~ max(., na.rm = TRUE)
                   ),
                   .names = "{.col}_{.fn}"))
##   GA_weeks_total_n GA_weeks_missing GA_weeks_mean_total GA_weeks_sd
## 1               81                1            39.18519    1.122554
##   GA_weeks_min GA_weeks_max BW_infant_total_n BW_infant_missing
## 1           36           41                81                 1
##   BW_infant_mean_total BW_infant_sd BW_infant_min BW_infant_max
## 1             3554.605     442.6627          2280          4580
##   Maternal_age_total_n Maternal_age_missing Maternal_age_mean_total
## 1                   81                    0                31.17284
##   Maternal_age_sd Maternal_age_min Maternal_age_max pre_pregnancyBMI_total_n
## 1         3.55946               22               42                       81
##   pre_pregnancyBMI_missing pre_pregnancyBMI_mean_total pre_pregnancyBMI_sd
## 1                        4                    22.85423            4.117163
##   pre_pregnancyBMI_min pre_pregnancyBMI_max
## 1             17.95918             36.25047
meta_uniquesample %>%
  count(Mode_of_delivery, .drop = FALSE) %>%   # keeps NA as its own row
  mutate(
    total_n   = nrow(meta_uniquesample),
    perc_total = 100 * n / total_n
  )
##   Mode_of_delivery  n total_n perc_total
## 1                1 70      81  86.419753
## 2                4  9      81  11.111111
## 3               NA  2      81   2.469136
vars <- c("Come_around_with_income", "Mode_of_delivery", "Infant_solid_food_6months", "Infant_antibiotica_12months", "Infant_medication_2to6months", "Breastfeeding_2months","Breastfeeding_4months","Breastfeeding_6months", "Formula_feeding_2months", "Formula_feeding_6months")  # pick your variables

percentages = meta_uniquesample %>%
  pivot_longer(all_of(vars), names_to = "variable", values_to = "value") %>%
  count(variable, value, .drop = FALSE) %>%
  group_by(variable) %>%
  mutate(
    total_n   = nrow(meta_uniquesample),
    perc_total = 100 * n / total_n,
    value = ifelse(is.na(value), "Missing", as.character(value))
  ) %>%
  ungroup()

Plot ASQ slope

rm(list=ls())
ASQ_8_recoded <- readRDS(here("outputmia", "ASQ-8-recoded_wmeansslope_sub.rds"))
tse.baby_asq8 <- readRDS(here("outputmia", "tse.baby_asq8.rds"))


## calculate how many infants / questionnaires had a score above the cut-off
noquestions = c(21,21,26,25,28,33,33, 33)
cutoff= c(45,48, 50,50, 57,59,70,70)
timepoints <- c("_6months", "_12months", "_18months", "_24months", "_30months", "_36months", "_48months", "_60months")

for (i in 1:8) {
 ASQ_8_recoded <- ASQ_8_recoded %>% 
    mutate(!!paste0("ASQ_", timepoints[i], "_flag") := ifelse(select(ASQ_8_recoded,contains("totaal")& contains(timepoints[i])) > cutoff[i],1, 2))
}

totalflags = sum(apply(select(ASQ_8_recoded, contains("flag")), 2, function(x) sum(x == 1, na.rm = TRUE)))

individualflags= data.frame(matrix(nrow= length(ASQ_8_recoded$Deelnemerscode),ncol=8))
rownames(individualflags) =ASQ_8_recoded$Deelnemerscode

for (i in 1:length(ASQ_8_recoded$Deelnemerscode)){
individualflags[i,] =apply(select(ASQ_8_recoded[i,], contains("flag")), 2, function(x) sum(x == 1, na.rm = TRUE))
}
colnames(individualflags) = gsub("_", "", timepoints)
individualflags$Deelnemerscode = rownames(individualflags)

individualflags$any_flag <- as.integer(rowSums(individualflags == 1, na.rm = TRUE) > 0)

meta <- data.frame(colData(tse.baby_asq8)) %>%
  dplyr::left_join(., 
    individualflags %>% select(Deelnemerscode, any_flag), by = "Deelnemerscode")
rownames(meta) <- meta$sampleID 

colData(tse.baby_asq8) = DataFrame(meta)
saveRDS(tse.baby_asq8, here("outputmia", "tse.baby_asq8.rds")) 


shortlistflags = individualflags[which(rowSums(individualflags[,1:8])!=0),]

flags_melted = melt(shortlistflags)
## Using Deelnemerscode as id variables
flags = ggplot(flags_melted, aes(x = Deelnemerscode , y = variable, fill = factor(value))) +
  geom_tile(color = "white") +
  scale_fill_manual(values = c("white", brewer.pal(6, "Greens")[2:6])) +
  theme_classic() +
  coord_flip() +
  theme(axis.text.x = element_text(angle = 90, hjust = 1),   # left aligned
    axis.text.y = element_text(hjust = 0)) +
  scale_x_discrete(labels = c(
    "PRIDE_14459" = "PRIDE_egjp", "PRIDE_14684" = "PRIDE_grwh",
    "PRIDE_14810" = "PRIDE_egjw", "PRIDE_14829" = "PRIDE_awew",
    "PRIDE_14978" = "PRIDE_segea", "PRIDE_15009" = "PRIDE_kafd",
    "PRIDE_15019" = "PRIDE_kwjfu", "PRIDE_15152" = "PRIDE_owir",
    "PRIDE_15238" = "PRIDE_oiar", "PRIDE_15695" = "PRIDE_wujr",
    "PRIDE_15769" = "PRIDE_oaoi", "PRIDE_16058" = "PRIDE_ousd",
    "PRIDE_16101" = "PRIDE_kjuy", "PRIDE_16352" = "PRIDE_hsgb",
    "PRIDE_16550" = "PRIDE_ojye", "PRIDE_16639" = "PRIDE_qwhc"
  )) + scale_fill_manual(
  name = NULL,
  values = c("0" = "white", "1" = "lightgreen"),
  labels = c("0" = "Normal", "1" = "Above cut-off")
)
## Scale for fill is already present.
## Adding another scale for fill, which will replace the existing scale.
flags

#data orientation: plot ASQ scores per timepoint
mean_cols = ASQ_8_recoded %>% select(matches("_mean"), "ASQ_slope", "ASQ_slope_grouped", "Deelnemerscode")
mean_cols$ASQ_slope =NULL
mean_cols$ASQ_mean_total =NULL

data_long <- reshape2::melt(mean_cols)
## Using ASQ_slope_grouped, Deelnemerscode as id variables
data_long$variable <- factor(data_long$variable, levels = names(mean_cols)[1:8])

#boxplots ASQ by mean
boxplots_ASQ = ggplot(data_long, aes(x = variable, y = value)) +
  geom_boxplot() + theme_classic()+labs(title = "Boxplot of ASQ means for all timepoints")+ ylab("mean ASQ scores")+
  theme(axis.text.x = element_text(angle = 45, hjust = 1), axis.title.x = element_blank())
boxplots_ASQ

#boxplots per ASQ slope group
data_long$variable <- fct_recode(data_long$variable,
  "6 months"  = "ASQ_6months_mean",
  "12 months" = "ASQ_12months_mean",
  "18 months" = "ASQ_18months_mean",
  "24 months" = "ASQ_24months_mean",
  "30 months" = "ASQ_30months_mean",
  "36 months" = "ASQ_36months_mean",
  "48 months" = "ASQ_48months_mean",
  "60 months" = "ASQ_60months_mean"
)


# ASQ slope split by zero 

mean_cols = ASQ_8_recoded %>% select(matches("_mean"), "ASQ_slope", "ASQ_slope_zerogrouped", "Deelnemerscode")
mean_cols$ASQ_slope =NULL
mean_cols$ASQ_mean_total =NULL

data_long <- reshape2::melt(
  mean_cols,
  id.vars = c("Deelnemerscode", "ASQ_slope_zerogrouped")
)
data_long$variable <- factor(data_long$variable, levels = names(mean_cols)[1:9])
data_long$variable <- fct_recode(data_long$variable,
  "6 months"  = "ASQ_6months_mean",
  "12 months" = "ASQ_12months_mean",
  "18 months" = "ASQ_18months_mean",
  "24 months" = "ASQ_24months_mean",
  "30 months" = "ASQ_30months_mean",
  "36 months" = "ASQ_36months_mean",
  "48 months" = "ASQ_48months_mean",
  "60 months" = "ASQ_60months_mean"
)

medians <- data_long %>%
  group_by(variable, ASQ_slope_zerogrouped) %>%
  summarise(median_value = median(value, na.rm = TRUE), .groups = "drop")


medians$ASQ_slope_zerogrouped= as.factor(medians$ASQ_slope_zerogrouped)
data_long$ASQ_slope_zerogrouped= as.factor(data_long$ASQ_slope_zerogrouped)

# Create the boxplot with a line through the group medians
legend_breaks  <- c("2","1")                 # 1 = early concern, 2 = late concern
legend_labels  <- c("Late concern","Early concern")
legend_values  <- c("2" = "red","1" = "blue" )

boxplots_ASQ <- ggplot(data_long, aes(x = variable, y = value, fill = ASQ_slope_zerogrouped)) +
  geom_boxplot(
    alpha = 0.5,
    aes(color = ASQ_slope_zerogrouped),       
    outlier.shape = NA) +
  geom_point(
    data = data_long,
    aes(x = variable, y = value, color = ASQ_slope_zerogrouped),
    position = position_jitterdodge(
      jitter.width = 0.4,
      dodge.width = 0.75
    ),
    alpha = 0.6,
    size = 1
  ) +
  geom_line(
    data = medians,
    aes(x = variable, y = median_value, group = ASQ_slope_zerogrouped, color = ASQ_slope_zerogrouped),
    size = 1
  )  +
  theme_classic() +
  labs(y = "Mean ASQ Scores") +
  scale_fill_manual(
    name = "ASQ slope",
    breaks = legend_breaks,
    labels = legend_labels,
    values = legend_values,
    drop   = FALSE
  ) +
  scale_color_manual(
    name = "ASQ slope",
    breaks = legend_breaks,
    labels = legend_labels,
    values = legend_values,
    drop   = FALSE
  ) +
  scale_x_discrete(limits = unique(data_long$variable)) +
   theme_classic(base_size = 14)+ theme(
    legend.position = "top",
    axis.text.x = element_text(angle = 45, hjust = 1),
    plot.margin = margin(t = 10, r = 10, b = 20, l = 20),
    axis.title.x = element_blank()
  )


#Violin ASQ slope
length(ASQ_8_recoded$ASQ_slope[ASQ_8_recoded$ASQ_slope>0]) #n=56
## [1] 56
length(ASQ_8_recoded$ASQ_slope[ASQ_8_recoded$ASQ_slope<0]) #n=25
## [1] 25
dens <- density(ASQ_8_recoded$ASQ_slope, adjust = 1, from = min(ASQ_8_recoded$ASQ_slope), to = max(ASQ_8_recoded$ASQ_slope))
density_df <- data.frame(
  y = dens$x,  # ASQ_slope values (vertical axis)
  x = dens$y   # Density (horizontal axis for the violin width)
)

# Separate above and below 0
df_below <- density_df %>% filter(y <= 0)
df_above <- density_df %>% filter(y > 0)

# Build plot
violin = ggplot() +
  # Bottom (blue)
  geom_ribbon(data = df_below, aes(y = y, xmin = -x, xmax = x), fill = "blue", alpha = 0.5) +
  # Top (red)
  geom_ribbon(data = df_above, aes(y = y, xmin = -x, xmax = x), fill = "red", alpha = 0.5) +
  
  # Jittered points
  geom_jitter(data = ASQ_8_recoded, aes(x = 0, y = ASQ_slope, color = ASQ_slope > 0),
              width = 0.1, size = 2, alpha = 0.8) +
  
  # Horizontal line at y = 0
  geom_hline(yintercept = 0, linetype = "dashed") +

  scale_color_manual(
    name = "ASQ slope",
    values = c("TRUE" = "red", "FALSE" = "blue"),
    labels = c("FALSE" = "Early concern", "TRUE" = "Late concern")
  ) +

  labs(x = "", y = "ASQ slope", color = NULL) +
  
  theme_classic(base_size = 12) +  # Set base font size

  # Custom font sizes for axis and legend
  theme(
    legend.position = "top",
    axis.text = element_text(size = 12),
    axis.text.x = element_blank(),         
    axis.ticks.x = element_blank(),        
    axis.title.y = element_text(size = 14),
    legend.text = element_text(size = 12),
    legend.title = element_text(size = 12)
  )

violin <- violin +
  scale_color_manual(
    name   = "ASQ slope",
    breaks = c(TRUE, FALSE),                 # TRUE=early concern (>0), FALSE=late concern
    labels = c("Early concern","Late concern"),
    values = c("TRUE" = "red", "FALSE" = "blue"),
    drop   = FALSE
  )
## Scale for colour is already present.
## Adding another scale for colour, which will replace the existing scale.
box_clean    <- boxplots_ASQ + guides(colour = "none") + theme(plot.margin = margin(5,5,20,5))
violin_clean <- violin + guides(colour = "none") +
  theme(axis.title.x = element_blank(), axis.text.x = element_blank(),
        axis.ticks.x = element_blank(), plot.margin = margin(5,5,20,5))

combined <- (box_clean | violin_clean) +
  plot_layout(widths = c(3, 2), guides = "collect")+
            plot_annotation(tag_levels = "a") &
  theme(legend.position = "right",
        legend.box = "horizontal",
        legend.text = element_text(size = 10),
        legend.title = element_text(size = 10))
combined

corrASQmean_slope= ggplot(data= ASQ_8_recoded, aes(x= ASQ_slope, y= ASQ_mean_total))+ geom_point() + theme_classic()
corrASQmean_slope

cor.test(ASQ_8_recoded$ASQ_slope, ASQ_8_recoded$ASQ_mean_total, method = "pearson",  exact = FALSE)
## 
##  Pearson's product-moment correlation
## 
## data:  ASQ_8_recoded$ASQ_slope and ASQ_8_recoded$ASQ_mean_total
## t = 2.2883, df = 79, p-value = 0.0248
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.03275381 0.44352455
## sample estimates:
##       cor 
## 0.2493201
ASQtable = ASQ_8_recoded  %>% select(., "Deelnemerscode","ASQ_6months_mean",  "ASQ_12months_mean", "ASQ_18months_mean", "ASQ_24months_mean", "ASQ_30months_mean", "ASQ_36months_mean" ,"ASQ_48months_mean","ASQ_60months_mean", "ASQ_mean_total","ASQ_slope") 


write_xlsx(x = ASQtable, path = here("outputmia", "ASQtable.xlsx"), col_names = TRUE)
saveRDS(ASQtable, here("output", "ASQtable.rds")) 

QC microbiome data babies

rm(list=ls())
tse.baby_asq8 <- readRDS(here("outputmia", "tse.baby_asq8.rds"))

meta = data.frame(colData(tse.baby_asq8))
mean(as.numeric(meta$PB_added[!is.na(meta$PB_added)]))
## [1] 747.541
sd(as.numeric(meta$PB_added[!is.na(meta$PB_added)]))
## [1] 293.176
### Plots ####

# Plot sequencing depth by timepoint 
plot1 = ggplot(data.frame(colData(tse.baby_asq8)), aes(x = "", y = SeqDepth)) +
  geom_violin(alpha = 0.7) +
  geom_jitter(width = 0.1, alpha = 0.5, size = 1, color = "darkgray") +
  stat_summary(geom = "point", fun = median, color = "black", size = 2) +
  facet_wrap(~ Timepoint, nrow = 1, scales = "fixed") +
  theme_bw() +  xlab("Infant age in months")+ ylab("Sequencing depth")


# Plot sequencing depth by number of ASVs 
plot2 = ggplot(data.frame(colData(tse.baby_asq8)), aes(x = numASV , y = SeqDepth)) +
  geom_violin(alpha = 0.7) +
  stat_summary(geom = "point", fun = median) +
  theme_bw() +  xlab("number of ASVs")+ ylab("Sequencing depth")

# Plot timepoint by number of ASVs 

plot3 = ggplot(data.frame(colData(tse.baby_asq8)), aes(x = "", y = numASV)) +
  geom_violin(alpha = 0.7) + geom_jitter(width = 0.1, alpha = 0.5, size = 1, color = "darkgray") +
  stat_summary(geom = "point", fun = median, color = "black") +
  facet_wrap(~ Timepoint, nrow = 1, scales = "fixed") +
  theme_bw() +  xlab("Infant age in months")+ ylab("number of ASVs")

(plot1 | plot2 | plot3) + 
  plot_annotation(tag_levels = 'a')

### Tables of sequencing depth ####
# Table with sequencing depths per sample
data.frame(colData(tse.baby_asq8))%>% 
  dplyr::select(SeqDepth) %>%
 knitr::kable(format = "latex", booktabs = FALSE)
# Table with sequencing depth summary statistics by library number
data.frame(colData(tse.baby_asq8))%>% 
  group_by(LibraryNumber) %>% 
  get_summary_stats(SeqDepth, type = "common") %>%
 knitr::kable(format = "latex", booktabs = FALSE)#datatable()
# Table with sequencing depth summary statistics by Timepoint
data.frame(colData(tse.baby_asq8))%>% 
  group_by(Timepoint) %>% 
  get_summary_stats(SeqDepth, type = "common") %>%
  knitr::kable(format = "latex", booktabs = FALSE)
# Create ASV-table and remove all rows where a column (ie all samples) sums to 0> OTU not present in data
# Add variable to metadata containing the total number of ASVs in that sample


# Make a data table containing the sample ID, total number of reads, and total number of ASVs
tbl <- data.frame(colData(tse.baby_asq8)) %>%
  transmute(`Sample ID` = sampleID,
            `No. Reads` = SeqDepth,
            `No. ASVs`  = numASV)

knitr::kable(  tbl,  format   = "latex",  booktabs = FALSE,  longtable = FALSE,  align    = c("l","r","r"),  caption  = "Sequencing depth and ASV counts per sample")
# Make a data table containing for each ASV the number of reads
data.frame(Reads_ASV = rowSums(assay(tse.baby_asq8)))%>%
 knitr::kable(format = "latex", booktabs = FALSE)
data.frame(colData(tse.baby_asq8)) %>% 
  group_by(Timepoint) %>%
  get_summary_stats(numASV, type = "common") %>%
   knitr::kable(format = "latex", booktabs = FALSE)
# Make a correlation plot for number of ASVs, librarynumber, timepoint and seqdepth
cor <- data.frame(colData(tse.baby_asq8)) %>%
  dplyr::select(SeqDepth, LibraryNumber, Timepoint, numASV, ASQ_slope, Gender, BW_infant, GA_weeks) %>%
  sapply(., as.numeric) %>%
  cor(., use = "complete.obs", method = "spearman") 

corrplot::corrplot(cor, method ="number")

Alpha diversity

# Compute alpha indices
rm(list=ls())
tse.baby <- readRDS(here("outputmia", "tse.baby_asq8.rds"))


indices<- c("coverage", "fisher", "gini_simpson", "inverse_simpson",
    "log_modulo_skewness", "shannon")

names <- c("coverage", "fisher", "gini_simpson", "inverse_simpson",
    "log_modulo_skewness", "shannon")

# Calculates indices
tse.baby_alpha <- estimateDiversity(tse.baby, index = indices, name = names)
## Warning in estimateDiversity(tse.baby, index = indices, name = names):
## 'estimateDiversity' is deprecated. Use 'addAlpha' instead.
pairs(colData(tse.baby_alpha)[,names])

# plot correlation matrix of indices (only if abs(correlation) < 0.6)
 

saveRDS(tse.baby_alpha, here("outputmia", "tse.baby_alpha.rds"))

ASQ_slope ~ Alpha diversity

rm(list=ls())
tse.baby_alpha <- readRDS(here("outputmia", "tse.baby_alpha.rds"))

meta <- data.frame(colData(tse.baby_alpha))

# Predict ASQ_slope by shannon # repeated measures without taking into account individual differences in ASQ slope
meta$Deelnemerscode = as.factor(meta$Deelnemerscode)
meta_clean <- na.omit(meta[, c("shannon", "ASQ_slope", "Timepoint", "Gender", "BW_infant", "GA_weeks", "SeqDepth", "Deelnemerscode")])

# linear mixed effects model 
model_shannon <- lmer(shannon  ~ ASQ_slope * Timepoint + Gender + BW_infant + GA_weeks + SeqDepth+ (1 |  Deelnemerscode),  data = meta_clean)
summary(model_shannon)
## Linear mixed model fit by REML ['lmerMod']
## Formula: shannon ~ ASQ_slope * Timepoint + Gender + BW_infant + GA_weeks +  
##     SeqDepth + (1 | Deelnemerscode)
##    Data: meta_clean
## 
## REML criterion at convergence: 630.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.2153 -0.5631  0.0574  0.6468  2.4301 
## 
## Random effects:
##  Groups         Name        Variance Std.Dev.
##  Deelnemerscode (Intercept) 0.06785  0.2605  
##  Residual                   0.20627  0.4542  
## Number of obs: 395, groups:  Deelnemerscode, 80
## 
## Fixed effects:
##                          Estimate    Std. Error t value
## (Intercept)          3.2626511350  1.3307356578   2.452
## ASQ_slope           -3.8970400179  3.7336951306  -1.044
## Timepoint            0.0751796412  0.0071433270  10.524
## Gender               0.0538566706  0.0793271653   0.679
## BW_infant            0.0000200819  0.0000922426   0.218
## GA_weeks            -0.0356850308  0.0356753530  -1.000
## SeqDepth            -0.0000004884  0.0000001845  -2.647
## ASQ_slope:Timepoint  0.7753566587  0.4210812152   1.841
## 
## Correlation of Fixed Effects:
##             (Intr) ASQ_sl Timpnt Gender BW_nfn GA_wks SqDpth
## ASQ_slope   -0.052                                          
## Timepoint   -0.036  0.281                                   
## Gender       0.064  0.132 -0.013                            
## BW_infant    0.075  0.101 -0.003  0.286                     
## GA_weeks    -0.961 -0.002 -0.002 -0.211 -0.330              
## SeqDepth     0.032 -0.043  0.182 -0.053  0.010 -0.058       
## ASQ_slp:Tmp  0.016 -0.743 -0.390  0.001  0.002 -0.003  0.016
## fit warnings:
## Some predictor variables are on very different scales: consider rescaling
plotShannonTimepoint= ggplot(meta, aes(x = as.factor(Timepoint) , y =shannon ))+ geom_boxplot() + theme_classic() + scale_x_discrete(labels=c("2 months", "4 months", "6 months","9 months", "12 months")) +  theme(axis.title.x = element_blank()) +  ylab("Shannon diversity")
plotShannonTimepoint

Beta Diversity - Aitchison Distance

rm(list=ls())
tse.baby_alpha <- readRDS(here("outputmia", "tse.baby_alpha.rds"))
colData(tse.baby_alpha)$Timepoint <- factor(colData(tse.baby_alpha)$Timepoint)

# Perform clr transformation
tse.baby_clr <- transformAssay(tse.baby_alpha, method = "clr", pseudocount =TRUE )# 
## A pseudocount of 1 was applied.
# Extract OTU table and metadata
clr_assay <- assays(tse.baby_clr)$clr
clr_assay= t(clr_assay)

meta <- colData(tse.baby_clr)

# Ordinate using Aitchison distance 
euclidean_dist  <- vegan::vegdist(clr_assay, method = "euclidean")
# Does principal coordinate analysis
euclidean_pcoa <- ecodist::pco(euclidean_dist)

# Calculate % variance explained
eigenvals <- euclidean_pcoa$values
variance_explained <- eigenvals / sum(eigenvals)
percent_var <- round(variance_explained * 100, 1)

# Create data frame with sample metadata
euclidean_pcoa_df <- data.frame(
  pcoa1 = euclidean_pcoa$vectors[,1], 
  pcoa2 = euclidean_pcoa$vectors[,2],
  Timepoint = colData(tse.baby_clr)$Timepoint
)

# Plot with % variance explained in axis labels
euclidean_plot <- ggplot(data = euclidean_pcoa_df, aes(x = pcoa1, y = pcoa2, color = Timepoint)) +
  geom_point() +  stat_ellipse(aes(group = Timepoint), linewidth = 1)+
  labs(
    x = paste0("PC1 (", percent_var[1], "%)"),
    y = paste0("PC2 (", percent_var[2], "%)")
  ) +
  scale_color_discrete(labels = c("2" = "2 months", "4" = "4 months", "6" = "6 months", "9" = "9 months", "12" = "12 months")) +
  theme(title = element_text(size = 12)) +
 theme_classic(base_size = 14)

# supervised plotting

# Filter out missing values in confounders: total N = 71 (w/o confouders N = 72)
uniqueBabies = length(unique(tse.baby_clr$Deelnemerscode_rem))
uniqueBabies
## [1] 81
tse.baby_clr_ASQ <- tse.baby_clr[,!is.na(tse.baby_clr$ASQ_slope)]# &!is.na(BW_infant) & !is.na(GA_weeks))
uniqueBabiesASQ = length(unique(tse.baby_clr_ASQ$Deelnemerscode_rem))
uniqueBabiesASQ
## [1] 81
tse.baby_clr_ASQ_cov <- tse.baby_clr[,!is.na(tse.baby_clr$ASQ_slope) &!is.na(tse.baby_clr$BW_infant) & !is.na(tse.baby_clr$GA_weeks)]
uniqueBabiesASQcov = length(unique(tse.baby_clr_ASQ_cov$Deelnemerscode_rem))
uniqueBabiesASQcov
## [1] 80
# Ordinate using Aitchison distance 
euclidean_dist  <- vegan::vegdist(clr_assay, method = "euclidean")
# Does principal coordinate analysis
meta_babies = data.frame(colData(tse.baby_clr_ASQ_cov))
ait <- capscale(t(assays(tse.baby_clr_ASQ_cov)$clr) ~  ASQ_slope , 
                data = meta_babies, distance = "euclidean")

#there is only one constrained axis as i added only one variable - ASQ slope- that showed a main effect.

#extract CAP axis 1 and 2 values per sample
scores <- data.frame(vegan::scores(ait, display = "sites")) %>%
  mutate(ASQ_slope = meta_babies$ASQ_slope)

#extract proportion explained per CAP axis (1 and 2)
ax1 <- round(summary(ait)$cont$importance[2,][1], 3) * 100
ax2 <- round(summary(ait)$cont$importance[2,][2],3) * 100

p2 <- ggplot(scores,aes(x = scores[,1], y = scores[,2], color = ASQ_slope)) +
  geom_point(size = 2) +
  theme_classic() +
  xlab(paste0(colnames(summary(ait)$cont$importance)[1], " (", ax1, "%)")) +
  ylab(paste0(colnames(summary(ait)$cont$importance)[2], " (", ax2, "%)"))  +
  scale_color_gradient(
    low = "blue",  # Starting color for low values
    high = "red"   # Ending color for high values
  ) +  theme_classic(base_size = 14)


(euclidean_plot | p2 ) + 
  plot_annotation(tag_levels = 'a')

## Aitchison Distance ~ ASQ slope

set.seed(248235)

# Create a permutation scheme, restricting permutations to Deelnemerscode
permu_scheme <- permute::how(within = Within(type = "free"), 
                    plots = Plots(type = "none"),
                    blocks = colData(tse.baby_clr_ASQ_cov)$Deelnemerscode_rem,
                    nperm = 999,
                    observed = TRUE)

# Adonis (permanova) including confounders
set.seed(248235)
adon <- adonis2(t(assays(tse.baby_clr_ASQ_cov)$clr) ~  Timepoint + ASQ_slope + Gender + BW_infant + GA_weeks + SeqDepth,
                data = data.frame(colData(tse.baby_clr_ASQ_cov)), permutations = permu_scheme, 
                method = "euclidean", by = "margin")

adon
## Permutation test for adonis under reduced model
## Marginal effects of terms
## Blocks:  colData(tse.baby_clr_ASQ_cov)$Deelnemerscode_rem 
## Permutation: free
## Number of permutations: 999
## 
## adonis2(formula = t(assays(tse.baby_clr_ASQ_cov)$clr) ~ Timepoint + ASQ_slope + Gender + BW_infant + GA_weeks + SeqDepth, data = data.frame(colData(tse.baby_clr_ASQ_cov)), permutations = permu_scheme, method = "euclidean", by = "margin")
##            Df SumOfSqs      R2      F Pr(>F)    
## Timepoint   4    54586 0.07439 7.9463  0.001 ***
## ASQ_slope   1     4466 0.00609 2.6006  0.001 ***
## Gender      1     3726 0.00508 2.1695  0.010 ** 
## BW_infant   1     2479 0.00338 1.4438  0.001 ***
## GA_weeks    1     3580 0.00488 2.0848  0.002 ** 
## SeqDepth    1     4867 0.00663 2.8338  0.003 ** 
## Residual  385   661173 0.90110                  
## Total     394   733742 1.00000                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
set.seed(63737)
adon <- adonis2(t(assays(tse.baby_clr_ASQ_cov)$clr) ~  Timepoint * ASQ_slope + Gender + BW_infant + GA_weeks + SeqDepth,
                data = data.frame(colData(tse.baby_clr_ASQ_cov)), permutations = permu_scheme, 
                method = "euclidean", by = "margin")

adon
## Permutation test for adonis under reduced model
## Marginal effects of terms
## Blocks:  colData(tse.baby_clr_ASQ_cov)$Deelnemerscode_rem 
## Permutation: free
## Number of permutations: 999
## 
## adonis2(formula = t(assays(tse.baby_clr_ASQ_cov)$clr) ~ Timepoint * ASQ_slope + Gender + BW_infant + GA_weeks + SeqDepth, data = data.frame(colData(tse.baby_clr_ASQ_cov)), permutations = permu_scheme, method = "euclidean", by = "margin")
##                      Df SumOfSqs      R2      F Pr(>F)    
## Gender                1     3719 0.00507 2.1632  0.011 *  
## BW_infant             1     2480 0.00338 1.4426  0.001 ***
## GA_weeks              1     3583 0.00488 2.0842  0.001 ***
## SeqDepth              1     4919 0.00670 2.8614  0.005 ** 
## Timepoint:ASQ_slope   4     6213 0.00847 0.9035  0.235    
## Residual            381   654960 0.89263                  
## Total               394   733742 1.00000                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Run LMM (maaslin)

rm(list=ls())
# 10% prevalence filtering across timepoints
tse.baby_alpha <- readRDS(here("outputmia", "tse.baby_alpha.rds"))
tse.genprev= agglomerateByRank(tse.baby_alpha, rank ="Genus", agglomerateTree= TRUE) 
length(names(tse.genprev))
## [1] 301
tse.genprev= tse.genprev[rowData(tse.genprev)$Genus != ""] 
length(names(tse.genprev))
## [1] 301
tse.genprev= tse.genprev[rowData(tse.genprev)$Genus != "__^"] 
tse.genprev <- tse.genprev[!grepl("^__", rowData(tse.genprev)$Genus)]
length(names(tse.genprev))
## [1] 279
tse.genprev <- mergeFeaturesByPrevalence(tse.genprev, rank = "Genus",  prevalence = 10 / 100, detection = 0)
tse.genprev = transformAssay(tse.genprev, assay.type = "counts", method= "relabundance") 
tse.genprev = transformAssay(tse.genprev, assay.type = "counts", method= "clr", pseudocount = TRUE) #
## A pseudocount of 1 was applied.
tse.genprev = transformAssay(tse.genprev, assay.type = "counts", method= "pa") #

rownames(tse.genprev) <- gsub("\\[|\\]", "", rownames(tse.genprev))

saveRDS(tse.genprev, here("outputmia", "tse.genprev.rds"))
#tse.genprev <- readRDS(here("outputmia", "tse.genprev.rds"))

length(unique(colData(tse.genprev)$Deelnemerscode_rem))
## [1] 81
meta <- data.frame(colData(tse.genprev))

meta$ASQtime_interaction <- meta$ASQ_slope * meta$Timepoint

# Interaction effects between time and ASQ_slope of microbial abundance 
fit_data = Maaslin2(
  input_data = data.frame(assays(tse.genprev)[[3]]),
  input_metadata = meta,
  output = "asq8_mia",
  fixed_effects = c("ASQtime_interaction", "ASQ_slope",  "Timepoint", "Gender", "BW_infant", "GA_weeks", "SeqDepth"),
  random_effects = c("Deelnemerscode_rem"),
  normalization = "NONE", 
  transform = "NONE",
  max_significance = 0.05,
  min_prevalence = 0)
## [1] "Warning: Deleting existing log file: asq8_mia/maaslin2.log"
## 2026-05-27 15:30:07.601821 INFO::Writing function arguments to log file
## 2026-05-27 15:30:07.657744 INFO::Verifying options selected are valid
## 2026-05-27 15:30:07.892219 INFO::Determining format of input files
## 2026-05-27 15:30:07.896762 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-27 15:30:07.916546 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-27 15:30:07.919219 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-27 15:30:07.922283 INFO::Filter data based on min abundance and min prevalence
## 2026-05-27 15:30:07.924986 INFO::Total samples in data: 400
## 2026-05-27 15:30:07.928077 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-27 15:30:07.932605 INFO::Total filtered features: 0
## 2026-05-27 15:30:07.935497 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-27 15:30:07.940339 INFO::Total filtered features with variance filtering: 0
## 2026-05-27 15:30:07.943329 INFO::Filtered feature names from variance filtering:
## 2026-05-27 15:30:07.94744 INFO::Running selected normalization method: NONE
## 2026-05-27 15:30:07.952385 INFO::Applying z-score to standardize continuous metadata
## 2026-05-27 15:30:07.963402 INFO::Running selected transform method: NONE
## 2026-05-27 15:30:07.967087 INFO::Running selected analysis method: LM
## 2026-05-27 15:30:08.016328 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-27 15:30:08.273689 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## 2026-05-27 15:30:08.378981 INFO::Fitting model to feature number 3, Eubacterium_hallii_group
## 2026-05-27 15:30:08.484776 INFO::Fitting model to feature number 4, Ruminococcus_gnavus_group
## 2026-05-27 15:30:08.562717 INFO::Fitting model to feature number 5, Ruminococcus_torques_group
## 2026-05-27 15:30:08.632575 INFO::Fitting model to feature number 6, Actinomyces
## 2026-05-27 15:30:08.699803 INFO::Fitting model to feature number 7, Akkermansia
## 2026-05-27 15:30:08.764762 INFO::Fitting model to feature number 8, Alistipes
## 2026-05-27 15:30:08.831935 INFO::Fitting model to feature number 9, Anaerostipes
## 2026-05-27 15:30:08.901763 INFO::Fitting model to feature number 10, Bacteroides
## 2026-05-27 15:30:08.970068 INFO::Fitting model to feature number 11, Bifidobacterium
## 2026-05-27 15:30:09.033661 INFO::Fitting model to feature number 12, Blautia
## 2026-05-27 15:30:09.101818 INFO::Fitting model to feature number 13, Butyricicoccus
## 2026-05-27 15:30:09.167339 INFO::Fitting model to feature number 14, Clostridioides
## 2026-05-27 15:30:09.267408 INFO::Fitting model to feature number 15, Clostridium_sensu_stricto_1
## 2026-05-27 15:30:09.381687 INFO::Fitting model to feature number 16, Collinsella
## 2026-05-27 15:30:09.559272 INFO::Fitting model to feature number 17, Dorea
## 2026-05-27 15:30:09.645357 INFO::Fitting model to feature number 18, Eggerthella
## 2026-05-27 15:30:09.729072 INFO::Fitting model to feature number 19, Enterococcus
## 2026-05-27 15:30:09.79469 INFO::Fitting model to feature number 20, Erysipelatoclostridium
## 2026-05-27 15:30:09.869169 INFO::Fitting model to feature number 21, Faecalibacterium
## 2026-05-27 15:30:09.935217 INFO::Fitting model to feature number 22, Flavonifractor
## 2026-05-27 15:30:10.003866 INFO::Fitting model to feature number 23, Fusicatenibacter
## 2026-05-27 15:30:10.071071 INFO::Fitting model to feature number 24, Haemophilus
## 2026-05-27 15:30:10.137626 INFO::Fitting model to feature number 25, Intestinibacter
## 2026-05-27 15:30:10.201922 INFO::Fitting model to feature number 26, Lachnoclostridium
## 2026-05-27 15:30:10.271378 INFO::Fitting model to feature number 27, Lachnospira
## 2026-05-27 15:30:10.335067 INFO::Fitting model to feature number 28, Lachnospiraceae_NK4A136_group
## 2026-05-27 15:30:10.402642 INFO::Fitting model to feature number 29, Lachnospiraceae_UCG.004
## 2026-05-27 15:30:10.474563 INFO::Fitting model to feature number 30, Lactobacillus
## 2026-05-27 15:30:10.538517 INFO::Fitting model to feature number 31, Megasphaera
## 2026-05-27 15:30:10.607649 INFO::Fitting model to feature number 32, Parabacteroides
## 2026-05-27 15:30:10.672234 INFO::Fitting model to feature number 33, Roseburia
## 2026-05-27 15:30:10.737602 INFO::Fitting model to feature number 34, Ruminococcaceae_UCG.013
## 2026-05-27 15:30:10.802571 INFO::Fitting model to feature number 35, Sellimonas
## 2026-05-27 15:30:10.874006 INFO::Fitting model to feature number 36, Senegalimassilia
## 2026-05-27 15:30:10.942122 INFO::Fitting model to feature number 37, Streptococcus
## 2026-05-27 15:30:11.020351 INFO::Fitting model to feature number 38, Subdoligranulum
## 2026-05-27 15:30:11.085893 INFO::Fitting model to feature number 39, Sutterella
## 2026-05-27 15:30:11.153517 INFO::Fitting model to feature number 40, Tyzzerella_4
## 2026-05-27 15:30:11.221069 INFO::Fitting model to feature number 41, uncultured_6
## 2026-05-27 15:30:11.284889 INFO::Fitting model to feature number 42, Veillonella
## 2026-05-27 15:30:11.348903 INFO::Fitting model to feature number 43, Other
## 2026-05-27 15:30:11.433039 INFO::Counting total values for each feature
## 2026-05-27 15:30:11.448472 INFO::Writing filtered data to file asq8_mia/features/filtered_data.tsv
## 2026-05-27 15:30:11.500817 INFO::Writing filtered, normalized data to file asq8_mia/features/filtered_data_norm.tsv
## 2026-05-27 15:30:11.553418 INFO::Writing filtered, normalized, transformed data to file asq8_mia/features/filtered_data_norm_transformed.tsv
## 2026-05-27 15:30:11.612192 WARNING::Deleting existing residuals file: asq8_mia/fits/residuals.rds
## 2026-05-27 15:30:11.617514 INFO::Writing residuals to file asq8_mia/fits/residuals.rds
## 2026-05-27 15:30:11.631754 WARNING::Deleting existing fitted file: asq8_mia/fits/fitted.rds
## 2026-05-27 15:30:11.637225 INFO::Writing fitted values to file asq8_mia/fits/fitted.rds
## 2026-05-27 15:30:11.654575 WARNING::Deleting existing ranef file: asq8_mia/fits/ranef.rds
## 2026-05-27 15:30:11.662684 INFO::Writing extracted random effects to file asq8_mia/fits/ranef.rds
## 2026-05-27 15:30:11.670047 INFO::Writing all results to file (ordered by increasing q-values): asq8_mia/all_results.tsv
## 2026-05-27 15:30:11.686002 INFO::Writing the significant results (those which are less than or equal to the threshold of 0.050000 ) to file (ordered by increasing q-values): asq8_mia/significant_results.tsv
## 2026-05-27 15:30:11.694895 INFO::Writing heatmap of significant results to file: asq8_mia/heatmap.pdf
## 2026-05-27 15:30:11.98234 INFO::Writing association plots (one for each significant association) to output folder: asq8_mia
## 2026-05-27 15:30:11.991607 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-27 15:30:11.994543 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-27 15:30:12.000227 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:12.32895 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:12.639918 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:12.946364 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:13.29304 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:13.615588 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:13.864958 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:14.156331 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:14.442538 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:14.928906 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:15.225146 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:15.507432 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:15.783524 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:16.084837 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:16.366781 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:16.66492 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:16.93551 INFO::Creating scatter plot for continuous data, Timepoint vs Alistipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:17.266343 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:17.577389 INFO::Creating scatter plot for continuous data, Timepoint vs Streptococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:17.879844 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:18.192505 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnoclostridium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:18.488959 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:18.764101 INFO::Creating scatter plot for continuous data, Timepoint vs Sellimonas
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:19.043175 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:19.311923 INFO::Creating scatter plot for continuous data, Timepoint vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:19.610048 INFO::Creating scatter plot for continuous data, Timepoint vs Haemophilus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:19.862735 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_hallii_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:20.248422 INFO::Creating scatter plot for continuous data, Timepoint vs Butyricicoccus
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:24.096253 INFO::Plotting data for metadata number 2, SeqDepth
## 2026-05-27 15:30:24.102508 INFO::Creating scatter plot for continuous data, SeqDepth vs Other
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:24.34605 INFO::Creating scatter plot for continuous data, SeqDepth vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:24.725993 INFO::Creating scatter plot for continuous data, SeqDepth vs Ruminococcaceae_UCG.013
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:25.032144 INFO::Creating scatter plot for continuous data, SeqDepth vs Sellimonas
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:27.581859 INFO::Plotting data for metadata number 3, ASQtime_interaction
## 2026-05-27 15:30:27.588999 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:28.465598 INFO::Plotting data for metadata number 4, GA_weeks
## 2026-05-27 15:30:28.471206 INFO::Creating scatter plot for continuous data, GA_weeks vs Streptococcus
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:29.161953 INFO::Plotting data for metadata number 5, ASQ_slope
## 2026-05-27 15:30:29.168678 INFO::Creating scatter plot for continuous data, ASQ_slope vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
#

output_maaslin = readr::read_tsv(here("asq8_mia/all_results.tsv"))
## Rows: 301 Columns: 9
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: "\t"
## chr (3): feature, metadata, value
## dbl (6): coef, stderr, N, N.not.0, pval, qval
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
#output_maaslin[output_maaslin$feature=="Eggerthella",]

# Timepoint effects
Prevalence_filtered =t(data.frame(t(getPrevalence(tse.genprev, sort=TRUE, assay.type= "relabundance"))))
sort(Prevalence_filtered)
##  [1] 0.1025 0.1125 0.1125 0.1200 0.1250 0.1275 0.1300 0.1325 0.1325 0.1325
## [11] 0.1325 0.1425 0.1475 0.1525 0.1525 0.1525 0.1900 0.2000 0.2050 0.2200
## [21] 0.2250 0.2300 0.2450 0.2550 0.2650 0.2750 0.3050 0.3125 0.3475 0.3700
## [31] 0.3775 0.3825 0.3825 0.3950 0.4350 0.5000 0.5150 0.5550 0.7450 0.7650
## [41] 0.8175 0.8275 0.9700
Prevalence_filtered
##                                 [,1]
## Bifidobacterium               0.9700
## Streptococcus                 0.8275
## Veillonella                   0.8175
## Other                         0.7650
## Bacteroides                   0.7450
## Enterococcus                  0.5550
## Ruminococcus_gnavus_group     0.5150
## Clostridium_sensu_stricto_1   0.5000
## Intestinibacter               0.4350
## Erysipelatoclostridium        0.3950
## Lactobacillus                 0.3825
## Blautia                       0.3825
## Parabacteroides               0.3775
## Lachnoclostridium             0.3700
## Haemophilus                   0.3475
## Sutterella                    0.3125
## Anaerostipes                  0.3050
## Faecalibacterium              0.2750
## Collinsella                   0.2650
## Eggerthella                   0.2550
## Flavonifractor                0.2450
## Lachnospira                   0.2300
## Dorea                         0.2250
## Ruminococcus_torques_group    0.2200
## Actinomyces                   0.2050
## Fusicatenibacter              0.2000
## Roseburia                     0.1900
## uncultured_6                  0.1525
## Butyricicoccus                0.1525
## Clostridium_innocuum_group    0.1525
## Eubacterium_eligens_group     0.1475
## Lachnospiraceae_UCG.004       0.1425
## Tyzzerella_4                  0.1325
## Senegalimassilia              0.1325
## Megasphaera                   0.1325
## Lachnospiraceae_NK4A136_group 0.1325
## Subdoligranulum               0.1300
## Eubacterium_hallii_group      0.1275
## Akkermansia                   0.1250
## Sellimonas                    0.1200
## Ruminococcaceae_UCG.013       0.1125
## Clostridioides                0.1125
## Alistipes                     0.1025
otu_tse <- data.frame(t(assays(tse.genprev)[[3]]))
otu_tse$sampleID = rownames(otu_tse)

meta_otu = dplyr::left_join(otu_tse, select(meta,contains("ASQ"), sampleID, Deelnemerscode, Timepoint, Relationship, Gender ,GA_weeks, BW_infant ,Maternal_age, SeqDepth,ASQ_60months_mean,ASQ_6months_mean, ASQ_slope_grouped, ASQ_slope_grouped_numeric, ASQ_slope_zerogrouped) , by= "sampleID")

saveRDS(meta_otu, here("outputmia", "meta_otu.rds"))


Timepoint <- output_maaslin[output_maaslin$metadata %in% c("Timepoint"), ]
TimepointQ = Timepoint[Timepoint$qval < 0.05,]
TimepointQ
## # A tibble: 28 × 9
##    feature          metadata value   coef stderr     N N.not.0     pval     qval
##    <chr>            <chr>    <chr>  <dbl>  <dbl> <dbl>   <dbl>    <dbl>    <dbl>
##  1 Faecalibacterium Timepoi… Time…  2.00  0.146    400     110 8.13e-34 2.45e-31
##  2 Anaerostipes     Timepoi… Time…  1.64  0.127    400     122 6.82e-31 1.03e-28
##  3 Actinomyces      Timepoi… Time… -1.71  0.136    400      82 9.68e-30 9.71e-28
##  4 Blautia          Timepoi… Time…  1.89  0.151    400     153 1.67e-29 1.26e-27
##  5 Bifidobacterium  Timepoi… Time… -1.14  0.115    400     388 3.06e-20 1.84e-18
##  6 Enterococcus     Timepoi… Time… -1.61  0.191    400     220 1.36e-15 6.81e-14
##  7 Senegalimassilia Timepoi… Time… -0.621 0.0755   400      53 5.14e-15 2.21e-13
##  8 Lactobacillus    Timepoi… Time… -1.54  0.189    400     152 7.53e-15 2.83e-13
##  9 Clostridioides   Timepoi… Time… -0.782 0.110    400      45 7.32e-12 2.45e-10
## 10 Fusicatenibacter Timepoi… Time…  0.823 0.119    400      79 2.80e-11 8.43e-10
## # ℹ 18 more rows
#Plot effects of Timepoint per increasing and decreasing taxa
significant_genera_timepoint = TimepointQ$feature

significant_genera_negtimepoint =  data.frame(TimepointQ[TimepointQ$coef<0,1])
significant_genera_postimepoint =  data.frame(TimepointQ[TimepointQ$coef>0,1])

meta_otu_timepoint = meta_otu %>% select(Timepoint,  all_of(TimepointQ$feature))

#table with CLR values
mediansCLRTimepoint <- t(meta_otu_timepoint %>% group_by(Timepoint) %>%
    summarise( across(where(is.numeric), \(x) median(x, na.rm = TRUE)),
      .groups = "drop"))

IQRCLRTimepoint <- t(meta_otu_timepoint %>% group_by(Timepoint) %>%
    summarise( across(where(is.numeric), \(x) IQR(x, na.rm = TRUE)),
      .groups = "drop"))

meta_otu_timepoint = meta_otu %>% select(Timepoint,  all_of(significant_genera_negtimepoint$feature))

# Reshape the data to long format for easier plotting with ggplot2
meta_otu_long <- meta_otu_timepoint %>%
  pivot_longer(cols = all_of(significant_genera_negtimepoint$feature), 
               names_to = "Genus", 
               values_to = "CLR_values")

# Create the plot
Timepoint_plotneg <- ggplot(meta_otu_long, aes(x = Timepoint, y = CLR_values, color = Genus)) +
  theme_classic() + labs( y = "CLR values") + theme(axis.text=element_text(size=14),
        axis.title=element_text(size=14),axis.title.x = element_blank())+  scale_x_continuous(breaks = c(2, 4, 6, 9,12), labels = c("2 months", "4 months", "6 months", "9 months", "12 months")) +  theme(legend.key.width = unit(4, "cm")) +  labs(color = "Legend 1")
  

# Add median lines
Timepoint_plotneg <- Timepoint_plotneg +
  stat_summary(fun = median, geom = "line", aes(group = Genus), size = 1, show.legend = TRUE) + 
  scale_color_discrete(name = "Genera")+
  stat_summary(fun.data = function(x) {
    data.frame(y = median(x), 
               ymin = quantile(x, 0.25), 
               ymax = quantile(x, 0.75))
  }, geom = "errorbar", width = 0.2, position = position_dodge(0.1)) + theme(legend.text = element_text(size = 15))

#print(Timepoint_plotneg)

meta_otu_timepoint = meta_otu %>% select(Timepoint,  all_of(significant_genera_postimepoint$feature))

# Reshape the data to long format for plotting 
meta_otu_long <- meta_otu_timepoint %>%
  pivot_longer(cols = all_of(significant_genera_postimepoint$feature), 
               names_to = "Genus", 
               values_to = "CLR_values")

# Create the plot
Timepoint_plotpos <- ggplot(meta_otu_long, aes(x = Timepoint, y = CLR_values, color = Genus)) +
  theme_classic() + labs( y = "CLR values")+ theme(axis.text=element_text(size=14),
        axis.title=element_text(size=14),axis.title.x = element_blank()) +  scale_x_continuous(breaks = c(2, 4, 6, 9,12), labels = c("2 months", "4 months", "6 months", "9 months", "12 months"))  +  theme(legend.key.width = unit(2, "cm")) +  labs(color = "Legend 1")
  

# Add median lines
Timepoint_plotpos <- Timepoint_plotpos +
  stat_summary(fun = median, geom = "line", aes(group = Genus), size = 1, show.legend = TRUE) + 
  scale_color_discrete(name = "Genera")+
  stat_summary(fun.data = function(x) {
    data.frame(y = median(x), 
               ymin = quantile(x, 0.25), 
               ymax = quantile(x, 0.75))
  }, geom = "errorbar", width = 0.2, position = position_dodge(0.1)) + theme(legend.text = element_text(size = 15))

# Print the plot
#print(Timepoint_plotpos)

# Add plot titles 
Timepoint_plotpos_labeled <- Timepoint_plotpos +
  ggtitle("Genera increasing over the first year of life") +
  theme(legend.position = "right")

Timepoint_plotneg_labeled <- Timepoint_plotneg +
  ggtitle("Genera decreasing over the first year of life") +
  theme(legend.position = "right")

# Combine into vertical layout with shared legend

p1 <- Timepoint_plotpos_labeled + labs(tag = "a")
p2 <- Timepoint_plotneg_labeled + labs(tag = "b")

combined_plot <- (p1 / p2) +
  plot_layout(guides = "collect") &
  theme(legend.position = "right",
        plot.tag = element_text(face = "bold"))

print(combined_plot)

# Prevalence table
#select from tse.genprev just the timepoint significant genera 

significant_genera_timepoint= union(significant_genera_negtimepoint, significant_genera_postimepoint)
Prevalence_filtered_timepoint = data.frame(Prevalence_filtered[rownames(Prevalence_filtered) %in% significant_genera_timepoint$feature,])
colnames(Prevalence_filtered_timepoint) = "prevalence"
rownames(Prevalence_filtered_timepoint) = gsub("X.", "[", rownames(Prevalence_filtered_timepoint))
rownames(Prevalence_filtered_timepoint) = gsub("\\._", "]_", rownames(Prevalence_filtered_timepoint))
Prevalence_filtered_timepoint$Genus = rownames(Prevalence_filtered_timepoint)
significant_genera_timepoint$feature = gsub("X.", "[", significant_genera_timepoint$feature)
significant_genera_timepoint$feature = gsub("\\._", "]_", significant_genera_timepoint$feature)
tse.genprev_timepoint =  tse.genprev[rowData(tse.genprev)$Genus %in% significant_genera_timepoint$feature, ]

# get prevalence for each time point
prevalence_by_timepoint <- lapply(unique(colData(tse.genprev_timepoint)$Timepoint), function(tp) {
    tse_timepoint <- tse.genprev_timepoint[, colData(tse.genprev_timepoint)$Timepoint == tp]
    data.frame(
        Timepoint = tp,
        Genus = rownames(tse_timepoint),
        Prevalence = getPrevalence(tse_timepoint)
    )
})

# Combine into one data frame, plot and make into a wide format table
prevalence_by_timepoint <- do.call(rbind, prevalence_by_timepoint)

prevalence_by_timepoint_wide <- prevalence_by_timepoint %>%
  pivot_wider(names_from = Timepoint, values_from = Prevalence)

prevalence_by_timepoint_wide= prevalence_by_timepoint_wide[match(significant_genera_timepoint$feature,prevalence_by_timepoint_wide$Genus), ]

prevalence_by_timepoint_wide = left_join(prevalence_by_timepoint_wide, Prevalence_filtered_timepoint, by = "Genus")
write_xlsx(x = prevalence_by_timepoint_wide, path = here("outputmia", "prevalence_by_timepoint_wide.xlsx"), col_names = TRUE)

# ASQ effects

ASQtime_interaction_all <- output_maaslin[output_maaslin$metadata %in% c("ASQtime_interaction"), ]
ASQtime_interactionQ = ASQtime_interaction_all[ASQtime_interaction_all$qval < 0.05,]
ASQtime_interactionQ
## # A tibble: 1 × 9
##   feature     metadata          value  coef stderr     N N.not.0    pval    qval
##   <chr>       <chr>             <chr> <dbl>  <dbl> <dbl>   <dbl>   <dbl>   <dbl>
## 1 Eggerthella ASQtime_interact… ASQt… 0.709  0.211   400     100 9.00e-4 0.00934
ASQtime_interactionQ_genus = ASQtime_interactionQ$feature
ASQtime_interactionP = ASQtime_interaction_all[ASQtime_interaction_all$pval < 0.05,]
ASQtime_interactionP
## # A tibble: 2 × 9
##   feature             metadata value   coef stderr     N N.not.0    pval    qval
##   <chr>               <chr>    <chr>  <dbl>  <dbl> <dbl>   <dbl>   <dbl>   <dbl>
## 1 Eggerthella         ASQtime… ASQt…  0.709  0.211   400     100 9.00e-4 0.00934
## 2 Lachnospiraceae_UC… ASQtime… ASQt… -0.379  0.173   400      57 2.87e-2 0.184
ASQtime_interactionP_genus = ASQtime_interactionP$feature

output_maaslin[output_maaslin$feature=="Eggerthella",]
## # A tibble: 7 × 9
##   feature     metadata        value    coef stderr     N N.not.0    pval    qval
##   <chr>       <chr>           <chr>   <dbl>  <dbl> <dbl>   <dbl>   <dbl>   <dbl>
## 1 Eggerthella Timepoint       Time… -0.467   0.110   400     100 2.75e-5 3.53e-4
## 2 Eggerthella ASQtime_intera… ASQt…  0.709   0.211   400     100 9.00e-4 9.34e-3
## 3 Eggerthella ASQ_slope       ASQ_… -0.511   0.254   400     100 4.55e-2 2.45e-1
## 4 Eggerthella GA_weeks        GA_w…  0.141   0.185   400     100 4.48e-1 8.26e-1
## 5 Eggerthella BW_infant       BW_i…  0.140   0.190   400     100 4.65e-1 8.43e-1
## 6 Eggerthella Gender          Gend… -0.0615  0.185   400     100 7.40e-1 9.56e-1
## 7 Eggerthella SeqDepth        SeqD…  0.0260  0.110   400     100 8.14e-1 9.80e-1
ASQtime_main_all <- output_maaslin[output_maaslin$metadata %in% c("ASQ_slope"), ]
ASQtime_mainQ = ASQtime_main_all[ASQtime_main_all$qval < 0.05,]
ASQtime_mainQ
## # A tibble: 1 × 9
##   feature         metadata  value       coef stderr     N N.not.0    pval   qval
##   <chr>           <chr>     <chr>      <dbl>  <dbl> <dbl>   <dbl>   <dbl>  <dbl>
## 1 Bifidobacterium ASQ_slope ASQ_slope -0.684  0.232   400     388 0.00347 0.0299
ASQtime_mainQ_genus = ASQtime_mainQ$feature
ASQtime_mainP = ASQtime_main_all[ASQtime_main_all$pval < 0.05,]
ASQtime_mainP
## # A tibble: 2 × 9
##   feature         metadata  value       coef stderr     N N.not.0    pval   qval
##   <chr>           <chr>     <chr>      <dbl>  <dbl> <dbl>   <dbl>   <dbl>  <dbl>
## 1 Bifidobacterium ASQ_slope ASQ_slope -0.684  0.232   400     388 0.00347 0.0299
## 2 Eggerthella     ASQ_slope ASQ_slope -0.511  0.254   400     100 0.0455  0.245
ASQtime_mainP_genus = ASQtime_mainP$feature

output_maaslin[output_maaslin$feature=="Bifidobacterium",]
## # A tibble: 7 × 9
##   feature         metadata  value    coef stderr     N N.not.0     pval     qval
##   <chr>           <chr>     <chr>   <dbl>  <dbl> <dbl>   <dbl>    <dbl>    <dbl>
## 1 Bifidobacterium Timepoint Time… -1.14    0.115   400     388 3.06e-20 1.84e-18
## 2 Bifidobacterium SeqDepth  SeqD…  0.455   0.111   400     388 5.16e- 5 5.97e- 4
## 3 Bifidobacterium ASQ_slope ASQ_… -0.684   0.232   400     388 3.47e- 3 2.99e- 2
## 4 Bifidobacterium ASQtime_… ASQt…  0.413   0.222   400     388 6.39e- 2 3.00e- 1
## 5 Bifidobacterium Gender    Gend… -0.168   0.138   400     388 2.25e- 1 6.35e- 1
## 6 Bifidobacterium BW_infant BW_i…  0.0772  0.141   400     388 5.86e- 1 9.02e- 1
## 7 Bifidobacterium GA_weeks  GA_w… -0.0738  0.138   400     388 5.94e- 1 9.02e- 1
#post-hoc tests 

# Slope of Eggerthella over time per ASQ group split by zero, extract only Eggerthella
tse_Earlyzero <- tse.genprev[, colData(tse.genprev)$ASQ_slope_zerogrouped == "1"]
tse_Latezero <- tse.genprev[, colData(tse.genprev)$ASQ_slope_zerogrouped == "2"]

fit_data = Maaslin2(
  input_data = data.frame(assays(tse_Earlyzero)[[3]]),
  input_metadata = data.frame(colData(tse_Earlyzero)),
  output = "asq8_Earlyzero",
  fixed_effects = c( "Timepoint", "Gender", "BW_infant", "GA_weeks", "SeqDepth"),
  random_effects = c("Deelnemerscode_rem"),
  normalization = "NONE", 
  transform = "NONE",
  max_significance = 0.05,
  min_prevalence = 0)
## [1] "Warning: Deleting existing log file: asq8_Earlyzero/maaslin2.log"
## 2026-05-27 15:30:34.840483 INFO::Writing function arguments to log file
## 2026-05-27 15:30:34.879824 INFO::Verifying options selected are valid
## 2026-05-27 15:30:34.883742 INFO::Determining format of input files
## 2026-05-27 15:30:34.889094 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-27 15:30:34.904756 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-27 15:30:34.907796 INFO::Formula for fixed effects: expr ~  Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-27 15:30:34.91082 INFO::Filter data based on min abundance and min prevalence
## 2026-05-27 15:30:34.913764 INFO::Total samples in data: 123
## 2026-05-27 15:30:34.916443 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-27 15:30:34.920558 INFO::Total filtered features: 0
## 2026-05-27 15:30:34.924042 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-27 15:30:34.928868 INFO::Total filtered features with variance filtering: 0
## 2026-05-27 15:30:34.931521 INFO::Filtered feature names from variance filtering:
## 2026-05-27 15:30:34.934202 INFO::Running selected normalization method: NONE
## 2026-05-27 15:30:34.936781 INFO::Applying z-score to standardize continuous metadata
## 2026-05-27 15:30:34.948848 INFO::Running selected transform method: NONE
## 2026-05-27 15:30:34.951255 INFO::Running selected analysis method: LM
## 2026-05-27 15:30:34.954373 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-27 15:30:35.02537 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## 2026-05-27 15:30:35.091604 INFO::Fitting model to feature number 3, Eubacterium_hallii_group
## 2026-05-27 15:30:35.155283 INFO::Fitting model to feature number 4, Ruminococcus_gnavus_group
## 2026-05-27 15:30:35.219194 INFO::Fitting model to feature number 5, Ruminococcus_torques_group
## 2026-05-27 15:30:35.292107 INFO::Fitting model to feature number 6, Actinomyces
## boundary (singular) fit: see help('isSingular')
## 2026-05-27 15:30:35.363482 INFO::Fitting model to feature number 7, Akkermansia
## 2026-05-27 15:30:35.426743 INFO::Fitting model to feature number 8, Alistipes
## 2026-05-27 15:30:35.495478 INFO::Fitting model to feature number 9, Anaerostipes
## 2026-05-27 15:30:35.555627 INFO::Fitting model to feature number 10, Bacteroides
## 2026-05-27 15:30:35.631424 INFO::Fitting model to feature number 11, Bifidobacterium
## 2026-05-27 15:30:35.745399 INFO::Fitting model to feature number 12, Blautia
## 2026-05-27 15:30:35.838234 INFO::Fitting model to feature number 13, Butyricicoccus
## boundary (singular) fit: see help('isSingular')
## 2026-05-27 15:30:35.912074 INFO::Fitting model to feature number 14, Clostridioides
## boundary (singular) fit: see help('isSingular')
## 2026-05-27 15:30:35.981456 INFO::Fitting model to feature number 15, Clostridium_sensu_stricto_1
## 2026-05-27 15:30:36.063432 INFO::Fitting model to feature number 16, Collinsella
## 2026-05-27 15:30:36.149806 INFO::Fitting model to feature number 17, Dorea
## 2026-05-27 15:30:36.261723 INFO::Fitting model to feature number 18, Eggerthella
## 2026-05-27 15:30:36.383305 INFO::Fitting model to feature number 19, Enterococcus
## 2026-05-27 15:30:36.470209 INFO::Fitting model to feature number 20, Erysipelatoclostridium
## 2026-05-27 15:30:36.533758 INFO::Fitting model to feature number 21, Faecalibacterium
## 2026-05-27 15:30:36.597935 INFO::Fitting model to feature number 22, Flavonifractor
## 2026-05-27 15:30:36.662676 INFO::Fitting model to feature number 23, Fusicatenibacter
## 2026-05-27 15:30:36.72444 INFO::Fitting model to feature number 24, Haemophilus
## 2026-05-27 15:30:36.788158 INFO::Fitting model to feature number 25, Intestinibacter
## 2026-05-27 15:30:36.860338 INFO::Fitting model to feature number 26, Lachnoclostridium
## 2026-05-27 15:30:36.938889 INFO::Fitting model to feature number 27, Lachnospira
## boundary (singular) fit: see help('isSingular')
## 2026-05-27 15:30:37.033591 INFO::Fitting model to feature number 28, Lachnospiraceae_NK4A136_group
## 2026-05-27 15:30:37.152325 INFO::Fitting model to feature number 29, Lachnospiraceae_UCG.004
## 2026-05-27 15:30:37.241449 INFO::Fitting model to feature number 30, Lactobacillus
## 2026-05-27 15:30:37.313473 INFO::Fitting model to feature number 31, Megasphaera
## 2026-05-27 15:30:37.377892 INFO::Fitting model to feature number 32, Parabacteroides
## 2026-05-27 15:30:37.440965 INFO::Fitting model to feature number 33, Roseburia
## boundary (singular) fit: see help('isSingular')
## 2026-05-27 15:30:37.514564 INFO::Fitting model to feature number 34, Ruminococcaceae_UCG.013
## 2026-05-27 15:30:37.577765 INFO::Fitting model to feature number 35, Sellimonas
## 2026-05-27 15:30:37.653884 INFO::Fitting model to feature number 36, Senegalimassilia
## 2026-05-27 15:30:37.719419 INFO::Fitting model to feature number 37, Streptococcus
## 2026-05-27 15:30:37.78765 INFO::Fitting model to feature number 38, Subdoligranulum
## 2026-05-27 15:30:37.85122 INFO::Fitting model to feature number 39, Sutterella
## 2026-05-27 15:30:37.916356 INFO::Fitting model to feature number 40, Tyzzerella_4
## 2026-05-27 15:30:37.98421 INFO::Fitting model to feature number 41, uncultured_6
## 2026-05-27 15:30:38.054114 INFO::Fitting model to feature number 42, Veillonella
## 2026-05-27 15:30:38.115045 INFO::Fitting model to feature number 43, Other
## 2026-05-27 15:30:38.187832 INFO::Counting total values for each feature
## 2026-05-27 15:30:38.199901 INFO::Writing filtered data to file asq8_Earlyzero/features/filtered_data.tsv
## 2026-05-27 15:30:38.223857 INFO::Writing filtered, normalized data to file asq8_Earlyzero/features/filtered_data_norm.tsv
## 2026-05-27 15:30:38.264094 INFO::Writing filtered, normalized, transformed data to file asq8_Earlyzero/features/filtered_data_norm_transformed.tsv
## 2026-05-27 15:30:38.285884 WARNING::Deleting existing residuals file: asq8_Earlyzero/fits/residuals.rds
## 2026-05-27 15:30:38.290488 INFO::Writing residuals to file asq8_Earlyzero/fits/residuals.rds
## 2026-05-27 15:30:38.298348 WARNING::Deleting existing fitted file: asq8_Earlyzero/fits/fitted.rds
## 2026-05-27 15:30:38.30293 INFO::Writing fitted values to file asq8_Earlyzero/fits/fitted.rds
## 2026-05-27 15:30:38.311188 WARNING::Deleting existing ranef file: asq8_Earlyzero/fits/ranef.rds
## 2026-05-27 15:30:38.315263 INFO::Writing extracted random effects to file asq8_Earlyzero/fits/ranef.rds
## 2026-05-27 15:30:38.320915 INFO::Writing all results to file (ordered by increasing q-values): asq8_Earlyzero/all_results.tsv
## 2026-05-27 15:30:38.331385 INFO::Writing the significant results (those which are less than or equal to the threshold of 0.050000 ) to file (ordered by increasing q-values): asq8_Earlyzero/significant_results.tsv
## 2026-05-27 15:30:38.337838 INFO::Writing heatmap of significant results to file: asq8_Earlyzero/heatmap.pdf
## 2026-05-27 15:30:38.447056 INFO::Writing association plots (one for each significant association) to output folder: asq8_Earlyzero
## 2026-05-27 15:30:38.456282 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-27 15:30:38.45961 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-27 15:30:38.465907 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:38.736842 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:39.121935 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:39.465548 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:39.722101 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:40.036257 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:40.384189 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:40.668588 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:40.94834 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:41.246415 INFO::Creating scatter plot for continuous data, Timepoint vs Sellimonas
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:41.509362 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:41.85855 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:42.139498 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:42.437703 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:42.711383 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:42.954577 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:43.2322 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:43.476868 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_hallii_group
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:46.645177 INFO::Plotting data for metadata number 2, SeqDepth
## 2026-05-27 15:30:46.652657 INFO::Creating scatter plot for continuous data, SeqDepth vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:46.957757 INFO::Creating scatter plot for continuous data, SeqDepth vs Sellimonas
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
output_maaslin_Early = readr::read_tsv(here("asq8_Earlyzero/all_results.tsv"))
## Rows: 215 Columns: 9
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: "\t"
## chr (3): feature, metadata, value
## dbl (6): coef, stderr, N, N.not.0, pval, qval
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
output_maaslin_Early[output_maaslin_Early$feature=="Eggerthella",]
## # A tibble: 5 × 9
##   feature     metadata  value       coef stderr     N N.not.0     pval   qval
##   <chr>       <chr>     <chr>      <dbl>  <dbl> <dbl>   <dbl>    <dbl>  <dbl>
## 1 Eggerthella Timepoint Timepoint -0.586  0.172   123      30 0.000966 0.0138
## 2 Eggerthella GA_weeks  GA_weeks   0.658  0.325   123      30 0.0558   0.300 
## 3 Eggerthella Gender    Gender    -0.491  0.346   123      30 0.170    0.524 
## 4 Eggerthella SeqDepth  SeqDepth   0.226  0.190   123      30 0.236    0.660 
## 5 Eggerthella BW_infant BW_infant -0.252  0.355   123      30 0.485    0.899
fit_data = Maaslin2(
  input_data = data.frame(assays(tse_Latezero)[[3]]),
  input_metadata = data.frame(colData(tse_Latezero)),
  output = "asq8_Latezero",
  fixed_effects = c( "Timepoint", "Gender", "BW_infant", "GA_weeks", "SeqDepth"),
  random_effects = c("Deelnemerscode_rem"),
  normalization = "NONE", 
  transform = "NONE",
  max_significance = 0.05,
  min_prevalence = 0)
## [1] "Warning: Deleting existing log file: asq8_Latezero/maaslin2.log"
## 2026-05-27 15:30:48.52415 INFO::Writing function arguments to log file
## 2026-05-27 15:30:48.562837 INFO::Verifying options selected are valid
## 2026-05-27 15:30:48.566878 INFO::Determining format of input files
## 2026-05-27 15:30:48.571277 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-27 15:30:48.588002 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-27 15:30:48.590616 INFO::Formula for fixed effects: expr ~  Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-27 15:30:48.594123 INFO::Filter data based on min abundance and min prevalence
## 2026-05-27 15:30:48.597695 INFO::Total samples in data: 277
## 2026-05-27 15:30:48.60068 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-27 15:30:48.604536 INFO::Total filtered features: 0
## 2026-05-27 15:30:48.607133 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-27 15:30:48.611542 INFO::Total filtered features with variance filtering: 0
## 2026-05-27 15:30:48.614465 INFO::Filtered feature names from variance filtering:
## 2026-05-27 15:30:48.617662 INFO::Running selected normalization method: NONE
## 2026-05-27 15:30:48.620568 INFO::Applying z-score to standardize continuous metadata
## 2026-05-27 15:30:48.631168 INFO::Running selected transform method: NONE
## 2026-05-27 15:30:48.63357 INFO::Running selected analysis method: LM
## 2026-05-27 15:30:48.636833 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-27 15:30:48.715667 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## 2026-05-27 15:30:48.788846 INFO::Fitting model to feature number 3, Eubacterium_hallii_group
## boundary (singular) fit: see help('isSingular')
## 2026-05-27 15:30:48.857924 INFO::Fitting model to feature number 4, Ruminococcus_gnavus_group
## 2026-05-27 15:30:48.928911 INFO::Fitting model to feature number 5, Ruminococcus_torques_group
## 2026-05-27 15:30:49.011716 INFO::Fitting model to feature number 6, Actinomyces
## 2026-05-27 15:30:49.106858 INFO::Fitting model to feature number 7, Akkermansia
## 2026-05-27 15:30:49.226204 INFO::Fitting model to feature number 8, Alistipes
## 2026-05-27 15:30:49.335937 INFO::Fitting model to feature number 9, Anaerostipes
## 2026-05-27 15:30:49.407626 INFO::Fitting model to feature number 10, Bacteroides
## 2026-05-27 15:30:49.480552 INFO::Fitting model to feature number 11, Bifidobacterium
## 2026-05-27 15:30:49.575441 INFO::Fitting model to feature number 12, Blautia
## 2026-05-27 15:30:49.651245 INFO::Fitting model to feature number 13, Butyricicoccus
## 2026-05-27 15:30:49.723168 INFO::Fitting model to feature number 14, Clostridioides
## 2026-05-27 15:30:49.796638 INFO::Fitting model to feature number 15, Clostridium_sensu_stricto_1
## 2026-05-27 15:30:49.868876 INFO::Fitting model to feature number 16, Collinsella
## 2026-05-27 15:30:49.940775 INFO::Fitting model to feature number 17, Dorea
## 2026-05-27 15:30:50.008702 INFO::Fitting model to feature number 18, Eggerthella
## 2026-05-27 15:30:50.084195 INFO::Fitting model to feature number 19, Enterococcus
## 2026-05-27 15:30:50.15598 INFO::Fitting model to feature number 20, Erysipelatoclostridium
## 2026-05-27 15:30:50.23319 INFO::Fitting model to feature number 21, Faecalibacterium
## 2026-05-27 15:30:50.314746 INFO::Fitting model to feature number 22, Flavonifractor
## 2026-05-27 15:30:50.386984 INFO::Fitting model to feature number 23, Fusicatenibacter
## 2026-05-27 15:30:50.458203 INFO::Fitting model to feature number 24, Haemophilus
## 2026-05-27 15:30:50.554878 INFO::Fitting model to feature number 25, Intestinibacter
## 2026-05-27 15:30:50.694378 INFO::Fitting model to feature number 26, Lachnoclostridium
## 2026-05-27 15:30:50.788511 INFO::Fitting model to feature number 27, Lachnospira
## 2026-05-27 15:30:50.867347 INFO::Fitting model to feature number 28, Lachnospiraceae_NK4A136_group
## 2026-05-27 15:30:50.939158 INFO::Fitting model to feature number 29, Lachnospiraceae_UCG.004
## 2026-05-27 15:30:51.016243 INFO::Fitting model to feature number 30, Lactobacillus
## 2026-05-27 15:30:51.089042 INFO::Fitting model to feature number 31, Megasphaera
## 2026-05-27 15:30:51.180979 INFO::Fitting model to feature number 32, Parabacteroides
## 2026-05-27 15:30:51.255488 INFO::Fitting model to feature number 33, Roseburia
## 2026-05-27 15:30:51.322668 INFO::Fitting model to feature number 34, Ruminococcaceae_UCG.013
## 2026-05-27 15:30:51.396231 INFO::Fitting model to feature number 35, Sellimonas
## 2026-05-27 15:30:51.462998 INFO::Fitting model to feature number 36, Senegalimassilia
## 2026-05-27 15:30:51.533909 INFO::Fitting model to feature number 37, Streptococcus
## 2026-05-27 15:30:51.599084 INFO::Fitting model to feature number 38, Subdoligranulum
## 2026-05-27 15:30:51.667737 INFO::Fitting model to feature number 39, Sutterella
## 2026-05-27 15:30:51.732 INFO::Fitting model to feature number 40, Tyzzerella_4
## 2026-05-27 15:30:51.804007 INFO::Fitting model to feature number 41, uncultured_6
## 2026-05-27 15:30:51.869095 INFO::Fitting model to feature number 42, Veillonella
## 2026-05-27 15:30:51.938378 INFO::Fitting model to feature number 43, Other
## 2026-05-27 15:30:52.020249 INFO::Counting total values for each feature
## 2026-05-27 15:30:52.033635 INFO::Writing filtered data to file asq8_Latezero/features/filtered_data.tsv
## 2026-05-27 15:30:52.076748 INFO::Writing filtered, normalized data to file asq8_Latezero/features/filtered_data_norm.tsv
## 2026-05-27 15:30:52.119081 INFO::Writing filtered, normalized, transformed data to file asq8_Latezero/features/filtered_data_norm_transformed.tsv
## 2026-05-27 15:30:52.175311 WARNING::Deleting existing residuals file: asq8_Latezero/fits/residuals.rds
## 2026-05-27 15:30:52.183033 INFO::Writing residuals to file asq8_Latezero/fits/residuals.rds
## 2026-05-27 15:30:52.201061 WARNING::Deleting existing fitted file: asq8_Latezero/fits/fitted.rds
## 2026-05-27 15:30:52.208735 INFO::Writing fitted values to file asq8_Latezero/fits/fitted.rds
## 2026-05-27 15:30:52.229685 WARNING::Deleting existing ranef file: asq8_Latezero/fits/ranef.rds
## 2026-05-27 15:30:52.237187 INFO::Writing extracted random effects to file asq8_Latezero/fits/ranef.rds
## 2026-05-27 15:30:52.248502 INFO::Writing all results to file (ordered by increasing q-values): asq8_Latezero/all_results.tsv
## 2026-05-27 15:30:52.26749 INFO::Writing the significant results (those which are less than or equal to the threshold of 0.050000 ) to file (ordered by increasing q-values): asq8_Latezero/significant_results.tsv
## 2026-05-27 15:30:52.278992 INFO::Writing heatmap of significant results to file: asq8_Latezero/heatmap.pdf
## 2026-05-27 15:30:52.43892 INFO::Writing association plots (one for each significant association) to output folder: asq8_Latezero
## 2026-05-27 15:30:52.448705 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-27 15:30:52.4525 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-27 15:30:52.460528 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:52.879368 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:53.254721 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:53.776314 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:54.148304 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:54.708199 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:55.02782 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:55.374669 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:55.701815 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:56.027881 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:56.361128 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:56.667356 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:57.029996 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:57.313856 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:57.564864 INFO::Creating scatter plot for continuous data, Timepoint vs Streptococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:57.950491 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnoclostridium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:58.240418 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:58.515933 INFO::Creating scatter plot for continuous data, Timepoint vs Alistipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:58.79436 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:59.072482 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:59.362993 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:59.617482 INFO::Creating scatter plot for continuous data, Timepoint vs Butyricicoccus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:30:59.913613 INFO::Creating scatter plot for continuous data, Timepoint vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:00.230632 INFO::Creating scatter plot for continuous data, Timepoint vs Haemophilus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:00.535579 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_torques_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:00.778604 INFO::Creating scatter plot for continuous data, Timepoint vs Erysipelatoclostridium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:01.092379 INFO::Creating scatter plot for continuous data, Timepoint vs Sellimonas
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:01.404775 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:01.716623 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospiraceae_NK4A136_group
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:05.504562 INFO::Plotting data for metadata number 2, SeqDepth
## 2026-05-27 15:31:05.510239 INFO::Creating scatter plot for continuous data, SeqDepth vs Ruminococcaceae_UCG.013
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:05.912856 INFO::Creating scatter plot for continuous data, SeqDepth vs Other
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:06.206121 INFO::Creating scatter plot for continuous data, SeqDepth vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:07.453035 INFO::Plotting data for metadata number 3, GA_weeks
## 2026-05-27 15:31:07.460175 INFO::Creating scatter plot for continuous data, GA_weeks vs Streptococcus
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
output_maaslin_Late = readr::read_tsv(here("asq8_Latezero/all_results.tsv"))
## Rows: 215 Columns: 9
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: "\t"
## chr (3): feature, metadata, value
## dbl (6): coef, stderr, N, N.not.0, pval, qval
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
output_maaslin_Late[output_maaslin_Late$feature=="Eggerthella",]
## # A tibble: 5 × 9
##   feature     metadata  value        coef stderr     N N.not.0  pval  qval
##   <chr>       <chr>     <chr>       <dbl>  <dbl> <dbl>   <dbl> <dbl> <dbl>
## 1 Eggerthella Timepoint Timepoint -0.205   0.126   277      70 0.106 0.382
## 2 Eggerthella BW_infant BW_infant  0.288   0.217   277      70 0.191 0.526
## 3 Eggerthella SeqDepth  SeqDepth  -0.0794  0.137   277      70 0.562 0.870
## 4 Eggerthella GA_weeks  GA_weeks  -0.0974  0.217   277      70 0.655 0.915
## 5 Eggerthella Gender    Gender     0.0681  0.210   277      70 0.746 0.947
# post-hoc tests per timepoint
meta_otu_T1 = meta_otu[meta_otu$Timepoint==2,c("Deelnemerscode", "Eggerthella", "ASQ_slope", "Gender", "BW_infant", "GA_weeks", "SeqDepth")]
mod_aov_taxaT1 <- aov(Eggerthella ~ ASQ_slope + Gender +  BW_infant + GA_weeks+ SeqDepth, data = meta_otu_T1)
summary(mod_aov_taxaT1)
##             Df Sum Sq Mean Sq F value Pr(>F)  
## ASQ_slope    1   18.4  18.418   3.462 0.0668 .
## Gender       1    1.1   1.109   0.208 0.6493  
## BW_infant    1    3.0   3.027   0.569 0.4531  
## GA_weeks     1    9.3   9.285   1.745 0.1906  
## SeqDepth     1   16.5  16.476   3.097 0.0826 .
## Residuals   74  393.7   5.320                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 1 observation deleted due to missingness
meta_otu_T2 = meta_otu[meta_otu$Timepoint==4,c("Deelnemerscode", "Eggerthella", "ASQ_slope", "Gender", "BW_infant", "GA_weeks", "SeqDepth")]
mod_aov_taxaT2 <- aov(Eggerthella ~ ASQ_slope + Gender +  BW_infant + GA_weeks+SeqDepth, data = meta_otu_T2)
summary(mod_aov_taxaT2)
##             Df Sum Sq Mean Sq F value Pr(>F)  
## ASQ_slope    1    2.4   2.409   0.539 0.4654  
## Gender       1    0.0   0.047   0.011 0.9186  
## BW_infant    1    0.4   0.361   0.081 0.7772  
## GA_weeks     1    5.5   5.508   1.231 0.2708  
## SeqDepth     1   28.3  28.304   6.327 0.0141 *
## Residuals   73  326.6   4.473                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 1 observation deleted due to missingness
meta_otu_T3 = meta_otu[meta_otu$Timepoint==6,c("Deelnemerscode", "Eggerthella", "ASQ_slope", "Gender", "BW_infant", "GA_weeks", "SeqDepth")]
mod_aov_taxaT3 <- aov(Eggerthella ~ ASQ_slope + Gender +  BW_infant + GA_weeks+SeqDepth, data = meta_otu_T3)
summary(mod_aov_taxaT3)
##             Df Sum Sq Mean Sq F value Pr(>F)  
## ASQ_slope    1    3.2   3.204   0.713  0.401  
## Gender       1    1.8   1.838   0.409  0.524  
## BW_infant    1   13.6  13.599   3.028  0.086 .
## GA_weeks     1    5.4   5.370   1.196  0.278  
## SeqDepth     1    3.9   3.879   0.864  0.356  
## Residuals   73  327.8   4.491                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 1 observation deleted due to missingness
meta_otu_T4 = meta_otu[meta_otu$Timepoint==9,c("Deelnemerscode", "Eggerthella", "ASQ_slope", "Gender", "BW_infant", "GA_weeks", "SeqDepth")]
mod_aov_taxaT4 <- aov(Eggerthella ~ ASQ_slope + Gender +  BW_infant + GA_weeks+SeqDepth, data = meta_otu_T4)
summary(mod_aov_taxaT4)
##             Df Sum Sq Mean Sq F value Pr(>F)  
## ASQ_slope    1   18.6  18.636   3.172 0.0791 .
## Gender       1    1.0   0.986   0.168 0.6833  
## BW_infant    1   11.9  11.944   2.033 0.1582  
## GA_weeks     1    7.2   7.239   1.232 0.2706  
## SeqDepth     1    3.5   3.501   0.596 0.4427  
## Residuals   73  428.9   5.875                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 1 observation deleted due to missingness
meta_otu_T5 = meta_otu[meta_otu$Timepoint==12,c("Deelnemerscode", "Eggerthella", "ASQ_slope", "Gender", "BW_infant", "GA_weeks", "SeqDepth")]
mod_aov_taxaT5 <- aov(Eggerthella ~ ASQ_slope + Gender +  BW_infant +GA_weeks+ SeqDepth, data = meta_otu_T5)
summary(mod_aov_taxaT5)
##             Df Sum Sq Mean Sq F value Pr(>F)
## ASQ_slope    1   13.1  13.074   1.944  0.168
## Gender       1    0.1   0.102   0.015  0.902
## BW_infant    1    2.1   2.087   0.310  0.579
## GA_weeks     1    2.7   2.673   0.398  0.530
## SeqDepth     1    1.6   1.641   0.244  0.623
## Residuals   72  484.2   6.725               
## 1 observation deleted due to missingness
# supplementary plots of prevalence and presence/absence per timepoint and presence/absence tests

corrASQslope_Eggerthella2months= ggplot(data= meta_otu_T1, aes(x= ASQ_slope , y= Eggerthella))+ geom_point() + theme_classic() + labs(y = "Eggerthella CLR values 2M")

corrASQslope_Eggerthella4months= ggplot(data= meta_otu_T2, aes(x=ASQ_slope, y=Eggerthella  ))+ geom_point() + theme_classic()+ labs(y = "Eggerthella CLR values 4M")

corrASQslope_Eggerthella6months= ggplot(data= meta_otu_T3, aes(x=ASQ_slope, y=Eggerthella   ))+ geom_point() + theme_classic()+ labs(y = "Eggerthella CLR values 6M")

corrASQslope_Eggerthella9months= ggplot(data= meta_otu_T4, aes(x=ASQ_slope  , y=Eggerthella  ))+ geom_point() + theme_classic()+ labs(y = "Eggerthella CLR values 9M")

corrASQslope_Eggerthella12months= ggplot(data= meta_otu_T5, aes(x=ASQ_slope , y=Eggerthella  ))+ geom_point() + theme_classic() + labs(y = "Eggerthella CLR values 12M")

ggarrange(corrASQslope_Eggerthella2months,corrASQslope_Eggerthella4months, corrASQslope_Eggerthella6months, corrASQslope_Eggerthella9months, corrASQslope_Eggerthella12months)

#wide
meta_otu_wide <- meta_otu_T1 %>%
  select(Deelnemerscode, ASQ_slope, Eggerthella) %>%
  rename(T1CLR = Eggerthella) %>% full_join(meta_otu_T2 %>% select(Deelnemerscode, Eggerthella) %>% rename(T2CLR = Eggerthella),
    by = "Deelnemerscode" ) %>%  full_join(meta_otu_T3 %>% select(Deelnemerscode, Eggerthella) %>% rename(T3CLR = Eggerthella),
    by = "Deelnemerscode") %>%  full_join(meta_otu_T4 %>% select(Deelnemerscode, Eggerthella) %>% rename(T4CLR = Eggerthella),
    by = "Deelnemerscode" ) %>% full_join(meta_otu_T5 %>% select(Deelnemerscode, Eggerthella) %>% rename(T5CLR = Eggerthella),
    by = "Deelnemerscode" )

PA =data.frame(t(assays(tse.genprev)[[4]]))
PA$sampleID =rownames(PA)
meta_PA = dplyr::left_join(PA, select(meta,contains("ASQ"), sampleID, Deelnemerscode, Timepoint, Relationship,GA_weeks, Gender, BW_infant, Maternal_age, SeqDepth,ASQ_6months_mean, ASQ_60months_mean, Infant_antibiotica_12months, Breastfeeding_2months, Breastfeeding_4months, Breastfeeding_6months) , by= "sampleID")

meta_PA_T1 <- meta_PA[meta_PA$Timepoint == 2, c("Deelnemerscode", "Eggerthella", "ASQ_slope")] #2 months
table(meta_PA_T1$Eggerthella)
## 
##  0  1 
## 67 14
meta_PA_T1 %>%   filter(Eggerthella == 1) %>%
  pull(Deelnemerscode)
##  [1] "PRIDE_14570" "PRIDE_14667" "PRIDE_14810" "PRIDE_14914" "PRIDE_14999"
##  [6] "PRIDE_15081" "PRIDE_15484" "PRIDE_15585" "PRIDE_15844" "PRIDE_15987"
## [11] "PRIDE_16058" "PRIDE_16180" "PRIDE_16671" "PRIDE_16812"
t.test(ASQ_slope~ Eggerthella, data=meta_PA_T1, var.equal= FALSE)
## 
##  Welch Two Sample t-test
## 
## data:  ASQ_slope by Eggerthella
## t = 2.6991, df = 38.081, p-value = 0.01031
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
##  0.001967566 0.013770694
## sample estimates:
## mean in group 0 mean in group 1 
##   0.00788646029   0.00001733028
meta_PA_T2 =meta_PA[meta_PA$Timepoint==4,c("Deelnemerscode", "Eggerthella", "ASQ_slope")]
table(meta_PA_T2$Eggerthella)
## 
##  0  1 
## 64 16
t.test(ASQ_slope~ Eggerthella, data=meta_PA_T2, var.equal= FALSE)
## 
##  Welch Two Sample t-test
## 
## data:  ASQ_slope by Eggerthella
## t = 0.83898, df = 23.005, p-value = 0.4101
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
##  -0.005285867  0.012498841
## sample estimates:
## mean in group 0 mean in group 1 
##     0.007188195     0.003581708
meta_PA_T3 =meta_PA[meta_PA$Timepoint==6,c("Deelnemerscode", "Eggerthella", "ASQ_slope")]
table(meta_PA_T3$Eggerthella)
## 
##  0  1 
## 65 15
t.test(ASQ_slope~ Eggerthella, data=meta_PA_T3, var.equal= FALSE)
## 
##  Welch Two Sample t-test
## 
## data:  ASQ_slope by Eggerthella
## t = -0.93108, df = 20.276, p-value = 0.3628
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
##  -0.013641953  0.005216894
## sample estimates:
## mean in group 0 mean in group 1 
##     0.005683331     0.009895861
meta_PA_T4 =meta_PA[meta_PA$Timepoint==9,c("Deelnemerscode", "Eggerthella", "ASQ_slope")]
table(meta_PA_T4$Eggerthella)
## 
##  0  1 
## 57 23
t.test(ASQ_slope~ Eggerthella, data=meta_PA_T4, var.equal= FALSE)
## 
##  Welch Two Sample t-test
## 
## data:  ASQ_slope by Eggerthella
## t = -1.2892, df = 36.814, p-value = 0.2054
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
##  -0.013115673  0.002916535
## sample estimates:
## mean in group 0 mean in group 1 
##     0.005096442     0.010196010
meta_PA_T5 =meta_PA[meta_PA$Timepoint==12,c("Deelnemerscode", "Eggerthella", "ASQ_slope")]
table(meta_PA_T5$Eggerthella)
## 
##  0  1 
## 45 34
t.test(ASQ_slope~ Eggerthella, data=meta_PA_T5, var.equal= FALSE)
## 
##  Welch Two Sample t-test
## 
## data:  ASQ_slope by Eggerthella
## t = -1.8322, df = 75.93, p-value = 0.07084
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
##  -0.0128319294  0.0005351057
## sample estimates:
## mean in group 0 mean in group 1 
##     0.004130539     0.010278951
corrASQslope_EggerthellaPA2months <- ggboxplot( data = meta_PA_T1,  x = "Eggerthella",  y = "ASQ_slope",  add = "jitter"  ) +  theme_classic() + labs(    x = "Eggerthella Presence 2M",    y = "ASQ Slope")

corrASQslope_EggerthellaPA4months <- ggboxplot(data = meta_PA_T2, x = "Eggerthella",  y = "ASQ_slope",  add = "jitter"  ) +  theme_classic() +  labs(   x = "Eggerthella Presence 4M",  y = "ASQ Slope" )

corrASQslope_EggerthellaPA6months <- ggboxplot(data = meta_PA_T3, x = "Eggerthella",y = "ASQ_slope",  add = "jitter") +  theme_classic() +   labs(    x = "Eggerthella Presence 6M",   y = "ASQ Slope" )

corrASQslope_EggerthellaPA9months <- ggboxplot(  data = meta_PA_T4, x = "Eggerthella",  y = "ASQ_slope",  add = "jitter") +  theme_classic() +   labs(    x = "Eggerthella Presence 9M",   y = "ASQ Slope" )

corrASQslope_EggerthellaPA12months <- ggboxplot(data = meta_PA_T5,  x = "Eggerthella",  y = "ASQ_slope",  add = "jitter") +  theme_classic() +   labs(    x = "Eggerthella Presence 12M",  y = "ASQ Slope" )

ggarrange(corrASQslope_EggerthellaPA2months,corrASQslope_EggerthellaPA4months, corrASQslope_EggerthellaPA6months, corrASQslope_EggerthellaPA9months, corrASQslope_EggerthellaPA12months, common.legend = TRUE)

Visualization taxa

otu_tse <- data.frame(t(assays(tse.genprev)[[3]]))
otu_tse$sampleID = rownames(otu_tse)
meta_otu = dplyr::left_join(otu_tse, select(meta,ASQ_slope, sampleID, Deelnemerscode, Timepoint, Gender , BW_infant , GA_weeks, SeqDepth,  ASQ_slope_zerogrouped) , by= "sampleID")

### Bifidobacterium


corrASQslope_Bifidobacterium <- ggplot(data = meta_otu, aes(x = ASQ_slope, y = Bifidobacterium, color = ASQ_slope)) +
  geom_point() +  geom_smooth(method = "lm", formula = y ~ x) +  scale_color_gradient(low = "blue",  # Starting color for low values
    high = "red") +  theme_classic() +  labs(x = "ASQ Slope",y = "Bifidobacterium CLR Abundance over the first year of life",color = "ASQ Slope" )

corrASQslope_Bifidobacterium

##Eggerthella effect of time across whole group plus split by ASQ slope group
# Calculate median and IQR for Eggerthella at each Timepoint
summary_stats_overall <- meta_otu %>%  group_by(Timepoint) %>%dplyr::summarize( median_value = median(Eggerthella, na.rm = TRUE), iqr_lower = quantile(Eggerthella, 0.25, na.rm = TRUE), iqr_upper = quantile(Eggerthella, 0.75, na.rm = TRUE))

# Plots by ASQ
Eggerthella_plot_no_grouping <- ggplot() + geom_ribbon(data = summary_stats_overall, aes(x = Timepoint,ymin = iqr_lower, ymax = iqr_upper),fill = "black",alpha = 0.2) +  
geom_line(data = summary_stats_overall, aes(x = Timepoint,y = median_value),color = "black",size = 1) + 
geom_point(data = meta_otu, aes(x = Timepoint,y = Eggerthella ), color = "black",alpha = 0.6, size = 1,position = position_jitter(width = 0.15, height = 0)) +  
theme_classic() +  labs(  x = "Microbiome sampling month",y = "CLR Abundance in Eggerthella") +  scale_x_continuous(  breaks = unique(meta_otu$Timepoint),  labels = unique(meta_otu$Timepoint)) +   theme_classic(base_size = 14)


##Eggerthella effect of time across whole group plus split by ASQ slope group

summary_stats_grouped <- meta_otu %>%  group_by(Timepoint, ASQ_slope_zerogrouped) %>%  dplyr::summarize(median_value = median(Eggerthella, na.rm = TRUE),iqr_lower = quantile(Eggerthella, 0.25, na.rm = TRUE), iqr_upper = quantile(Eggerthella, 0.75, na.rm = TRUE),.groups = "drop")

summary_stats_grouped <- summary_stats_grouped %>%mutate(ASQ_slope_zerogrouped = factor(ASQ_slope_zerogrouped,levels = c(1, 2), labels = c("Early concern", "Late concern")))

meta_otu <- meta_otu %>%mutate(ASQ_slope_zerogrouped = factor(ASQ_slope_zerogrouped,levels = c(1, 2),labels = c("Early concern", "Late concern")))

Eggerthella_plot <- ggplot() +  geom_ribbon(data = summary_stats_grouped,aes( x = Timepoint,ymin = iqr_lower, ymax = iqr_upper,fill = ASQ_slope_zerogrouped),alpha = 0.2) + 
geom_line(data = summary_stats_grouped, aes(x = Timepoint,y = median_value,color= ASQ_slope_zerogrouped,group = ASQ_slope_zerogrouped),size = 1) + 
geom_point(data = meta_otu,aes(x = Timepoint, y = Eggerthella,color = ASQ_slope_zerogrouped), alpha = 0.6,size = 1, size = 1,position = position_jitter(width = 0.15, height = 0)) +  
geom_point(data = summary_stats_grouped,aes(x = Timepoint,y = median_value, color = ASQ_slope_zerogrouped), size = 3) +  theme_classic() +   labs(x = "Microbiome sampling month", y = "CLR Abundance in Eggerthella", fill = "ASQ Slope Group",color = "ASQ Slope Group") +  scale_fill_manual(values = c("Early concern" = "blue", "Late concern" = "red") ) +
scale_color_manual(values = c("Early concern" = "blue", "Late concern" = "red")) +
theme(legend.position = "top",  legend.title = element_text(face = "bold"),   ) +  scale_x_continuous(breaks = unique(summary_stats_grouped$Timepoint),labels = unique(summary_stats_grouped$Timepoint))+
theme_classic(base_size = 14)


(Eggerthella_plot_no_grouping | Eggerthella_plot ) + 
  plot_annotation(tag_levels = 'a')

Loop rarefaction taxonomy

rm(list=ls())

tse.baby_alpha <- readRDS(here("outputmia", "tse.baby_alpha.rds"))
depths <- seq(10000, 120000, by = 10000)

results_by_depth <- vector("list", length(depths))
names(results_by_depth) <- paste0("depth_", depths)

for (d in depths) {

  message("=== Depth: ", d, " ===")

  # Rarefy counts 
  set.seed(1234 + d)  
  tse_subsampled <- rarefyAssay(tse.baby_alpha, assay.type = "counts", sample = d,name = "subsampled" )

  # 2) Genus agglomeration and prevalence merging
  tse_subsampled <- agglomerateByPrevalence(tse_subsampled, rank = "Genus",assay.type = "subsampled",prevalence= 10/100,detection= 0)
  tse_subsampled <- tse_subsampled[rowData(tse_subsampled)$Genus != ""]
  tse_subsampled <- transformAssay(tse_subsampled, assay.type = "subsampled", method = "clr", pseudocount = TRUE)
  
  rownames(tse_subsampled) <- gsub("\\[|\\]", "", rownames(tse_subsampled))

    meta <- as.data.frame(colData(tse_subsampled))
  meta$ASQtime_interaction <- meta$ASQ_slope * meta$Timepoint

  #how many participants fell out
  n_ids= length(unique(colData(tse_subsampled)$Deelnemerscode_rem))
  # how many participants have more than x number of timepoints
  n_timepoints <- table(colData(tse_subsampled)$Deelnemerscode_rem)
  n_timepoints <-sum(n_timepoints >= 3)
  
  outdir <- here(paste0("asq8_mia_rarefy_", d))
  fit_data <- Maaslin2(
    input_data      = data.frame(assays(tse_subsampled)[["clr"]]),
    input_metadata  = meta,
    output          = outdir,
    fixed_effects   = c("ASQtime_interaction", "ASQ_slope", "Timepoint", "Gender","BW_infant", "GA_weeks", "SeqDepth"),
    random_effects  = c("Deelnemerscode_rem"),
    normalization   = "NONE",
    transform       = "NONE",
    max_significance = 0.05,
    min_prevalence   = 0
  )

 
  res_path <- file.path(outdir, "all_results.tsv")
  output_maaslin <- read_tsv(res_path, show_col_types = FALSE)

  egg <- output_maaslin %>% filter(feature == "Eggerthella", metadata =="ASQtime_interaction" )
  bif <- output_maaslin %>% filter(feature == "Bifidobacterium", metadata =="ASQ_slope" )

  
  # store summary for this depth
  results_by_depth[[paste0("depth_", d)]] <- list(
    n_participants = n_ids,
    n_timepointsperparticipant= n_timepoints,
    eggerthella = egg,
    bifidobacterium = bif
  )
}
## === Depth: 10000 ===
## 17 samples removed because they contained fewer reads than `sample`.
## 3315 features removed because they are not present in all samples after subsampling.
## A pseudocount of 1 was applied.
## [1] "Warning: Deleting existing log file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_10000/maaslin2.log"
## 2026-05-27 15:31:20.426936 INFO::Writing function arguments to log file
## 2026-05-27 15:31:20.468159 INFO::Verifying options selected are valid
## 2026-05-27 15:31:20.470889 INFO::Determining format of input files
## 2026-05-27 15:31:20.475658 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-27 15:31:20.495582 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-27 15:31:20.498438 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-27 15:31:20.502455 INFO::Filter data based on min abundance and min prevalence
## 2026-05-27 15:31:20.505754 INFO::Total samples in data: 383
## 2026-05-27 15:31:20.508441 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-27 15:31:20.512477 INFO::Total filtered features: 0
## 2026-05-27 15:31:20.515221 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-27 15:31:20.520163 INFO::Total filtered features with variance filtering: 0
## 2026-05-27 15:31:20.523425 INFO::Filtered feature names from variance filtering:
## 2026-05-27 15:31:20.527196 INFO::Running selected normalization method: NONE
## 2026-05-27 15:31:20.530709 INFO::Applying z-score to standardize continuous metadata
## 2026-05-27 15:31:20.546781 INFO::Running selected transform method: NONE
## 2026-05-27 15:31:20.549874 INFO::Running selected analysis method: LM
## 2026-05-27 15:31:20.55439 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-27 15:31:20.65124 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## 2026-05-27 15:31:20.740852 INFO::Fitting model to feature number 3, Eubacterium_hallii_group
## boundary (singular) fit: see help('isSingular')
## 2026-05-27 15:31:20.823827 INFO::Fitting model to feature number 4, Ruminococcus_gnavus_group
## 2026-05-27 15:31:20.893409 INFO::Fitting model to feature number 5, Ruminococcus_torques_group
## 2026-05-27 15:31:20.963779 INFO::Fitting model to feature number 6, Actinomyces
## 2026-05-27 15:31:21.041553 INFO::Fitting model to feature number 7, Akkermansia
## 2026-05-27 15:31:21.13454 INFO::Fitting model to feature number 8, Anaerostipes
## 2026-05-27 15:31:21.207363 INFO::Fitting model to feature number 9, Bacteroides
## 2026-05-27 15:31:21.276261 INFO::Fitting model to feature number 10, Bifidobacterium
## 2026-05-27 15:31:21.345188 INFO::Fitting model to feature number 11, Blautia
## 2026-05-27 15:31:21.415821 INFO::Fitting model to feature number 12, Butyricicoccus
## 2026-05-27 15:31:21.498691 INFO::Fitting model to feature number 13, Clostridioides
## 2026-05-27 15:31:21.566258 INFO::Fitting model to feature number 14, Clostridium_sensu_stricto_1
## 2026-05-27 15:31:21.642337 INFO::Fitting model to feature number 15, Collinsella
## 2026-05-27 15:31:21.7186 INFO::Fitting model to feature number 16, Dorea
## 2026-05-27 15:31:21.790996 INFO::Fitting model to feature number 17, Eggerthella
## 2026-05-27 15:31:21.865687 INFO::Fitting model to feature number 18, Enterococcus
## 2026-05-27 15:31:21.945599 INFO::Fitting model to feature number 19, Erysipelatoclostridium
## 2026-05-27 15:31:22.070929 INFO::Fitting model to feature number 20, Faecalibacterium
## 2026-05-27 15:31:22.173077 INFO::Fitting model to feature number 21, Flavonifractor
## 2026-05-27 15:31:22.246128 INFO::Fitting model to feature number 22, Fusicatenibacter
## 2026-05-27 15:31:22.314846 INFO::Fitting model to feature number 23, Haemophilus
## 2026-05-27 15:31:22.391112 INFO::Fitting model to feature number 24, Intestinibacter
## 2026-05-27 15:31:22.466768 INFO::Fitting model to feature number 25, Lachnoclostridium
## 2026-05-27 15:31:22.55845 INFO::Fitting model to feature number 26, Lachnospira
## 2026-05-27 15:31:22.633193 INFO::Fitting model to feature number 27, Lachnospiraceae_NK4A136_group
## 2026-05-27 15:31:22.709931 INFO::Fitting model to feature number 28, Lachnospiraceae_UCG.004
## 2026-05-27 15:31:22.790129 INFO::Fitting model to feature number 29, Lactobacillus
## 2026-05-27 15:31:22.865799 INFO::Fitting model to feature number 30, Megasphaera
## 2026-05-27 15:31:22.943795 INFO::Fitting model to feature number 31, Parabacteroides
## 2026-05-27 15:31:23.016215 INFO::Fitting model to feature number 32, Roseburia
## 2026-05-27 15:31:23.091323 INFO::Fitting model to feature number 33, Ruminococcaceae_UCG.013
## 2026-05-27 15:31:23.164767 INFO::Fitting model to feature number 34, Sellimonas
## 2026-05-27 15:31:23.235723 INFO::Fitting model to feature number 35, Senegalimassilia
## 2026-05-27 15:31:23.306646 INFO::Fitting model to feature number 36, Streptococcus
## 2026-05-27 15:31:23.378816 INFO::Fitting model to feature number 37, Subdoligranulum
## 2026-05-27 15:31:23.450557 INFO::Fitting model to feature number 38, Sutterella
## 2026-05-27 15:31:23.524739 INFO::Fitting model to feature number 39, Tyzzerella_4
## 2026-05-27 15:31:23.597793 INFO::Fitting model to feature number 40, uncultured
## 2026-05-27 15:31:23.667271 INFO::Fitting model to feature number 41, Veillonella
## 2026-05-27 15:31:23.738917 INFO::Fitting model to feature number 42, Other
## 2026-05-27 15:31:23.860426 INFO::Counting total values for each feature
## 2026-05-27 15:31:23.883345 INFO::Writing filtered data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_10000/features/filtered_data.tsv
## 2026-05-27 15:31:23.946175 INFO::Writing filtered, normalized data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_10000/features/filtered_data_norm.tsv
## 2026-05-27 15:31:24.003864 INFO::Writing filtered, normalized, transformed data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_10000/features/filtered_data_norm_transformed.tsv
## 2026-05-27 15:31:24.055654 WARNING::Deleting existing residuals file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_10000/fits/residuals.rds
## 2026-05-27 15:31:24.060307 INFO::Writing residuals to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_10000/fits/residuals.rds
## 2026-05-27 15:31:24.074029 WARNING::Deleting existing fitted file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_10000/fits/fitted.rds
## 2026-05-27 15:31:24.07834 INFO::Writing fitted values to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_10000/fits/fitted.rds
## 2026-05-27 15:31:24.091111 WARNING::Deleting existing ranef file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_10000/fits/ranef.rds
## 2026-05-27 15:31:24.095307 INFO::Writing extracted random effects to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_10000/fits/ranef.rds
## 2026-05-27 15:31:24.10128 INFO::Writing all results to file (ordered by increasing q-values): C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_10000/all_results.tsv
## 2026-05-27 15:31:24.113318 INFO::Writing the significant results (those which are less than or equal to the threshold of 0.050000 ) to file (ordered by increasing q-values): C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_10000/significant_results.tsv
## 2026-05-27 15:31:24.119782 INFO::Writing heatmap of significant results to file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_10000/heatmap.pdf
## 2026-05-27 15:31:24.224403 INFO::Writing association plots (one for each significant association) to output folder: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_10000
## 2026-05-27 15:31:24.232794 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-27 15:31:24.236265 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-27 15:31:24.243502 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:24.57255 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:25.039899 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:25.326196 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:25.620228 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:25.913798 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:26.221792 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:26.502258 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:26.790612 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:27.091926 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:27.365991 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:27.659278 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:27.947562 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:28.229924 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:28.520954 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:28.833439 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:29.096048 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:29.384121 INFO::Creating scatter plot for continuous data, Timepoint vs Sellimonas
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:29.664331 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:29.990532 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:30.366159 INFO::Creating scatter plot for continuous data, Timepoint vs Haemophilus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:30.656423 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnoclostridium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:30.938274 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:31.187534 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridium_innocuum_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:31.470656 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_hallii_group
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:34.888705 INFO::Plotting data for metadata number 2, ASQtime_interaction
## 2026-05-27 15:31:34.894423 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:35.681956 INFO::Plotting data for metadata number 3, ASQ_slope
## 2026-05-27 15:31:35.6869 INFO::Creating scatter plot for continuous data, ASQ_slope vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:36.399364 INFO::Plotting data for metadata number 4, GA_weeks
## 2026-05-27 15:31:36.405451 INFO::Creating scatter plot for continuous data, GA_weeks vs Streptococcus
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:37.054074 INFO::Plotting data for metadata number 5, SeqDepth
## 2026-05-27 15:31:37.060037 INFO::Creating scatter plot for continuous data, SeqDepth vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## === Depth: 20000 ===
## 
## 27 samples removed because they contained fewer reads than `sample`.
## 
## 3382 features removed because they are not present in all samples after subsampling.
## 
## A pseudocount of 6.5 was applied.
## [1] "Warning: Deleting existing log file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_20000/maaslin2.log"
## 2026-05-27 15:31:42.12594 INFO::Writing function arguments to log file
## 2026-05-27 15:31:42.165 INFO::Verifying options selected are valid
## 2026-05-27 15:31:42.16893 INFO::Determining format of input files
## 2026-05-27 15:31:42.174052 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-27 15:31:42.190779 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-27 15:31:42.193435 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-27 15:31:42.1961 INFO::Filter data based on min abundance and min prevalence
## 2026-05-27 15:31:42.1988 INFO::Total samples in data: 373
## 2026-05-27 15:31:42.20148 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-27 15:31:42.20599 INFO::Total filtered features: 0
## 2026-05-27 15:31:42.209086 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-27 15:31:42.213362 INFO::Total filtered features with variance filtering: 0
## 2026-05-27 15:31:42.215908 INFO::Filtered feature names from variance filtering:
## 2026-05-27 15:31:42.218341 INFO::Running selected normalization method: NONE
## 2026-05-27 15:31:42.221138 INFO::Applying z-score to standardize continuous metadata
## 2026-05-27 15:31:42.232989 INFO::Running selected transform method: NONE
## 2026-05-27 15:31:42.235495 INFO::Running selected analysis method: LM
## 2026-05-27 15:31:42.238884 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-27 15:31:42.314614 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## 2026-05-27 15:31:42.379781 INFO::Fitting model to feature number 3, Eubacterium_hallii_group
## 2026-05-27 15:31:42.450337 INFO::Fitting model to feature number 4, Ruminococcus_gnavus_group
## 2026-05-27 15:31:42.518324 INFO::Fitting model to feature number 5, Ruminococcus_torques_group
## 2026-05-27 15:31:42.582045 INFO::Fitting model to feature number 6, Actinomyces
## 2026-05-27 15:31:42.66969 INFO::Fitting model to feature number 7, Akkermansia
## 2026-05-27 15:31:42.734834 INFO::Fitting model to feature number 8, Anaerostipes
## 2026-05-27 15:31:42.829115 INFO::Fitting model to feature number 9, Bacteroides
## 2026-05-27 15:31:42.949304 INFO::Fitting model to feature number 10, Bifidobacterium
## 2026-05-27 15:31:43.024768 INFO::Fitting model to feature number 11, Blautia
## 2026-05-27 15:31:43.092324 INFO::Fitting model to feature number 12, Butyricicoccus
## 2026-05-27 15:31:43.159062 INFO::Fitting model to feature number 13, Clostridioides
## 2026-05-27 15:31:43.227372 INFO::Fitting model to feature number 14, Clostridium_sensu_stricto_1
## 2026-05-27 15:31:43.298201 INFO::Fitting model to feature number 15, Collinsella
## 2026-05-27 15:31:43.364994 INFO::Fitting model to feature number 16, Dorea
## 2026-05-27 15:31:43.430267 INFO::Fitting model to feature number 17, Eggerthella
## 2026-05-27 15:31:43.496955 INFO::Fitting model to feature number 18, Enterococcus
## 2026-05-27 15:31:43.561185 INFO::Fitting model to feature number 19, Erysipelatoclostridium
## 2026-05-27 15:31:43.626223 INFO::Fitting model to feature number 20, Faecalibacterium
## 2026-05-27 15:31:43.699038 INFO::Fitting model to feature number 21, Flavonifractor
## 2026-05-27 15:31:43.766198 INFO::Fitting model to feature number 22, Fusicatenibacter
## 2026-05-27 15:31:43.837918 INFO::Fitting model to feature number 23, Haemophilus
## 2026-05-27 15:31:43.905046 INFO::Fitting model to feature number 24, Intestinibacter
## 2026-05-27 15:31:43.99971 INFO::Fitting model to feature number 25, Lachnoclostridium
## 2026-05-27 15:31:44.067407 INFO::Fitting model to feature number 26, Lachnospira
## 2026-05-27 15:31:44.13413 INFO::Fitting model to feature number 27, Lachnospiraceae_NK4A136_group
## 2026-05-27 15:31:44.205847 INFO::Fitting model to feature number 28, Lachnospiraceae_UCG.004
## 2026-05-27 15:31:44.290749 INFO::Fitting model to feature number 29, Lactobacillus
## 2026-05-27 15:31:44.38645 INFO::Fitting model to feature number 30, Megasphaera
## 2026-05-27 15:31:44.477206 INFO::Fitting model to feature number 31, Parabacteroides
## 2026-05-27 15:31:44.583483 INFO::Fitting model to feature number 32, Roseburia
## 2026-05-27 15:31:44.673537 INFO::Fitting model to feature number 33, Sellimonas
## 2026-05-27 15:31:44.775503 INFO::Fitting model to feature number 34, Senegalimassilia
## 2026-05-27 15:31:44.880637 INFO::Fitting model to feature number 35, Streptococcus
## 2026-05-27 15:31:44.98439 INFO::Fitting model to feature number 36, Subdoligranulum
## 2026-05-27 15:31:45.065148 INFO::Fitting model to feature number 37, Sutterella
## 2026-05-27 15:31:45.144576 INFO::Fitting model to feature number 38, Tyzzerella_4
## 2026-05-27 15:31:45.231049 INFO::Fitting model to feature number 39, uncultured
## 2026-05-27 15:31:45.314167 INFO::Fitting model to feature number 40, Veillonella
## 2026-05-27 15:31:45.398906 INFO::Fitting model to feature number 41, Other
## 2026-05-27 15:31:45.511268 INFO::Counting total values for each feature
## 2026-05-27 15:31:45.531245 INFO::Writing filtered data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_20000/features/filtered_data.tsv
## 2026-05-27 15:31:45.590658 INFO::Writing filtered, normalized data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_20000/features/filtered_data_norm.tsv
## 2026-05-27 15:31:45.646791 INFO::Writing filtered, normalized, transformed data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_20000/features/filtered_data_norm_transformed.tsv
## 2026-05-27 15:31:45.700902 WARNING::Deleting existing residuals file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_20000/fits/residuals.rds
## 2026-05-27 15:31:45.705346 INFO::Writing residuals to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_20000/fits/residuals.rds
## 2026-05-27 15:31:45.716915 WARNING::Deleting existing fitted file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_20000/fits/fitted.rds
## 2026-05-27 15:31:45.721913 INFO::Writing fitted values to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_20000/fits/fitted.rds
## 2026-05-27 15:31:45.734441 WARNING::Deleting existing ranef file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_20000/fits/ranef.rds
## 2026-05-27 15:31:45.739969 INFO::Writing extracted random effects to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_20000/fits/ranef.rds
## 2026-05-27 15:31:45.746465 INFO::Writing all results to file (ordered by increasing q-values): C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_20000/all_results.tsv
## 2026-05-27 15:31:45.759218 INFO::Writing the significant results (those which are less than or equal to the threshold of 0.050000 ) to file (ordered by increasing q-values): C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_20000/significant_results.tsv
## 2026-05-27 15:31:45.765911 INFO::Writing heatmap of significant results to file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_20000/heatmap.pdf
## 2026-05-27 15:31:45.894216 INFO::Writing association plots (one for each significant association) to output folder: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_20000
## 2026-05-27 15:31:45.909315 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-27 15:31:45.915701 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-27 15:31:45.923923 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:46.338983 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:46.666679 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:47.042092 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:47.36972 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:47.693414 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:48.067818 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:48.379895 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:48.689156 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:49.00034 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:49.31611 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:49.614333 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:49.919786 INFO::Creating scatter plot for continuous data, Timepoint vs Sellimonas
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:50.227109 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:50.516857 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:50.84965 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:51.159723 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:51.556047 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:51.884757 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:52.192804 INFO::Creating scatter plot for continuous data, Timepoint vs Haemophilus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:52.48794 INFO::Creating scatter plot for continuous data, Timepoint vs Flavonifractor
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:52.774085 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:53.090199 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:53.377199 INFO::Creating scatter plot for continuous data, Timepoint vs Other
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:53.686647 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnoclostridium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:53.989131 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridium_innocuum_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:54.322801 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_hallii_group
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:58.171969 INFO::Plotting data for metadata number 2, ASQtime_interaction
## 2026-05-27 15:31:58.178465 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:58.897395 INFO::Plotting data for metadata number 3, ASQ_slope
## 2026-05-27 15:31:58.902533 INFO::Creating scatter plot for continuous data, ASQ_slope vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:59.525184 INFO::Plotting data for metadata number 4, SeqDepth
## 2026-05-27 15:31:59.531368 INFO::Creating scatter plot for continuous data, SeqDepth vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:31:59.83354 INFO::Creating scatter plot for continuous data, SeqDepth vs Subdoligranulum
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:01.092985 INFO::Plotting data for metadata number 5, GA_weeks
## 2026-05-27 15:32:01.098528 INFO::Creating scatter plot for continuous data, GA_weeks vs Streptococcus
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## === Depth: 30000 ===
## 
## 40 samples removed because they contained fewer reads than `sample`.
## 
## 3465 features removed because they are not present in all samples after subsampling.
## 
## A pseudocount of 10.5 was applied.
## [1] "Warning: Deleting existing log file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_30000/maaslin2.log"
## 2026-05-27 15:32:07.818815 INFO::Writing function arguments to log file
## 2026-05-27 15:32:07.859028 INFO::Verifying options selected are valid
## 2026-05-27 15:32:07.86202 INFO::Determining format of input files
## 2026-05-27 15:32:07.86666 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-27 15:32:07.885509 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-27 15:32:07.889039 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-27 15:32:07.89259 INFO::Filter data based on min abundance and min prevalence
## 2026-05-27 15:32:07.895626 INFO::Total samples in data: 360
## 2026-05-27 15:32:07.898591 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-27 15:32:07.904574 INFO::Total filtered features: 0
## 2026-05-27 15:32:07.907535 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-27 15:32:07.913024 INFO::Total filtered features with variance filtering: 0
## 2026-05-27 15:32:07.916177 INFO::Filtered feature names from variance filtering:
## 2026-05-27 15:32:07.920483 INFO::Running selected normalization method: NONE
## 2026-05-27 15:32:07.924194 INFO::Applying z-score to standardize continuous metadata
## 2026-05-27 15:32:07.941003 INFO::Running selected transform method: NONE
## 2026-05-27 15:32:07.943842 INFO::Running selected analysis method: LM
## 2026-05-27 15:32:07.947612 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-27 15:32:08.03168 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## 2026-05-27 15:32:08.128611 INFO::Fitting model to feature number 3, Eubacterium_hallii_group
## boundary (singular) fit: see help('isSingular')
## 2026-05-27 15:32:08.269094 INFO::Fitting model to feature number 4, Ruminococcus_gnavus_group
## 2026-05-27 15:32:08.342 INFO::Fitting model to feature number 5, Ruminococcus_torques_group
## 2026-05-27 15:32:08.416891 INFO::Fitting model to feature number 6, Actinomyces
## 2026-05-27 15:32:08.492389 INFO::Fitting model to feature number 7, Akkermansia
## 2026-05-27 15:32:08.564464 INFO::Fitting model to feature number 8, Anaerostipes
## 2026-05-27 15:32:08.638893 INFO::Fitting model to feature number 9, Bacteroides
## 2026-05-27 15:32:08.716445 INFO::Fitting model to feature number 10, Bifidobacterium
## 2026-05-27 15:32:08.791875 INFO::Fitting model to feature number 11, Blautia
## 2026-05-27 15:32:08.866898 INFO::Fitting model to feature number 12, Butyricicoccus
## 2026-05-27 15:32:08.939117 INFO::Fitting model to feature number 13, Clostridioides
## 2026-05-27 15:32:09.014247 INFO::Fitting model to feature number 14, Clostridium_sensu_stricto_1
## 2026-05-27 15:32:09.092854 INFO::Fitting model to feature number 15, Collinsella
## 2026-05-27 15:32:09.163558 INFO::Fitting model to feature number 16, Dorea
## 2026-05-27 15:32:09.295109 INFO::Fitting model to feature number 17, Eggerthella
## 2026-05-27 15:32:09.43674 INFO::Fitting model to feature number 18, Enterococcus
## 2026-05-27 15:32:09.516844 INFO::Fitting model to feature number 19, Erysipelatoclostridium
## 2026-05-27 15:32:09.593225 INFO::Fitting model to feature number 20, Faecalibacterium
## 2026-05-27 15:32:09.671423 INFO::Fitting model to feature number 21, Flavonifractor
## 2026-05-27 15:32:09.747456 INFO::Fitting model to feature number 22, Fusicatenibacter
## 2026-05-27 15:32:09.819906 INFO::Fitting model to feature number 23, Haemophilus
## 2026-05-27 15:32:09.892167 INFO::Fitting model to feature number 24, Intestinibacter
## 2026-05-27 15:32:09.964554 INFO::Fitting model to feature number 25, Lachnoclostridium
## 2026-05-27 15:32:10.038534 INFO::Fitting model to feature number 26, Lachnospira
## 2026-05-27 15:32:10.106426 INFO::Fitting model to feature number 27, Lachnospiraceae_NK4A136_group
## 2026-05-27 15:32:10.181291 INFO::Fitting model to feature number 28, Lachnospiraceae_UCG.004
## 2026-05-27 15:32:10.262747 INFO::Fitting model to feature number 29, Lactobacillus
## 2026-05-27 15:32:10.346156 INFO::Fitting model to feature number 30, Megasphaera
## 2026-05-27 15:32:10.489737 INFO::Fitting model to feature number 31, Parabacteroides
## 2026-05-27 15:32:10.580542 INFO::Fitting model to feature number 32, Roseburia
## 2026-05-27 15:32:10.666124 INFO::Fitting model to feature number 33, Senegalimassilia
## 2026-05-27 15:32:10.750709 INFO::Fitting model to feature number 34, Streptococcus
## 2026-05-27 15:32:10.862901 INFO::Fitting model to feature number 35, Subdoligranulum
## 2026-05-27 15:32:10.960729 INFO::Fitting model to feature number 36, Sutterella
## 2026-05-27 15:32:11.049597 INFO::Fitting model to feature number 37, Tyzzerella_4
## 2026-05-27 15:32:11.124698 INFO::Fitting model to feature number 38, uncultured
## 2026-05-27 15:32:11.197304 INFO::Fitting model to feature number 39, Veillonella
## 2026-05-27 15:32:11.278635 INFO::Fitting model to feature number 40, Other
## 2026-05-27 15:32:11.365713 INFO::Counting total values for each feature
## 2026-05-27 15:32:11.383996 INFO::Writing filtered data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_30000/features/filtered_data.tsv
## 2026-05-27 15:32:11.433638 INFO::Writing filtered, normalized data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_30000/features/filtered_data_norm.tsv
## 2026-05-27 15:32:11.48126 INFO::Writing filtered, normalized, transformed data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_30000/features/filtered_data_norm_transformed.tsv
## 2026-05-27 15:32:11.539126 WARNING::Deleting existing residuals file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_30000/fits/residuals.rds
## 2026-05-27 15:32:11.54412 INFO::Writing residuals to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_30000/fits/residuals.rds
## 2026-05-27 15:32:11.556441 WARNING::Deleting existing fitted file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_30000/fits/fitted.rds
## 2026-05-27 15:32:11.561059 INFO::Writing fitted values to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_30000/fits/fitted.rds
## 2026-05-27 15:32:11.57375 WARNING::Deleting existing ranef file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_30000/fits/ranef.rds
## 2026-05-27 15:32:11.578622 INFO::Writing extracted random effects to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_30000/fits/ranef.rds
## 2026-05-27 15:32:11.585176 INFO::Writing all results to file (ordered by increasing q-values): C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_30000/all_results.tsv
## 2026-05-27 15:32:11.596648 INFO::Writing the significant results (those which are less than or equal to the threshold of 0.050000 ) to file (ordered by increasing q-values): C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_30000/significant_results.tsv
## 2026-05-27 15:32:11.602853 INFO::Writing heatmap of significant results to file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_30000/heatmap.pdf
## 2026-05-27 15:32:11.705288 INFO::Writing association plots (one for each significant association) to output folder: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_30000
## 2026-05-27 15:32:11.712493 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-27 15:32:11.715887 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-27 15:32:11.721744 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:12.047227 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:12.49007 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:12.990668 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:13.497827 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:13.800858 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:14.103689 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:14.397578 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:14.720348 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:15.022908 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:15.29232 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:15.606519 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:15.910867 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:16.175508 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:16.462206 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:16.715341 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:16.972513 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:17.2535 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:17.538734 INFO::Creating scatter plot for continuous data, Timepoint vs Haemophilus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:17.855188 INFO::Creating scatter plot for continuous data, Timepoint vs Flavonifractor
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:18.191351 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:18.534335 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:18.82237 INFO::Creating scatter plot for continuous data, Timepoint vs Other
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:19.073001 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnoclostridium
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:22.438679 INFO::Plotting data for metadata number 2, ASQtime_interaction
## 2026-05-27 15:32:22.445302 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:23.118025 INFO::Plotting data for metadata number 3, SeqDepth
## 2026-05-27 15:32:23.124271 INFO::Creating scatter plot for continuous data, SeqDepth vs Subdoligranulum
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:23.538205 INFO::Creating scatter plot for continuous data, SeqDepth vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:23.936795 INFO::Creating scatter plot for continuous data, SeqDepth vs Akkermansia
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:25.289735 INFO::Plotting data for metadata number 4, ASQ_slope
## 2026-05-27 15:32:25.295428 INFO::Creating scatter plot for continuous data, ASQ_slope vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:25.904918 INFO::Plotting data for metadata number 5, GA_weeks
## 2026-05-27 15:32:25.911048 INFO::Creating scatter plot for continuous data, GA_weeks vs Streptococcus
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## === Depth: 40000 ===
## 
## 50 samples removed because they contained fewer reads than `sample`.
## 
## 3507 features removed because they are not present in all samples after subsampling.
## 
## A pseudocount of 16 was applied.
## [1] "Warning: Deleting existing log file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_40000/maaslin2.log"
## 2026-05-27 15:32:31.628601 INFO::Writing function arguments to log file
## 2026-05-27 15:32:31.668383 INFO::Verifying options selected are valid
## 2026-05-27 15:32:31.671241 INFO::Determining format of input files
## 2026-05-27 15:32:31.675555 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-27 15:32:31.691617 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-27 15:32:31.694281 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-27 15:32:31.696952 INFO::Filter data based on min abundance and min prevalence
## 2026-05-27 15:32:31.699371 INFO::Total samples in data: 350
## 2026-05-27 15:32:31.702588 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-27 15:32:31.706909 INFO::Total filtered features: 0
## 2026-05-27 15:32:31.709466 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-27 15:32:31.714059 INFO::Total filtered features with variance filtering: 0
## 2026-05-27 15:32:31.716717 INFO::Filtered feature names from variance filtering:
## 2026-05-27 15:32:31.719866 INFO::Running selected normalization method: NONE
## 2026-05-27 15:32:31.722562 INFO::Applying z-score to standardize continuous metadata
## 2026-05-27 15:32:31.732927 INFO::Running selected transform method: NONE
## 2026-05-27 15:32:31.735744 INFO::Running selected analysis method: LM
## 2026-05-27 15:32:31.739055 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-27 15:32:31.807429 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## 2026-05-27 15:32:31.874139 INFO::Fitting model to feature number 3, Eubacterium_hallii_group
## boundary (singular) fit: see help('isSingular')
## 2026-05-27 15:32:31.941636 INFO::Fitting model to feature number 4, Ruminococcus_gnavus_group
## 2026-05-27 15:32:32.008109 INFO::Fitting model to feature number 5, Ruminococcus_torques_group
## 2026-05-27 15:32:32.079372 INFO::Fitting model to feature number 6, Actinomyces
## 2026-05-27 15:32:32.144395 INFO::Fitting model to feature number 7, Akkermansia
## 2026-05-27 15:32:32.246666 INFO::Fitting model to feature number 8, Anaerostipes
## 2026-05-27 15:32:32.322159 INFO::Fitting model to feature number 9, Bacteroides
## 2026-05-27 15:32:32.392163 INFO::Fitting model to feature number 10, Bifidobacterium
## 2026-05-27 15:32:32.459511 INFO::Fitting model to feature number 11, Blautia
## 2026-05-27 15:32:32.526662 INFO::Fitting model to feature number 12, Butyricicoccus
## 2026-05-27 15:32:32.602835 INFO::Fitting model to feature number 13, Clostridioides
## 2026-05-27 15:32:32.723055 INFO::Fitting model to feature number 14, Clostridium_sensu_stricto_1
## 2026-05-27 15:32:32.801454 INFO::Fitting model to feature number 15, Collinsella
## 2026-05-27 15:32:32.872559 INFO::Fitting model to feature number 16, Dorea
## 2026-05-27 15:32:32.945622 INFO::Fitting model to feature number 17, Eggerthella
## 2026-05-27 15:32:33.014086 INFO::Fitting model to feature number 18, Enterococcus
## 2026-05-27 15:32:33.080176 INFO::Fitting model to feature number 19, Erysipelatoclostridium
## 2026-05-27 15:32:33.146126 INFO::Fitting model to feature number 20, Faecalibacterium
## 2026-05-27 15:32:33.210426 INFO::Fitting model to feature number 21, Flavonifractor
## 2026-05-27 15:32:33.280747 INFO::Fitting model to feature number 22, Fusicatenibacter
## 2026-05-27 15:32:33.347334 INFO::Fitting model to feature number 23, Haemophilus
## 2026-05-27 15:32:33.412219 INFO::Fitting model to feature number 24, Intestinibacter
## 2026-05-27 15:32:33.478698 INFO::Fitting model to feature number 25, Lachnoclostridium
## 2026-05-27 15:32:33.573364 INFO::Fitting model to feature number 26, Lachnospira
## 2026-05-27 15:32:33.644809 INFO::Fitting model to feature number 27, Lachnospiraceae_NK4A136_group
## 2026-05-27 15:32:33.710848 INFO::Fitting model to feature number 28, Lachnospiraceae_UCG.004
## 2026-05-27 15:32:33.784882 INFO::Fitting model to feature number 29, Lactobacillus
## 2026-05-27 15:32:33.852158 INFO::Fitting model to feature number 30, Megasphaera
## 2026-05-27 15:32:33.917237 INFO::Fitting model to feature number 31, Parabacteroides
## 2026-05-27 15:32:33.985726 INFO::Fitting model to feature number 32, Roseburia
## 2026-05-27 15:32:34.054939 INFO::Fitting model to feature number 33, Sellimonas
## 2026-05-27 15:32:34.1531 INFO::Fitting model to feature number 34, Senegalimassilia
## 2026-05-27 15:32:34.2705 INFO::Fitting model to feature number 35, Streptococcus
## 2026-05-27 15:32:34.368525 INFO::Fitting model to feature number 36, Subdoligranulum
## 2026-05-27 15:32:34.446987 INFO::Fitting model to feature number 37, Sutterella
## 2026-05-27 15:32:34.515096 INFO::Fitting model to feature number 38, Tyzzerella_4
## 2026-05-27 15:32:34.581753 INFO::Fitting model to feature number 39, uncultured
## 2026-05-27 15:32:34.648581 INFO::Fitting model to feature number 40, Veillonella
## 2026-05-27 15:32:34.714985 INFO::Fitting model to feature number 41, Other
## 2026-05-27 15:32:34.798341 INFO::Counting total values for each feature
## 2026-05-27 15:32:34.813805 INFO::Writing filtered data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_40000/features/filtered_data.tsv
## 2026-05-27 15:32:34.859318 INFO::Writing filtered, normalized data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_40000/features/filtered_data_norm.tsv
## 2026-05-27 15:32:34.906922 INFO::Writing filtered, normalized, transformed data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_40000/features/filtered_data_norm_transformed.tsv
## 2026-05-27 15:32:34.953294 WARNING::Deleting existing residuals file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_40000/fits/residuals.rds
## 2026-05-27 15:32:34.957511 INFO::Writing residuals to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_40000/fits/residuals.rds
## 2026-05-27 15:32:34.970859 WARNING::Deleting existing fitted file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_40000/fits/fitted.rds
## 2026-05-27 15:32:34.975393 INFO::Writing fitted values to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_40000/fits/fitted.rds
## 2026-05-27 15:32:34.987829 WARNING::Deleting existing ranef file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_40000/fits/ranef.rds
## 2026-05-27 15:32:34.992748 INFO::Writing extracted random effects to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_40000/fits/ranef.rds
## 2026-05-27 15:32:34.999264 INFO::Writing all results to file (ordered by increasing q-values): C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_40000/all_results.tsv
## 2026-05-27 15:32:35.009976 INFO::Writing the significant results (those which are less than or equal to the threshold of 0.050000 ) to file (ordered by increasing q-values): C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_40000/significant_results.tsv
## 2026-05-27 15:32:35.017515 INFO::Writing heatmap of significant results to file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_40000/heatmap.pdf
## 2026-05-27 15:32:35.125052 INFO::Writing association plots (one for each significant association) to output folder: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_40000
## 2026-05-27 15:32:35.133844 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-27 15:32:35.137399 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-27 15:32:35.145744 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:35.469671 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:35.886557 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:36.220056 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:36.560519 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:36.93796 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:37.281705 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:37.537381 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:37.795535 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:38.055196 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:38.41397 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:38.731636 INFO::Creating scatter plot for continuous data, Timepoint vs Sellimonas
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:39.016875 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:39.297919 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:39.671052 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:39.967841 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:40.29224 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:40.592197 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:40.847618 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:41.145695 INFO::Creating scatter plot for continuous data, Timepoint vs Haemophilus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:41.431154 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:41.744341 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:42.033052 INFO::Creating scatter plot for continuous data, Timepoint vs Flavonifractor
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:42.283042 INFO::Creating scatter plot for continuous data, Timepoint vs Other
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:42.565291 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnoclostridium
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:46.541283 INFO::Plotting data for metadata number 2, SeqDepth
## 2026-05-27 15:32:46.546721 INFO::Creating scatter plot for continuous data, SeqDepth vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:46.810532 INFO::Creating scatter plot for continuous data, SeqDepth vs Subdoligranulum
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:47.289189 INFO::Creating scatter plot for continuous data, SeqDepth vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:47.599595 INFO::Creating scatter plot for continuous data, SeqDepth vs Butyricicoccus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:47.878219 INFO::Creating scatter plot for continuous data, SeqDepth vs Akkermansia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:48.20229 INFO::Creating scatter plot for continuous data, SeqDepth vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:48.6021 INFO::Creating scatter plot for continuous data, SeqDepth vs Other
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:51.770683 INFO::Plotting data for metadata number 3, ASQ_slope
## 2026-05-27 15:32:51.780138 INFO::Creating scatter plot for continuous data, ASQ_slope vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:52.559685 INFO::Plotting data for metadata number 4, ASQtime_interaction
## 2026-05-27 15:32:52.565743 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:32:53.295475 INFO::Plotting data for metadata number 5, GA_weeks
## 2026-05-27 15:32:53.309411 INFO::Creating scatter plot for continuous data, GA_weeks vs Streptococcus
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## === Depth: 50000 ===
## 
## 57 samples removed because they contained fewer reads than `sample`.
## 
## 3544 features removed because they are not present in all samples after subsampling.
## 
## A pseudocount of 18.5 was applied.
## [1] "Warning: Deleting existing log file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_50000/maaslin2.log"
## 2026-05-27 15:33:01.718957 INFO::Writing function arguments to log file
## 2026-05-27 15:33:01.768111 INFO::Verifying options selected are valid
## 2026-05-27 15:33:01.771566 INFO::Determining format of input files
## 2026-05-27 15:33:01.777389 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-27 15:33:01.799106 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-27 15:33:01.802412 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-27 15:33:01.807835 INFO::Filter data based on min abundance and min prevalence
## 2026-05-27 15:33:01.81366 INFO::Total samples in data: 343
## 2026-05-27 15:33:01.819399 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-27 15:33:01.825609 INFO::Total filtered features: 0
## 2026-05-27 15:33:01.829476 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-27 15:33:01.835439 INFO::Total filtered features with variance filtering: 0
## 2026-05-27 15:33:01.838599 INFO::Filtered feature names from variance filtering:
## 2026-05-27 15:33:01.842017 INFO::Running selected normalization method: NONE
## 2026-05-27 15:33:01.846368 INFO::Applying z-score to standardize continuous metadata
## 2026-05-27 15:33:01.863444 INFO::Running selected transform method: NONE
## 2026-05-27 15:33:01.86733 INFO::Running selected analysis method: LM
## 2026-05-27 15:33:01.872386 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-27 15:33:01.97899 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## 2026-05-27 15:33:02.080449 INFO::Fitting model to feature number 3, Eubacterium_hallii_group
## boundary (singular) fit: see help('isSingular')
## 2026-05-27 15:33:02.183261 INFO::Fitting model to feature number 4, Ruminococcus_gnavus_group
## 2026-05-27 15:33:02.284974 INFO::Fitting model to feature number 5, Ruminococcus_torques_group
## 2026-05-27 15:33:02.387472 INFO::Fitting model to feature number 6, Actinomyces
## 2026-05-27 15:33:02.479927 INFO::Fitting model to feature number 7, Akkermansia
## 2026-05-27 15:33:02.57618 INFO::Fitting model to feature number 8, Anaerostipes
## 2026-05-27 15:33:02.709769 INFO::Fitting model to feature number 9, Bacteroides
## 2026-05-27 15:33:02.866552 INFO::Fitting model to feature number 10, Bifidobacterium
## 2026-05-27 15:33:02.956049 INFO::Fitting model to feature number 11, Blautia
## 2026-05-27 15:33:03.047709 INFO::Fitting model to feature number 12, Butyricicoccus
## 2026-05-27 15:33:03.137201 INFO::Fitting model to feature number 13, Clostridioides
## 2026-05-27 15:33:03.219019 INFO::Fitting model to feature number 14, Clostridium_sensu_stricto_1
## 2026-05-27 15:33:03.308664 INFO::Fitting model to feature number 15, Collinsella
## 2026-05-27 15:33:03.39226 INFO::Fitting model to feature number 16, Dorea
## 2026-05-27 15:33:03.47813 INFO::Fitting model to feature number 17, Eggerthella
## 2026-05-27 15:33:03.564304 INFO::Fitting model to feature number 18, Enterococcus
## 2026-05-27 15:33:03.648684 INFO::Fitting model to feature number 19, Erysipelatoclostridium
## 2026-05-27 15:33:03.797348 INFO::Fitting model to feature number 20, Faecalibacterium
## 2026-05-27 15:33:03.90255 INFO::Fitting model to feature number 21, Flavonifractor
## 2026-05-27 15:33:03.973647 INFO::Fitting model to feature number 22, Fusicatenibacter
## 2026-05-27 15:33:04.045668 INFO::Fitting model to feature number 23, Haemophilus
## 2026-05-27 15:33:04.114813 INFO::Fitting model to feature number 24, Intestinibacter
## 2026-05-27 15:33:04.183389 INFO::Fitting model to feature number 25, Lachnoclostridium
## 2026-05-27 15:33:04.255783 INFO::Fitting model to feature number 26, Lachnospira
## 2026-05-27 15:33:04.3384 INFO::Fitting model to feature number 27, Lachnospiraceae_UCG.004
## 2026-05-27 15:33:04.43171 INFO::Fitting model to feature number 28, Lactobacillus
## 2026-05-27 15:33:04.508118 INFO::Fitting model to feature number 29, Megasphaera
## 2026-05-27 15:33:04.587285 INFO::Fitting model to feature number 30, Parabacteroides
## 2026-05-27 15:33:04.662659 INFO::Fitting model to feature number 31, Roseburia
## 2026-05-27 15:33:04.733171 INFO::Fitting model to feature number 32, Senegalimassilia
## 2026-05-27 15:33:04.80254 INFO::Fitting model to feature number 33, Streptococcus
## 2026-05-27 15:33:04.871988 INFO::Fitting model to feature number 34, Subdoligranulum
## 2026-05-27 15:33:04.941337 INFO::Fitting model to feature number 35, Sutterella
## 2026-05-27 15:33:05.07291 INFO::Fitting model to feature number 36, Tyzzerella_4
## 2026-05-27 15:33:05.175898 INFO::Fitting model to feature number 37, uncultured
## 2026-05-27 15:33:05.258999 INFO::Fitting model to feature number 38, Veillonella
## 2026-05-27 15:33:05.33663 INFO::Fitting model to feature number 39, Other
## 2026-05-27 15:33:05.425984 INFO::Counting total values for each feature
## 2026-05-27 15:33:05.441012 INFO::Writing filtered data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_50000/features/filtered_data.tsv
## 2026-05-27 15:33:05.490071 INFO::Writing filtered, normalized data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_50000/features/filtered_data_norm.tsv
## 2026-05-27 15:33:05.535064 INFO::Writing filtered, normalized, transformed data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_50000/features/filtered_data_norm_transformed.tsv
## 2026-05-27 15:33:05.582092 WARNING::Deleting existing residuals file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_50000/fits/residuals.rds
## 2026-05-27 15:33:05.586094 INFO::Writing residuals to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_50000/fits/residuals.rds
## 2026-05-27 15:33:05.597608 WARNING::Deleting existing fitted file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_50000/fits/fitted.rds
## 2026-05-27 15:33:05.603102 INFO::Writing fitted values to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_50000/fits/fitted.rds
## 2026-05-27 15:33:05.615176 WARNING::Deleting existing ranef file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_50000/fits/ranef.rds
## 2026-05-27 15:33:05.619342 INFO::Writing extracted random effects to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_50000/fits/ranef.rds
## 2026-05-27 15:33:05.625198 INFO::Writing all results to file (ordered by increasing q-values): C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_50000/all_results.tsv
## 2026-05-27 15:33:05.63676 INFO::Writing the significant results (those which are less than or equal to the threshold of 0.050000 ) to file (ordered by increasing q-values): C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_50000/significant_results.tsv
## 2026-05-27 15:33:05.644032 INFO::Writing heatmap of significant results to file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_50000/heatmap.pdf
## 2026-05-27 15:33:05.753784 INFO::Writing association plots (one for each significant association) to output folder: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_50000
## 2026-05-27 15:33:05.762446 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-27 15:33:05.765309 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-27 15:33:05.770723 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:06.045063 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:06.406709 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:06.821431 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:07.206456 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:07.519068 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:07.867349 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:08.22238 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:08.528343 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:08.821778 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:09.13289 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:09.445366 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:09.764479 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:10.078687 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:10.393175 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:10.707681 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:11.012126 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:11.27659 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:11.578557 INFO::Creating scatter plot for continuous data, Timepoint vs Haemophilus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:11.847336 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:12.193176 INFO::Creating scatter plot for continuous data, Timepoint vs Flavonifractor
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:12.558518 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:12.821307 INFO::Creating scatter plot for continuous data, Timepoint vs Other
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:13.133715 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnoclostridium
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:16.552136 INFO::Plotting data for metadata number 2, SeqDepth
## 2026-05-27 15:33:16.557911 INFO::Creating scatter plot for continuous data, SeqDepth vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:16.809572 INFO::Creating scatter plot for continuous data, SeqDepth vs Subdoligranulum
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:17.133773 INFO::Creating scatter plot for continuous data, SeqDepth vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:17.39779 INFO::Creating scatter plot for continuous data, SeqDepth vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:17.889899 INFO::Creating scatter plot for continuous data, SeqDepth vs Butyricicoccus
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:19.737202 INFO::Plotting data for metadata number 3, ASQtime_interaction
## 2026-05-27 15:33:19.742974 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:20.444469 INFO::Plotting data for metadata number 4, ASQ_slope
## 2026-05-27 15:33:20.450674 INFO::Creating scatter plot for continuous data, ASQ_slope vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:21.153851 INFO::Plotting data for metadata number 5, GA_weeks
## 2026-05-27 15:33:21.159206 INFO::Creating scatter plot for continuous data, GA_weeks vs Streptococcus
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:21.75722 INFO::Plotting data for metadata number 6, BW_infant
## 2026-05-27 15:33:21.762717 INFO::Creating scatter plot for continuous data, BW_infant vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## === Depth: 60000 ===
## 
## 68 samples removed because they contained fewer reads than `sample`.
## 
## 3593 features removed because they are not present in all samples after subsampling.
## 
## A pseudocount of 24 was applied.
## [1] "Warning: Deleting existing log file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_60000/maaslin2.log"
## 2026-05-27 15:33:28.589001 INFO::Writing function arguments to log file
## 2026-05-27 15:33:28.628842 INFO::Verifying options selected are valid
## 2026-05-27 15:33:28.631838 INFO::Determining format of input files
## 2026-05-27 15:33:28.636292 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-27 15:33:28.653812 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-27 15:33:28.656475 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-27 15:33:28.659614 INFO::Filter data based on min abundance and min prevalence
## 2026-05-27 15:33:28.662129 INFO::Total samples in data: 332
## 2026-05-27 15:33:28.664654 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-27 15:33:28.668289 INFO::Total filtered features: 0
## 2026-05-27 15:33:28.670887 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-27 15:33:28.676811 INFO::Total filtered features with variance filtering: 0
## 2026-05-27 15:33:28.679401 INFO::Filtered feature names from variance filtering:
## 2026-05-27 15:33:28.682134 INFO::Running selected normalization method: NONE
## 2026-05-27 15:33:28.684881 INFO::Applying z-score to standardize continuous metadata
## 2026-05-27 15:33:28.696012 INFO::Running selected transform method: NONE
## 2026-05-27 15:33:28.69838 INFO::Running selected analysis method: LM
## 2026-05-27 15:33:28.701498 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-27 15:33:28.769944 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## 2026-05-27 15:33:28.842807 INFO::Fitting model to feature number 3, Eubacterium_hallii_group
## boundary (singular) fit: see help('isSingular')
## 2026-05-27 15:33:28.916003 INFO::Fitting model to feature number 4, Ruminococcus_gnavus_group
## 2026-05-27 15:33:28.982636 INFO::Fitting model to feature number 5, Ruminococcus_torques_group
## 2026-05-27 15:33:29.046812 INFO::Fitting model to feature number 6, Actinomyces
## 2026-05-27 15:33:29.110179 INFO::Fitting model to feature number 7, Akkermansia
## 2026-05-27 15:33:29.195216 INFO::Fitting model to feature number 8, Anaerostipes
## 2026-05-27 15:33:29.268196 INFO::Fitting model to feature number 9, Bacteroides
## 2026-05-27 15:33:29.335129 INFO::Fitting model to feature number 10, Bifidobacterium
## 2026-05-27 15:33:29.398869 INFO::Fitting model to feature number 11, Blautia
## 2026-05-27 15:33:29.464205 INFO::Fitting model to feature number 12, Butyricicoccus
## 2026-05-27 15:33:29.52687 INFO::Fitting model to feature number 13, Clostridioides
## 2026-05-27 15:33:29.589836 INFO::Fitting model to feature number 14, Clostridium_sensu_stricto_1
## 2026-05-27 15:33:29.65504 INFO::Fitting model to feature number 15, Collinsella
## 2026-05-27 15:33:29.722509 INFO::Fitting model to feature number 16, Dorea
## 2026-05-27 15:33:29.827463 INFO::Fitting model to feature number 17, Eggerthella
## 2026-05-27 15:33:29.927429 INFO::Fitting model to feature number 18, Enterococcus
## 2026-05-27 15:33:29.994925 INFO::Fitting model to feature number 19, Erysipelatoclostridium
## 2026-05-27 15:33:30.056779 INFO::Fitting model to feature number 20, Faecalibacterium
## 2026-05-27 15:33:30.12097 INFO::Fitting model to feature number 21, Flavonifractor
## 2026-05-27 15:33:30.185753 INFO::Fitting model to feature number 22, Fusicatenibacter
## 2026-05-27 15:33:30.252458 INFO::Fitting model to feature number 23, Haemophilus
## 2026-05-27 15:33:30.318591 INFO::Fitting model to feature number 24, Intestinibacter
## 2026-05-27 15:33:30.383653 INFO::Fitting model to feature number 25, Lachnoclostridium
## 2026-05-27 15:33:30.446262 INFO::Fitting model to feature number 26, Lachnospira
## 2026-05-27 15:33:30.525133 INFO::Fitting model to feature number 27, Lactobacillus
## 2026-05-27 15:33:30.58817 INFO::Fitting model to feature number 28, Megasphaera
## 2026-05-27 15:33:30.652528 INFO::Fitting model to feature number 29, Parabacteroides
## 2026-05-27 15:33:30.720651 INFO::Fitting model to feature number 30, Roseburia
## 2026-05-27 15:33:30.785889 INFO::Fitting model to feature number 31, Senegalimassilia
## 2026-05-27 15:33:30.850449 INFO::Fitting model to feature number 32, Staphylococcus
## 2026-05-27 15:33:30.916436 INFO::Fitting model to feature number 33, Streptococcus
## 2026-05-27 15:33:30.983956 INFO::Fitting model to feature number 34, Subdoligranulum
## 2026-05-27 15:33:31.04721 INFO::Fitting model to feature number 35, Sutterella
## 2026-05-27 15:33:31.111825 INFO::Fitting model to feature number 36, Tyzzerella_4
## 2026-05-27 15:33:31.174891 INFO::Fitting model to feature number 37, uncultured
## 2026-05-27 15:33:31.250883 INFO::Fitting model to feature number 38, Veillonella
## 2026-05-27 15:33:31.315925 INFO::Fitting model to feature number 39, Other
## 2026-05-27 15:33:31.419737 INFO::Counting total values for each feature
## 2026-05-27 15:33:31.448087 INFO::Writing filtered data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_60000/features/filtered_data.tsv
## 2026-05-27 15:33:31.514124 INFO::Writing filtered, normalized data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_60000/features/filtered_data_norm.tsv
## 2026-05-27 15:33:31.563109 INFO::Writing filtered, normalized, transformed data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_60000/features/filtered_data_norm_transformed.tsv
## 2026-05-27 15:33:31.607471 WARNING::Deleting existing residuals file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_60000/fits/residuals.rds
## 2026-05-27 15:33:31.611327 INFO::Writing residuals to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_60000/fits/residuals.rds
## 2026-05-27 15:33:31.622753 WARNING::Deleting existing fitted file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_60000/fits/fitted.rds
## 2026-05-27 15:33:31.627083 INFO::Writing fitted values to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_60000/fits/fitted.rds
## 2026-05-27 15:33:31.639313 WARNING::Deleting existing ranef file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_60000/fits/ranef.rds
## 2026-05-27 15:33:31.652783 INFO::Writing extracted random effects to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_60000/fits/ranef.rds
## 2026-05-27 15:33:31.659191 INFO::Writing all results to file (ordered by increasing q-values): C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_60000/all_results.tsv
## 2026-05-27 15:33:31.67209 INFO::Writing the significant results (those which are less than or equal to the threshold of 0.050000 ) to file (ordered by increasing q-values): C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_60000/significant_results.tsv
## 2026-05-27 15:33:31.678053 INFO::Writing heatmap of significant results to file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_60000/heatmap.pdf
## 2026-05-27 15:33:31.776643 INFO::Writing association plots (one for each significant association) to output folder: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_60000
## 2026-05-27 15:33:31.783381 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-27 15:33:31.786009 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-27 15:33:31.792193 INFO::Creating scatter plot for continuous data, Timepoint vs Staphylococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:32.044613 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:32.352958 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:32.652884 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:32.930603 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:33.294136 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:33.585693 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:33.991271 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:34.309575 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:34.603691 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:34.868449 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:35.183445 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:35.482162 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:35.763017 INFO::Creating scatter plot for continuous data, Timepoint vs Other
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:36.043696 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:36.32307 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:36.606447 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:36.906477 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:37.180653 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:37.46579 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:37.748106 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:38.037442 INFO::Creating scatter plot for continuous data, Timepoint vs Haemophilus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:38.335413 INFO::Creating scatter plot for continuous data, Timepoint vs Flavonifractor
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:38.609742 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:42.26749 INFO::Plotting data for metadata number 2, SeqDepth
## 2026-05-27 15:33:42.273115 INFO::Creating scatter plot for continuous data, SeqDepth vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:42.536956 INFO::Creating scatter plot for continuous data, SeqDepth vs Subdoligranulum
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:42.852407 INFO::Creating scatter plot for continuous data, SeqDepth vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:43.28759 INFO::Creating scatter plot for continuous data, SeqDepth vs Butyricicoccus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:43.587134 INFO::Creating scatter plot for continuous data, SeqDepth vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:45.664234 INFO::Plotting data for metadata number 3, ASQtime_interaction
## 2026-05-27 15:33:45.670188 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:46.38863 INFO::Plotting data for metadata number 4, ASQ_slope
## 2026-05-27 15:33:46.393819 INFO::Creating scatter plot for continuous data, ASQ_slope vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:46.994164 INFO::Plotting data for metadata number 5, GA_weeks
## 2026-05-27 15:33:47.000597 INFO::Creating scatter plot for continuous data, GA_weeks vs Streptococcus
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:47.703423 INFO::Plotting data for metadata number 6, BW_infant
## 2026-05-27 15:33:47.712782 INFO::Creating scatter plot for continuous data, BW_infant vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## === Depth: 70000 ===
## 
## 78 samples removed because they contained fewer reads than `sample`.
## 
## 3632 features removed because they are not present in all samples after subsampling.
## 
## A pseudocount of 26 was applied.
## [1] "Warning: Deleting existing log file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_70000/maaslin2.log"
## 2026-05-27 15:33:54.683242 INFO::Writing function arguments to log file
## 2026-05-27 15:33:54.726877 INFO::Verifying options selected are valid
## 2026-05-27 15:33:54.731028 INFO::Determining format of input files
## 2026-05-27 15:33:54.735533 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-27 15:33:54.752856 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-27 15:33:54.75582 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-27 15:33:54.759052 INFO::Filter data based on min abundance and min prevalence
## 2026-05-27 15:33:54.761675 INFO::Total samples in data: 322
## 2026-05-27 15:33:54.764511 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-27 15:33:54.768641 INFO::Total filtered features: 0
## 2026-05-27 15:33:54.771663 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-27 15:33:54.776468 INFO::Total filtered features with variance filtering: 0
## 2026-05-27 15:33:54.779398 INFO::Filtered feature names from variance filtering:
## 2026-05-27 15:33:54.782328 INFO::Running selected normalization method: NONE
## 2026-05-27 15:33:54.78526 INFO::Applying z-score to standardize continuous metadata
## 2026-05-27 15:33:54.796251 INFO::Running selected transform method: NONE
## 2026-05-27 15:33:54.79871 INFO::Running selected analysis method: LM
## 2026-05-27 15:33:54.801608 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-27 15:33:54.867892 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## 2026-05-27 15:33:54.952121 INFO::Fitting model to feature number 3, Eubacterium_hallii_group
## boundary (singular) fit: see help('isSingular')
## 2026-05-27 15:33:55.054 INFO::Fitting model to feature number 4, Ruminococcus_gnavus_group
## 2026-05-27 15:33:55.148316 INFO::Fitting model to feature number 5, Ruminococcus_torques_group
## 2026-05-27 15:33:55.24175 INFO::Fitting model to feature number 6, Actinomyces
## 2026-05-27 15:33:55.31045 INFO::Fitting model to feature number 7, Akkermansia
## 2026-05-27 15:33:55.395529 INFO::Fitting model to feature number 8, Anaerostipes
## 2026-05-27 15:33:55.462952 INFO::Fitting model to feature number 9, Bacteroides
## 2026-05-27 15:33:55.533612 INFO::Fitting model to feature number 10, Bifidobacterium
## 2026-05-27 15:33:55.599184 INFO::Fitting model to feature number 11, Blautia
## 2026-05-27 15:33:55.664498 INFO::Fitting model to feature number 12, Butyricicoccus
## 2026-05-27 15:33:55.74434 INFO::Fitting model to feature number 13, Clostridioides
## 2026-05-27 15:33:55.81101 INFO::Fitting model to feature number 14, Clostridium_sensu_stricto_1
## 2026-05-27 15:33:55.875125 INFO::Fitting model to feature number 15, Collinsella
## 2026-05-27 15:33:55.942638 INFO::Fitting model to feature number 16, Dorea
## 2026-05-27 15:33:56.009978 INFO::Fitting model to feature number 17, Eggerthella
## 2026-05-27 15:33:56.073076 INFO::Fitting model to feature number 18, Enterococcus
## 2026-05-27 15:33:56.138883 INFO::Fitting model to feature number 19, Erysipelatoclostridium
## 2026-05-27 15:33:56.210305 INFO::Fitting model to feature number 20, Faecalibacterium
## 2026-05-27 15:33:56.332966 INFO::Fitting model to feature number 21, Flavonifractor
## 2026-05-27 15:33:56.416529 INFO::Fitting model to feature number 22, Fusicatenibacter
## 2026-05-27 15:33:56.481746 INFO::Fitting model to feature number 23, Haemophilus
## 2026-05-27 15:33:56.551072 INFO::Fitting model to feature number 24, Intestinibacter
## 2026-05-27 15:33:56.619586 INFO::Fitting model to feature number 25, Lachnoclostridium
## 2026-05-27 15:33:56.683722 INFO::Fitting model to feature number 26, Lachnospira
## 2026-05-27 15:33:56.776581 INFO::Fitting model to feature number 27, Lactobacillus
## 2026-05-27 15:33:56.844135 INFO::Fitting model to feature number 28, Megasphaera
## 2026-05-27 15:33:56.911664 INFO::Fitting model to feature number 29, Parabacteroides
## 2026-05-27 15:33:56.980304 INFO::Fitting model to feature number 30, Roseburia
## 2026-05-27 15:33:57.046956 INFO::Fitting model to feature number 31, Senegalimassilia
## 2026-05-27 15:33:57.111862 INFO::Fitting model to feature number 32, Staphylococcus
## 2026-05-27 15:33:57.177023 INFO::Fitting model to feature number 33, Streptococcus
## 2026-05-27 15:33:57.242455 INFO::Fitting model to feature number 34, Subdoligranulum
## 2026-05-27 15:33:57.309399 INFO::Fitting model to feature number 35, Sutterella
## 2026-05-27 15:33:57.375573 INFO::Fitting model to feature number 36, Tyzzerella_4
## 2026-05-27 15:33:57.438974 INFO::Fitting model to feature number 37, uncultured
## 2026-05-27 15:33:57.506637 INFO::Fitting model to feature number 38, Veillonella
## 2026-05-27 15:33:57.571203 INFO::Fitting model to feature number 39, Other
## 2026-05-27 15:33:57.659347 INFO::Counting total values for each feature
## 2026-05-27 15:33:57.673911 INFO::Writing filtered data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_70000/features/filtered_data.tsv
## 2026-05-27 15:33:57.713134 INFO::Writing filtered, normalized data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_70000/features/filtered_data_norm.tsv
## 2026-05-27 15:33:57.755498 INFO::Writing filtered, normalized, transformed data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_70000/features/filtered_data_norm_transformed.tsv
## 2026-05-27 15:33:57.805361 WARNING::Deleting existing residuals file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_70000/fits/residuals.rds
## 2026-05-27 15:33:57.810508 INFO::Writing residuals to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_70000/fits/residuals.rds
## 2026-05-27 15:33:57.822351 WARNING::Deleting existing fitted file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_70000/fits/fitted.rds
## 2026-05-27 15:33:57.826466 INFO::Writing fitted values to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_70000/fits/fitted.rds
## 2026-05-27 15:33:57.838461 WARNING::Deleting existing ranef file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_70000/fits/ranef.rds
## 2026-05-27 15:33:57.842919 INFO::Writing extracted random effects to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_70000/fits/ranef.rds
## 2026-05-27 15:33:57.849245 INFO::Writing all results to file (ordered by increasing q-values): C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_70000/all_results.tsv
## 2026-05-27 15:33:57.862577 INFO::Writing the significant results (those which are less than or equal to the threshold of 0.050000 ) to file (ordered by increasing q-values): C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_70000/significant_results.tsv
## 2026-05-27 15:33:57.868791 INFO::Writing heatmap of significant results to file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_70000/heatmap.pdf
## 2026-05-27 15:33:57.985943 INFO::Writing association plots (one for each significant association) to output folder: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_70000
## 2026-05-27 15:33:57.996098 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-27 15:33:57.999523 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-27 15:33:58.008038 INFO::Creating scatter plot for continuous data, Timepoint vs Staphylococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:58.279571 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:58.686684 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:58.94401 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:59.189833 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:59.473373 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:33:59.730587 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:00.031495 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:00.484975 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:00.750519 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:01.039862 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:01.328677 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:01.62251 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:01.86478 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:02.150365 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:02.436653 INFO::Creating scatter plot for continuous data, Timepoint vs Other
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:02.71013 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:02.987841 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:03.297209 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:03.541215 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:03.791018 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:04.076793 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:04.354066 INFO::Creating scatter plot for continuous data, Timepoint vs Haemophilus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:04.646208 INFO::Creating scatter plot for continuous data, Timepoint vs Flavonifractor
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:08.610488 INFO::Plotting data for metadata number 2, SeqDepth
## 2026-05-27 15:34:08.619387 INFO::Creating scatter plot for continuous data, SeqDepth vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:08.989682 INFO::Creating scatter plot for continuous data, SeqDepth vs Subdoligranulum
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:09.318823 INFO::Creating scatter plot for continuous data, SeqDepth vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:09.633612 INFO::Creating scatter plot for continuous data, SeqDepth vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:09.98022 INFO::Creating scatter plot for continuous data, SeqDepth vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:12.39007 INFO::Plotting data for metadata number 3, ASQtime_interaction
## 2026-05-27 15:34:12.397879 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:12.787152 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Akkermansia
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:14.098248 INFO::Plotting data for metadata number 4, ASQ_slope
## 2026-05-27 15:34:14.105684 INFO::Creating scatter plot for continuous data, ASQ_slope vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:15.091246 INFO::Plotting data for metadata number 5, BW_infant
## 2026-05-27 15:34:15.097444 INFO::Creating scatter plot for continuous data, BW_infant vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:15.927802 INFO::Plotting data for metadata number 6, GA_weeks
## 2026-05-27 15:34:15.933244 INFO::Creating scatter plot for continuous data, GA_weeks vs Streptococcus
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## === Depth: 80000 ===
## 
## 92 samples removed because they contained fewer reads than `sample`.
## 
## 3664 features removed because they are not present in all samples after subsampling.
## 
## A pseudocount of 28.5 was applied.
## [1] "Warning: Deleting existing log file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_80000/maaslin2.log"
## 2026-05-27 15:34:23.919571 INFO::Writing function arguments to log file
## 2026-05-27 15:34:23.962027 INFO::Verifying options selected are valid
## 2026-05-27 15:34:23.965947 INFO::Determining format of input files
## 2026-05-27 15:34:23.971575 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-27 15:34:23.99204 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-27 15:34:23.995241 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-27 15:34:23.998505 INFO::Filter data based on min abundance and min prevalence
## 2026-05-27 15:34:24.001986 INFO::Total samples in data: 308
## 2026-05-27 15:34:24.004936 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-27 15:34:24.00924 INFO::Total filtered features: 0
## 2026-05-27 15:34:24.012503 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-27 15:34:24.018369 INFO::Total filtered features with variance filtering: 0
## 2026-05-27 15:34:24.021273 INFO::Filtered feature names from variance filtering:
## 2026-05-27 15:34:24.024105 INFO::Running selected normalization method: NONE
## 2026-05-27 15:34:24.027124 INFO::Applying z-score to standardize continuous metadata
## 2026-05-27 15:34:24.039871 INFO::Running selected transform method: NONE
## 2026-05-27 15:34:24.04273 INFO::Running selected analysis method: LM
## 2026-05-27 15:34:24.046423 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-27 15:34:24.118624 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## 2026-05-27 15:34:24.193239 INFO::Fitting model to feature number 3, Eubacterium_hallii_group
## boundary (singular) fit: see help('isSingular')
## 2026-05-27 15:34:24.270059 INFO::Fitting model to feature number 4, Ruminococcus_gnavus_group
## 2026-05-27 15:34:24.340531 INFO::Fitting model to feature number 5, Ruminococcus_torques_group
## 2026-05-27 15:34:24.408825 INFO::Fitting model to feature number 6, Actinomyces
## 2026-05-27 15:34:24.474811 INFO::Fitting model to feature number 7, Akkermansia
## 2026-05-27 15:34:24.538917 INFO::Fitting model to feature number 8, Anaerostipes
## 2026-05-27 15:34:24.606405 INFO::Fitting model to feature number 9, Bacteroides
## 2026-05-27 15:34:24.700619 INFO::Fitting model to feature number 10, Bifidobacterium
## 2026-05-27 15:34:24.766033 INFO::Fitting model to feature number 11, Blautia
## 2026-05-27 15:34:24.837715 INFO::Fitting model to feature number 12, Butyricicoccus
## 2026-05-27 15:34:24.90411 INFO::Fitting model to feature number 13, Clostridioides
## 2026-05-27 15:34:24.965905 INFO::Fitting model to feature number 14, Clostridium_sensu_stricto_1
## 2026-05-27 15:34:25.036021 INFO::Fitting model to feature number 15, Collinsella
## 2026-05-27 15:34:25.098493 INFO::Fitting model to feature number 16, Dorea
## 2026-05-27 15:34:25.16005 INFO::Fitting model to feature number 17, Eggerthella
## 2026-05-27 15:34:25.226859 INFO::Fitting model to feature number 18, Enterococcus
## 2026-05-27 15:34:25.294651 INFO::Fitting model to feature number 19, Erysipelatoclostridium
## 2026-05-27 15:34:25.393957 INFO::Fitting model to feature number 20, Faecalibacterium
## 2026-05-27 15:34:25.51357 INFO::Fitting model to feature number 21, Flavonifractor
## 2026-05-27 15:34:25.589089 INFO::Fitting model to feature number 22, Fusicatenibacter
## 2026-05-27 15:34:25.656064 INFO::Fitting model to feature number 23, Haemophilus
## 2026-05-27 15:34:25.719407 INFO::Fitting model to feature number 24, Intestinibacter
## 2026-05-27 15:34:25.784592 INFO::Fitting model to feature number 25, Lachnoclostridium
## 2026-05-27 15:34:25.851567 INFO::Fitting model to feature number 26, Lachnospira
## 2026-05-27 15:34:25.91968 INFO::Fitting model to feature number 27, Lactobacillus
## 2026-05-27 15:34:25.984206 INFO::Fitting model to feature number 28, Megasphaera
## 2026-05-27 15:34:26.074835 INFO::Fitting model to feature number 29, Parabacteroides
## 2026-05-27 15:34:26.142361 INFO::Fitting model to feature number 30, Roseburia
## 2026-05-27 15:34:26.209607 INFO::Fitting model to feature number 31, Senegalimassilia
## 2026-05-27 15:34:26.282337 INFO::Fitting model to feature number 32, Streptococcus
## 2026-05-27 15:34:26.348024 INFO::Fitting model to feature number 33, Subdoligranulum
## 2026-05-27 15:34:26.412259 INFO::Fitting model to feature number 34, Sutterella
## 2026-05-27 15:34:26.484494 INFO::Fitting model to feature number 35, Tyzzerella_4
## 2026-05-27 15:34:26.549178 INFO::Fitting model to feature number 36, uncultured
## 2026-05-27 15:34:26.617745 INFO::Fitting model to feature number 37, Veillonella
## 2026-05-27 15:34:26.682731 INFO::Fitting model to feature number 38, Other
## 2026-05-27 15:34:26.762277 INFO::Counting total values for each feature
## 2026-05-27 15:34:26.777031 INFO::Writing filtered data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_80000/features/filtered_data.tsv
## 2026-05-27 15:34:26.816515 INFO::Writing filtered, normalized data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_80000/features/filtered_data_norm.tsv
## 2026-05-27 15:34:26.856804 INFO::Writing filtered, normalized, transformed data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_80000/features/filtered_data_norm_transformed.tsv
## 2026-05-27 15:34:26.89738 WARNING::Deleting existing residuals file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_80000/fits/residuals.rds
## 2026-05-27 15:34:26.90208 INFO::Writing residuals to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_80000/fits/residuals.rds
## 2026-05-27 15:34:26.911473 WARNING::Deleting existing fitted file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_80000/fits/fitted.rds
## 2026-05-27 15:34:26.917594 INFO::Writing fitted values to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_80000/fits/fitted.rds
## 2026-05-27 15:34:26.928343 WARNING::Deleting existing ranef file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_80000/fits/ranef.rds
## 2026-05-27 15:34:26.932964 INFO::Writing extracted random effects to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_80000/fits/ranef.rds
## 2026-05-27 15:34:26.938929 INFO::Writing all results to file (ordered by increasing q-values): C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_80000/all_results.tsv
## 2026-05-27 15:34:26.952254 INFO::Writing the significant results (those which are less than or equal to the threshold of 0.050000 ) to file (ordered by increasing q-values): C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_80000/significant_results.tsv
## 2026-05-27 15:34:26.960082 INFO::Writing heatmap of significant results to file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_80000/heatmap.pdf
## 2026-05-27 15:34:27.109206 INFO::Writing association plots (one for each significant association) to output folder: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_80000
## 2026-05-27 15:34:27.120301 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-27 15:34:27.125565 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-27 15:34:27.135913 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:27.503573 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:27.766444 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:28.070601 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:28.359032 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:28.732019 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:28.988548 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:29.263438 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:29.552419 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:29.838218 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:30.119289 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:30.398786 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:30.675678 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:30.945592 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:31.224759 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:31.498377 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:31.785033 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:32.025158 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:32.293178 INFO::Creating scatter plot for continuous data, Timepoint vs Flavonifractor
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:32.564786 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:32.899276 INFO::Creating scatter plot for continuous data, Timepoint vs Haemophilus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:33.156404 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:33.447284 INFO::Creating scatter plot for continuous data, Timepoint vs Other
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:36.855133 INFO::Plotting data for metadata number 2, SeqDepth
## 2026-05-27 15:34:36.861943 INFO::Creating scatter plot for continuous data, SeqDepth vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:37.107666 INFO::Creating scatter plot for continuous data, SeqDepth vs Subdoligranulum
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:37.441777 INFO::Creating scatter plot for continuous data, SeqDepth vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:37.799793 INFO::Creating scatter plot for continuous data, SeqDepth vs Akkermansia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:38.1891 INFO::Creating scatter plot for continuous data, SeqDepth vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:38.482957 INFO::Creating scatter plot for continuous data, SeqDepth vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:40.751606 INFO::Plotting data for metadata number 3, ASQtime_interaction
## 2026-05-27 15:34:40.758945 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:42.233465 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Akkermansia
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:43.390661 INFO::Plotting data for metadata number 4, ASQ_slope
## 2026-05-27 15:34:43.400645 INFO::Creating scatter plot for continuous data, ASQ_slope vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:43.784528 INFO::Creating scatter plot for continuous data, ASQ_slope vs Akkermansia
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:44.848631 INFO::Plotting data for metadata number 5, BW_infant
## 2026-05-27 15:34:44.857095 INFO::Creating scatter plot for continuous data, BW_infant vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:45.497454 INFO::Plotting data for metadata number 6, GA_weeks
## 2026-05-27 15:34:45.503457 INFO::Creating scatter plot for continuous data, GA_weeks vs Streptococcus
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## === Depth: 90000 ===
## 
## 101 samples removed because they contained fewer reads than `sample`.
## 
## 3696 features removed because they are not present in all samples after subsampling.
## 
## A pseudocount of 40 was applied.
## [1] "Warning: Deleting existing log file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_90000/maaslin2.log"
## 2026-05-27 15:34:53.720074 INFO::Writing function arguments to log file
## 2026-05-27 15:34:53.762511 INFO::Verifying options selected are valid
## 2026-05-27 15:34:53.765742 INFO::Determining format of input files
## 2026-05-27 15:34:53.769738 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-27 15:34:53.785964 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-27 15:34:53.788746 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-27 15:34:53.791603 INFO::Filter data based on min abundance and min prevalence
## 2026-05-27 15:34:53.79454 INFO::Total samples in data: 299
## 2026-05-27 15:34:53.797413 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-27 15:34:53.801035 INFO::Total filtered features: 0
## 2026-05-27 15:34:53.803732 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-27 15:34:53.808252 INFO::Total filtered features with variance filtering: 0
## 2026-05-27 15:34:53.811402 INFO::Filtered feature names from variance filtering:
## 2026-05-27 15:34:53.814793 INFO::Running selected normalization method: NONE
## 2026-05-27 15:34:53.81754 INFO::Applying z-score to standardize continuous metadata
## 2026-05-27 15:34:53.829205 INFO::Running selected transform method: NONE
## 2026-05-27 15:34:53.832124 INFO::Running selected analysis method: LM
## 2026-05-27 15:34:53.83546 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-27 15:34:53.900081 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## 2026-05-27 15:34:53.96538 INFO::Fitting model to feature number 3, Eubacterium_hallii_group
## boundary (singular) fit: see help('isSingular')
## 2026-05-27 15:34:54.076145 INFO::Fitting model to feature number 4, Ruminococcus_gnavus_group
## 2026-05-27 15:34:54.187047 INFO::Fitting model to feature number 5, Ruminococcus_torques_group
## 2026-05-27 15:34:54.283795 INFO::Fitting model to feature number 6, Actinomyces
## 2026-05-27 15:34:54.37023 INFO::Fitting model to feature number 7, Akkermansia
## 2026-05-27 15:34:54.439224 INFO::Fitting model to feature number 8, Anaerostipes
## 2026-05-27 15:34:54.50681 INFO::Fitting model to feature number 9, Bacteroides
## 2026-05-27 15:34:54.591316 INFO::Fitting model to feature number 10, Bifidobacterium
## 2026-05-27 15:34:54.719223 INFO::Fitting model to feature number 11, Blautia
## 2026-05-27 15:34:54.789072 INFO::Fitting model to feature number 12, Butyricicoccus
## 2026-05-27 15:34:54.855314 INFO::Fitting model to feature number 13, Clostridioides
## 2026-05-27 15:34:54.933334 INFO::Fitting model to feature number 14, Clostridium_sensu_stricto_1
## 2026-05-27 15:34:54.998105 INFO::Fitting model to feature number 15, Collinsella
## 2026-05-27 15:34:55.061712 INFO::Fitting model to feature number 16, Dorea
## 2026-05-27 15:34:55.123523 INFO::Fitting model to feature number 17, Eggerthella
## 2026-05-27 15:34:55.186008 INFO::Fitting model to feature number 18, Enterococcus
## 2026-05-27 15:34:55.251865 INFO::Fitting model to feature number 19, Erysipelatoclostridium
## 2026-05-27 15:34:55.315768 INFO::Fitting model to feature number 20, Faecalibacterium
## 2026-05-27 15:34:55.381102 INFO::Fitting model to feature number 21, Flavonifractor
## 2026-05-27 15:34:55.44516 INFO::Fitting model to feature number 22, Fusicatenibacter
## 2026-05-27 15:34:55.510828 INFO::Fitting model to feature number 23, Haemophilus
## 2026-05-27 15:34:55.581088 INFO::Fitting model to feature number 24, Intestinibacter
## 2026-05-27 15:34:55.643403 INFO::Fitting model to feature number 25, Lachnoclostridium
## 2026-05-27 15:34:55.71048 INFO::Fitting model to feature number 26, Lachnospira
## 2026-05-27 15:34:55.776949 INFO::Fitting model to feature number 27, Lactobacillus
## 2026-05-27 15:34:55.84212 INFO::Fitting model to feature number 28, Megasphaera
## 2026-05-27 15:34:55.905778 INFO::Fitting model to feature number 29, Parabacteroides
## 2026-05-27 15:34:55.969382 INFO::Fitting model to feature number 30, Roseburia
## 2026-05-27 15:34:56.033141 INFO::Fitting model to feature number 31, Senegalimassilia
## 2026-05-27 15:34:56.096745 INFO::Fitting model to feature number 32, Streptococcus
## 2026-05-27 15:34:56.173108 INFO::Fitting model to feature number 33, Subdoligranulum
## 2026-05-27 15:34:56.237383 INFO::Fitting model to feature number 34, Sutterella
## 2026-05-27 15:34:56.302905 INFO::Fitting model to feature number 35, Tyzzerella_4
## 2026-05-27 15:34:56.367137 INFO::Fitting model to feature number 36, uncultured
## 2026-05-27 15:34:56.430735 INFO::Fitting model to feature number 37, Veillonella
## 2026-05-27 15:34:56.497516 INFO::Fitting model to feature number 38, Other
## 2026-05-27 15:34:56.579895 INFO::Counting total values for each feature
## 2026-05-27 15:34:56.594135 INFO::Writing filtered data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_90000/features/filtered_data.tsv
## 2026-05-27 15:34:56.631153 INFO::Writing filtered, normalized data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_90000/features/filtered_data_norm.tsv
## 2026-05-27 15:34:56.667211 INFO::Writing filtered, normalized, transformed data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_90000/features/filtered_data_norm_transformed.tsv
## 2026-05-27 15:34:56.703381 WARNING::Deleting existing residuals file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_90000/fits/residuals.rds
## 2026-05-27 15:34:56.707013 INFO::Writing residuals to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_90000/fits/residuals.rds
## 2026-05-27 15:34:56.717542 WARNING::Deleting existing fitted file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_90000/fits/fitted.rds
## 2026-05-27 15:34:56.721421 INFO::Writing fitted values to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_90000/fits/fitted.rds
## 2026-05-27 15:34:56.731895 WARNING::Deleting existing ranef file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_90000/fits/ranef.rds
## 2026-05-27 15:34:56.736618 INFO::Writing extracted random effects to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_90000/fits/ranef.rds
## 2026-05-27 15:34:56.743322 INFO::Writing all results to file (ordered by increasing q-values): C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_90000/all_results.tsv
## 2026-05-27 15:34:56.755278 INFO::Writing the significant results (those which are less than or equal to the threshold of 0.050000 ) to file (ordered by increasing q-values): C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_90000/significant_results.tsv
## 2026-05-27 15:34:56.762371 INFO::Writing heatmap of significant results to file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_90000/heatmap.pdf
## 2026-05-27 15:34:56.858175 INFO::Writing association plots (one for each significant association) to output folder: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_90000
## 2026-05-27 15:34:56.866371 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-27 15:34:56.86957 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-27 15:34:56.876206 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:57.129892 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:57.434241 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:57.801241 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:58.100481 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:58.382588 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:58.678078 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:58.992893 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:59.235523 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:34:59.68621 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:00.027133 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:00.300824 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:00.560154 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:00.818801 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:01.103077 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:01.435298 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:01.745899 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:02.059594 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:02.445379 INFO::Creating scatter plot for continuous data, Timepoint vs Flavonifractor
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:02.79365 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:03.094849 INFO::Creating scatter plot for continuous data, Timepoint vs Haemophilus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:03.407479 INFO::Creating scatter plot for continuous data, Timepoint vs Other
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:07.66722 INFO::Plotting data for metadata number 2, SeqDepth
## 2026-05-27 15:35:07.673229 INFO::Creating scatter plot for continuous data, SeqDepth vs Subdoligranulum
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:07.914095 INFO::Creating scatter plot for continuous data, SeqDepth vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:08.195744 INFO::Creating scatter plot for continuous data, SeqDepth vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:08.497643 INFO::Creating scatter plot for continuous data, SeqDepth vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:10.162127 INFO::Plotting data for metadata number 3, ASQtime_interaction
## 2026-05-27 15:35:10.17307 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:10.642807 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Akkermansia
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:11.768395 INFO::Plotting data for metadata number 4, ASQ_slope
## 2026-05-27 15:35:11.77444 INFO::Creating scatter plot for continuous data, ASQ_slope vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:12.548251 INFO::Plotting data for metadata number 5, BW_infant
## 2026-05-27 15:35:12.554621 INFO::Creating scatter plot for continuous data, BW_infant vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:13.391083 INFO::Plotting data for metadata number 6, GA_weeks
## 2026-05-27 15:35:13.396921 INFO::Creating scatter plot for continuous data, GA_weeks vs Streptococcus
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## === Depth: 100000 ===
## 
## 115 samples removed because they contained fewer reads than `sample`.
## 
## 3765 features removed because they are not present in all samples after subsampling.
## 
## A pseudocount of 44.5 was applied.
## [1] "Warning: Deleting existing log file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_100000/maaslin2.log"
## 2026-05-27 15:35:22.54481 INFO::Writing function arguments to log file
## 2026-05-27 15:35:22.589028 INFO::Verifying options selected are valid
## 2026-05-27 15:35:22.592023 INFO::Determining format of input files
## 2026-05-27 15:35:22.596173 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-27 15:35:22.618081 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-27 15:35:22.620954 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-27 15:35:22.626082 INFO::Filter data based on min abundance and min prevalence
## 2026-05-27 15:35:22.630018 INFO::Total samples in data: 285
## 2026-05-27 15:35:22.633906 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-27 15:35:22.639581 INFO::Total filtered features: 0
## 2026-05-27 15:35:22.644259 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-27 15:35:22.649442 INFO::Total filtered features with variance filtering: 0
## 2026-05-27 15:35:22.652252 INFO::Filtered feature names from variance filtering:
## 2026-05-27 15:35:22.655438 INFO::Running selected normalization method: NONE
## 2026-05-27 15:35:22.65999 INFO::Applying z-score to standardize continuous metadata
## 2026-05-27 15:35:22.673477 INFO::Running selected transform method: NONE
## 2026-05-27 15:35:22.676087 INFO::Running selected analysis method: LM
## 2026-05-27 15:35:22.679898 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-27 15:35:22.749223 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## boundary (singular) fit: see help('isSingular')
## 2026-05-27 15:35:22.814806 INFO::Fitting model to feature number 3, Ruminococcus_gnavus_group
## 2026-05-27 15:35:22.879805 INFO::Fitting model to feature number 4, Ruminococcus_torques_group
## 2026-05-27 15:35:22.945536 INFO::Fitting model to feature number 5, Actinomyces
## 2026-05-27 15:35:23.017946 INFO::Fitting model to feature number 6, Akkermansia
## 2026-05-27 15:35:23.080631 INFO::Fitting model to feature number 7, Anaerostipes
## 2026-05-27 15:35:23.144456 INFO::Fitting model to feature number 8, Bacteroides
## 2026-05-27 15:35:23.226416 INFO::Fitting model to feature number 9, Bifidobacterium
## 2026-05-27 15:35:23.292192 INFO::Fitting model to feature number 10, Blautia
## 2026-05-27 15:35:23.365266 INFO::Fitting model to feature number 11, Butyricicoccus
## 2026-05-27 15:35:23.427994 INFO::Fitting model to feature number 12, Clostridioides
## 2026-05-27 15:35:23.492594 INFO::Fitting model to feature number 13, Clostridium_sensu_stricto_1
## 2026-05-27 15:35:23.555732 INFO::Fitting model to feature number 14, Collinsella
## 2026-05-27 15:35:23.620765 INFO::Fitting model to feature number 15, Dorea
## 2026-05-27 15:35:23.697439 INFO::Fitting model to feature number 16, Eggerthella
## 2026-05-27 15:35:23.812501 INFO::Fitting model to feature number 17, Enterococcus
## 2026-05-27 15:35:23.889712 INFO::Fitting model to feature number 18, Erysipelatoclostridium
## 2026-05-27 15:35:23.958786 INFO::Fitting model to feature number 19, Faecalibacterium
## 2026-05-27 15:35:24.026451 INFO::Fitting model to feature number 20, Flavonifractor
## 2026-05-27 15:35:24.090817 INFO::Fitting model to feature number 21, Fusicatenibacter
## 2026-05-27 15:35:24.15793 INFO::Fitting model to feature number 22, Haemophilus
## 2026-05-27 15:35:24.219406 INFO::Fitting model to feature number 23, Intestinibacter
## 2026-05-27 15:35:24.290926 INFO::Fitting model to feature number 24, Lachnoclostridium
## 2026-05-27 15:35:24.354887 INFO::Fitting model to feature number 25, Lachnospira
## 2026-05-27 15:35:24.41676 INFO::Fitting model to feature number 26, Lachnospiraceae_UCG.004
## 2026-05-27 15:35:24.483343 INFO::Fitting model to feature number 27, Lactobacillus
## 2026-05-27 15:35:24.5618 INFO::Fitting model to feature number 28, Megasphaera
## 2026-05-27 15:35:24.624629 INFO::Fitting model to feature number 29, Parabacteroides
## 2026-05-27 15:35:24.691313 INFO::Fitting model to feature number 30, Roseburia
## 2026-05-27 15:35:24.755973 INFO::Fitting model to feature number 31, Senegalimassilia
## 2026-05-27 15:35:24.82198 INFO::Fitting model to feature number 32, Staphylococcus
## 2026-05-27 15:35:24.88602 INFO::Fitting model to feature number 33, Streptococcus
## 2026-05-27 15:35:24.949277 INFO::Fitting model to feature number 34, Subdoligranulum
## 2026-05-27 15:35:25.013242 INFO::Fitting model to feature number 35, Sutterella
## 2026-05-27 15:35:25.079068 INFO::Fitting model to feature number 36, Tyzzerella_4
## 2026-05-27 15:35:25.141814 INFO::Fitting model to feature number 37, uncultured
## 2026-05-27 15:35:25.206344 INFO::Fitting model to feature number 38, Veillonella
## 2026-05-27 15:35:25.269677 INFO::Fitting model to feature number 39, Other
## 2026-05-27 15:35:25.34851 INFO::Counting total values for each feature
## 2026-05-27 15:35:25.362792 INFO::Writing filtered data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_100000/features/filtered_data.tsv
## 2026-05-27 15:35:25.398431 INFO::Writing filtered, normalized data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_100000/features/filtered_data_norm.tsv
## 2026-05-27 15:35:25.435 INFO::Writing filtered, normalized, transformed data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_100000/features/filtered_data_norm_transformed.tsv
## 2026-05-27 15:35:25.481352 WARNING::Deleting existing residuals file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_100000/fits/residuals.rds
## 2026-05-27 15:35:25.485647 INFO::Writing residuals to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_100000/fits/residuals.rds
## 2026-05-27 15:35:25.498965 WARNING::Deleting existing fitted file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_100000/fits/fitted.rds
## 2026-05-27 15:35:25.503789 INFO::Writing fitted values to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_100000/fits/fitted.rds
## 2026-05-27 15:35:25.514855 WARNING::Deleting existing ranef file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_100000/fits/ranef.rds
## 2026-05-27 15:35:25.519865 INFO::Writing extracted random effects to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_100000/fits/ranef.rds
## 2026-05-27 15:35:25.52733 INFO::Writing all results to file (ordered by increasing q-values): C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_100000/all_results.tsv
## 2026-05-27 15:35:25.539196 INFO::Writing the significant results (those which are less than or equal to the threshold of 0.050000 ) to file (ordered by increasing q-values): C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_100000/significant_results.tsv
## 2026-05-27 15:35:25.545688 INFO::Writing heatmap of significant results to file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_100000/heatmap.pdf
## 2026-05-27 15:35:25.642957 INFO::Writing association plots (one for each significant association) to output folder: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_100000
## 2026-05-27 15:35:25.651223 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-27 15:35:25.655507 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-27 15:35:25.662082 INFO::Creating scatter plot for continuous data, Timepoint vs Staphylococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:25.891247 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:26.262767 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:26.642505 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:26.945227 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:27.303291 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:27.577032 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:27.875481 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:28.122631 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:28.396697 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:28.644518 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:28.903175 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:29.156541 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:29.453319 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:29.733846 INFO::Creating scatter plot for continuous data, Timepoint vs Other
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:30.020092 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:30.303192 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:30.59347 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:30.902409 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:31.176628 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:31.47469 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:31.806766 INFO::Creating scatter plot for continuous data, Timepoint vs Flavonifractor
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:35.800917 INFO::Plotting data for metadata number 2, SeqDepth
## 2026-05-27 15:35:35.80934 INFO::Creating scatter plot for continuous data, SeqDepth vs Subdoligranulum
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:36.163976 INFO::Creating scatter plot for continuous data, SeqDepth vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:36.684569 INFO::Creating scatter plot for continuous data, SeqDepth vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:37.063894 INFO::Creating scatter plot for continuous data, SeqDepth vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:37.547988 INFO::Creating scatter plot for continuous data, SeqDepth vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:39.855541 INFO::Plotting data for metadata number 3, ASQtime_interaction
## 2026-05-27 15:35:39.861563 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:40.174369 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Akkermansia
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:41.36859 INFO::Plotting data for metadata number 4, ASQ_slope
## 2026-05-27 15:35:41.375513 INFO::Creating scatter plot for continuous data, ASQ_slope vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:42.240218 INFO::Plotting data for metadata number 5, BW_infant
## 2026-05-27 15:35:42.247036 INFO::Creating scatter plot for continuous data, BW_infant vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## === Depth: 110000 ===
## 
## 129 samples removed because they contained fewer reads than `sample`.
## 
## 3843 features removed because they are not present in all samples after subsampling.
## 
## A pseudocount of 48.5 was applied.
## [1] "Warning: Deleting existing log file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_110000/maaslin2.log"
## 2026-05-27 15:35:51.162841 INFO::Writing function arguments to log file
## 2026-05-27 15:35:51.20629 INFO::Verifying options selected are valid
## 2026-05-27 15:35:51.210911 INFO::Determining format of input files
## 2026-05-27 15:35:51.215554 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-27 15:35:51.233595 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-27 15:35:51.236774 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-27 15:35:51.239739 INFO::Filter data based on min abundance and min prevalence
## 2026-05-27 15:35:51.242657 INFO::Total samples in data: 271
## 2026-05-27 15:35:51.245652 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-27 15:35:51.250592 INFO::Total filtered features: 0
## 2026-05-27 15:35:51.253674 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-27 15:35:51.258385 INFO::Total filtered features with variance filtering: 0
## 2026-05-27 15:35:51.261153 INFO::Filtered feature names from variance filtering:
## 2026-05-27 15:35:51.263707 INFO::Running selected normalization method: NONE
## 2026-05-27 15:35:51.266926 INFO::Applying z-score to standardize continuous metadata
## 2026-05-27 15:35:51.278489 INFO::Running selected transform method: NONE
## 2026-05-27 15:35:51.281449 INFO::Running selected analysis method: LM
## 2026-05-27 15:35:51.285995 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-27 15:35:51.357323 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## boundary (singular) fit: see help('isSingular')
## 2026-05-27 15:35:51.43225 INFO::Fitting model to feature number 3, Ruminococcus_gnavus_group
## 2026-05-27 15:35:51.503445 INFO::Fitting model to feature number 4, Ruminococcus_torques_group
## 2026-05-27 15:35:51.571656 INFO::Fitting model to feature number 5, Actinomyces
## 2026-05-27 15:35:51.642443 INFO::Fitting model to feature number 6, Akkermansia
## 2026-05-27 15:35:51.712375 INFO::Fitting model to feature number 7, Anaerostipes
## 2026-05-27 15:35:51.786201 INFO::Fitting model to feature number 8, Bacteroides
## 2026-05-27 15:35:51.875364 INFO::Fitting model to feature number 9, Bifidobacterium
## 2026-05-27 15:35:51.945399 INFO::Fitting model to feature number 10, Blautia
## 2026-05-27 15:35:52.012667 INFO::Fitting model to feature number 11, Butyricicoccus
## 2026-05-27 15:35:52.084518 INFO::Fitting model to feature number 12, Clostridioides
## 2026-05-27 15:35:52.161141 INFO::Fitting model to feature number 13, Clostridium_sensu_stricto_1
## 2026-05-27 15:35:52.263478 INFO::Fitting model to feature number 14, Collinsella
## 2026-05-27 15:35:52.395475 INFO::Fitting model to feature number 15, Dorea
## 2026-05-27 15:35:52.468605 INFO::Fitting model to feature number 16, Eggerthella
## 2026-05-27 15:35:52.54034 INFO::Fitting model to feature number 17, Enterococcus
## 2026-05-27 15:35:52.613475 INFO::Fitting model to feature number 18, Erysipelatoclostridium
## 2026-05-27 15:35:52.686553 INFO::Fitting model to feature number 19, Faecalibacterium
## 2026-05-27 15:35:52.757242 INFO::Fitting model to feature number 20, Flavonifractor
## 2026-05-27 15:35:52.827154 INFO::Fitting model to feature number 21, Fusicatenibacter
## 2026-05-27 15:35:52.897415 INFO::Fitting model to feature number 22, Haemophilus
## 2026-05-27 15:35:52.965305 INFO::Fitting model to feature number 23, Intestinibacter
## 2026-05-27 15:35:53.03964 INFO::Fitting model to feature number 24, Lachnoclostridium
## 2026-05-27 15:35:53.117903 INFO::Fitting model to feature number 25, Lachnospira
## 2026-05-27 15:35:53.187588 INFO::Fitting model to feature number 26, Lachnospiraceae_UCG.004
## 2026-05-27 15:35:53.259162 INFO::Fitting model to feature number 27, Lactobacillus
## 2026-05-27 15:35:53.374225 INFO::Fitting model to feature number 28, Megasphaera
## 2026-05-27 15:35:53.507615 INFO::Fitting model to feature number 29, Parabacteroides
## 2026-05-27 15:35:53.62086 INFO::Fitting model to feature number 30, Roseburia
## boundary (singular) fit: see help('isSingular')
## 2026-05-27 15:35:53.722532 INFO::Fitting model to feature number 31, Senegalimassilia
## 2026-05-27 15:35:53.793142 INFO::Fitting model to feature number 32, Staphylococcus
## 2026-05-27 15:35:53.862299 INFO::Fitting model to feature number 33, Streptococcus
## 2026-05-27 15:35:53.932566 INFO::Fitting model to feature number 34, Subdoligranulum
## 2026-05-27 15:35:54.006274 INFO::Fitting model to feature number 35, Sutterella
## 2026-05-27 15:35:54.075718 INFO::Fitting model to feature number 36, Tyzzerella_4
## 2026-05-27 15:35:54.143874 INFO::Fitting model to feature number 37, uncultured
## 2026-05-27 15:35:54.208445 INFO::Fitting model to feature number 38, Veillonella
## 2026-05-27 15:35:54.274143 INFO::Fitting model to feature number 39, Other
## 2026-05-27 15:35:54.357143 INFO::Counting total values for each feature
## 2026-05-27 15:35:54.372768 INFO::Writing filtered data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_110000/features/filtered_data.tsv
## 2026-05-27 15:35:54.406589 INFO::Writing filtered, normalized data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_110000/features/filtered_data_norm.tsv
## 2026-05-27 15:35:54.444959 INFO::Writing filtered, normalized, transformed data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_110000/features/filtered_data_norm_transformed.tsv
## 2026-05-27 15:35:54.485097 WARNING::Deleting existing residuals file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_110000/fits/residuals.rds
## 2026-05-27 15:35:54.489962 INFO::Writing residuals to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_110000/fits/residuals.rds
## 2026-05-27 15:35:54.503816 WARNING::Deleting existing fitted file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_110000/fits/fitted.rds
## 2026-05-27 15:35:54.50915 INFO::Writing fitted values to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_110000/fits/fitted.rds
## 2026-05-27 15:35:54.52129 WARNING::Deleting existing ranef file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_110000/fits/ranef.rds
## 2026-05-27 15:35:54.526258 INFO::Writing extracted random effects to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_110000/fits/ranef.rds
## 2026-05-27 15:35:54.53321 INFO::Writing all results to file (ordered by increasing q-values): C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_110000/all_results.tsv
## 2026-05-27 15:35:54.547078 INFO::Writing the significant results (those which are less than or equal to the threshold of 0.050000 ) to file (ordered by increasing q-values): C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_110000/significant_results.tsv
## 2026-05-27 15:35:54.554448 INFO::Writing heatmap of significant results to file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_110000/heatmap.pdf
## 2026-05-27 15:35:54.660077 INFO::Writing association plots (one for each significant association) to output folder: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_110000
## 2026-05-27 15:35:54.668864 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-27 15:35:54.672024 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-27 15:35:54.678295 INFO::Creating scatter plot for continuous data, Timepoint vs Staphylococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:54.946598 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:55.360213 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:55.706302 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:56.057431 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:56.387087 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:56.715556 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:57.085224 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:57.38643 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:57.67684 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:57.977608 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:58.274367 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:58.5912 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:59.013596 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:59.3731 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:35:59.695206 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:00.013897 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:00.273103 INFO::Creating scatter plot for continuous data, Timepoint vs Other
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:00.591447 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:00.883025 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:01.185334 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:01.475068 INFO::Creating scatter plot for continuous data, Timepoint vs Flavonifractor
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:05.170268 INFO::Plotting data for metadata number 2, SeqDepth
## 2026-05-27 15:36:05.177967 INFO::Creating scatter plot for continuous data, SeqDepth vs Subdoligranulum
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:05.450515 INFO::Creating scatter plot for continuous data, SeqDepth vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:06.490368 INFO::Plotting data for metadata number 3, ASQtime_interaction
## 2026-05-27 15:36:06.497479 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:06.74373 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Akkermansia
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:07.784815 INFO::Plotting data for metadata number 4, BW_infant
## 2026-05-27 15:36:07.791258 INFO::Creating scatter plot for continuous data, BW_infant vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:08.374807 INFO::Plotting data for metadata number 5, ASQ_slope
## 2026-05-27 15:36:08.380568 INFO::Creating scatter plot for continuous data, ASQ_slope vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## === Depth: 120000 ===
## 
## 142 samples removed because they contained fewer reads than `sample`.
## 
## 3899 features removed because they are not present in all samples after subsampling.
## 
## A pseudocount of 54.5 was applied.
## [1] "Warning: Deleting existing log file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_120000/maaslin2.log"
## 2026-05-27 15:36:17.183733 INFO::Writing function arguments to log file
## 2026-05-27 15:36:17.224068 INFO::Verifying options selected are valid
## 2026-05-27 15:36:17.227557 INFO::Determining format of input files
## 2026-05-27 15:36:17.232376 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-27 15:36:17.2486 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-27 15:36:17.251804 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-27 15:36:17.25567 INFO::Filter data based on min abundance and min prevalence
## 2026-05-27 15:36:17.258612 INFO::Total samples in data: 258
## 2026-05-27 15:36:17.261867 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-27 15:36:17.267802 INFO::Total filtered features: 0
## 2026-05-27 15:36:17.27083 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-27 15:36:17.275774 INFO::Total filtered features with variance filtering: 0
## 2026-05-27 15:36:17.279142 INFO::Filtered feature names from variance filtering:
## 2026-05-27 15:36:17.290749 INFO::Running selected normalization method: NONE
## 2026-05-27 15:36:17.293788 INFO::Applying z-score to standardize continuous metadata
## 2026-05-27 15:36:17.306358 INFO::Running selected transform method: NONE
## 2026-05-27 15:36:17.309106 INFO::Running selected analysis method: LM
## 2026-05-27 15:36:17.312261 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-27 15:36:17.378004 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## boundary (singular) fit: see help('isSingular')
## 2026-05-27 15:36:17.443806 INFO::Fitting model to feature number 3, Ruminococcus_gnavus_group
## 2026-05-27 15:36:17.508405 INFO::Fitting model to feature number 4, Ruminococcus_torques_group
## 2026-05-27 15:36:17.578431 INFO::Fitting model to feature number 5, Actinomyces
## 2026-05-27 15:36:17.658277 INFO::Fitting model to feature number 6, Akkermansia
## 2026-05-27 15:36:17.722704 INFO::Fitting model to feature number 7, Anaerostipes
## 2026-05-27 15:36:17.787411 INFO::Fitting model to feature number 8, Bacteroides
## 2026-05-27 15:36:17.862817 INFO::Fitting model to feature number 9, Bifidobacterium
## 2026-05-27 15:36:17.928987 INFO::Fitting model to feature number 10, Blautia
## 2026-05-27 15:36:17.994616 INFO::Fitting model to feature number 11, Butyricicoccus
## 2026-05-27 15:36:18.0576 INFO::Fitting model to feature number 12, Clostridioides
## 2026-05-27 15:36:18.120227 INFO::Fitting model to feature number 13, Clostridium_sensu_stricto_1
## 2026-05-27 15:36:18.182496 INFO::Fitting model to feature number 14, Collinsella
## 2026-05-27 15:36:18.255586 INFO::Fitting model to feature number 15, Dorea
## 2026-05-27 15:36:18.323194 INFO::Fitting model to feature number 16, Eggerthella
## 2026-05-27 15:36:18.386712 INFO::Fitting model to feature number 17, Enterococcus
## 2026-05-27 15:36:18.452119 INFO::Fitting model to feature number 18, Erysipelatoclostridium
## 2026-05-27 15:36:18.519209 INFO::Fitting model to feature number 19, Faecalibacterium
## 2026-05-27 15:36:18.580597 INFO::Fitting model to feature number 20, Flavonifractor
## 2026-05-27 15:36:18.645915 INFO::Fitting model to feature number 21, Fusicatenibacter
## 2026-05-27 15:36:18.711618 INFO::Fitting model to feature number 22, Haemophilus
## 2026-05-27 15:36:18.820131 INFO::Fitting model to feature number 23, Intestinibacter
## 2026-05-27 15:36:18.921875 INFO::Fitting model to feature number 24, Lachnoclostridium
## 2026-05-27 15:36:18.989165 INFO::Fitting model to feature number 25, Lachnospira
## 2026-05-27 15:36:19.054929 INFO::Fitting model to feature number 26, Lachnospiraceae_UCG.004
## 2026-05-27 15:36:19.118533 INFO::Fitting model to feature number 27, Lactobacillus
## 2026-05-27 15:36:19.195669 INFO::Fitting model to feature number 28, Megasphaera
## 2026-05-27 15:36:19.264181 INFO::Fitting model to feature number 29, Parabacteroides
## 2026-05-27 15:36:19.334563 INFO::Fitting model to feature number 30, Roseburia
## boundary (singular) fit: see help('isSingular')
## 2026-05-27 15:36:19.397763 INFO::Fitting model to feature number 31, Senegalimassilia
## 2026-05-27 15:36:19.464551 INFO::Fitting model to feature number 32, Staphylococcus
## 2026-05-27 15:36:19.526561 INFO::Fitting model to feature number 33, Streptococcus
## 2026-05-27 15:36:19.59304 INFO::Fitting model to feature number 34, Subdoligranulum
## 2026-05-27 15:36:19.660808 INFO::Fitting model to feature number 35, Sutterella
## 2026-05-27 15:36:19.722984 INFO::Fitting model to feature number 36, Tyzzerella_4
## 2026-05-27 15:36:19.789088 INFO::Fitting model to feature number 37, uncultured
## 2026-05-27 15:36:19.851521 INFO::Fitting model to feature number 38, Veillonella
## 2026-05-27 15:36:19.914373 INFO::Fitting model to feature number 39, Other
## 2026-05-27 15:36:19.992493 INFO::Counting total values for each feature
## 2026-05-27 15:36:20.008458 INFO::Writing filtered data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_120000/features/filtered_data.tsv
## 2026-05-27 15:36:20.045805 INFO::Writing filtered, normalized data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_120000/features/filtered_data_norm.tsv
## 2026-05-27 15:36:20.104752 INFO::Writing filtered, normalized, transformed data to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_120000/features/filtered_data_norm_transformed.tsv
## 2026-05-27 15:36:20.198739 WARNING::Deleting existing residuals file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_120000/fits/residuals.rds
## 2026-05-27 15:36:20.20755 INFO::Writing residuals to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_120000/fits/residuals.rds
## 2026-05-27 15:36:20.224199 WARNING::Deleting existing fitted file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_120000/fits/fitted.rds
## 2026-05-27 15:36:20.233347 INFO::Writing fitted values to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_120000/fits/fitted.rds
## 2026-05-27 15:36:20.263788 WARNING::Deleting existing ranef file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_120000/fits/ranef.rds
## 2026-05-27 15:36:20.272028 INFO::Writing extracted random effects to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_120000/fits/ranef.rds
## 2026-05-27 15:36:20.322754 INFO::Writing all results to file (ordered by increasing q-values): C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_120000/all_results.tsv
## 2026-05-27 15:36:20.361558 INFO::Writing the significant results (those which are less than or equal to the threshold of 0.050000 ) to file (ordered by increasing q-values): C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_120000/significant_results.tsv
## 2026-05-27 15:36:20.385426 INFO::Writing heatmap of significant results to file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_120000/heatmap.pdf
## 2026-05-27 15:36:20.630257 INFO::Writing association plots (one for each significant association) to output folder: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_120000
## 2026-05-27 15:36:20.643272 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-27 15:36:20.64845 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-27 15:36:20.657794 INFO::Creating scatter plot for continuous data, Timepoint vs Staphylococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:21.109 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:21.470258 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:21.712078 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:21.966134 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:22.424051 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:22.718388 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:23.030576 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:23.324118 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:23.611374 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:23.895205 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:24.182084 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:24.447482 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:24.787651 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:25.051135 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:25.354483 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:25.697507 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:26.006379 INFO::Creating scatter plot for continuous data, Timepoint vs Other
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:26.465919 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:26.875892 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:27.128256 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:27.376258 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridium_innocuum_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:27.656602 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:27.954647 INFO::Creating scatter plot for continuous data, Timepoint vs Flavonifractor
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:28.196426 INFO::Creating scatter plot for continuous data, Timepoint vs Tyzzerella_4
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:31.485933 INFO::Plotting data for metadata number 2, SeqDepth
## 2026-05-27 15:36:31.495922 INFO::Creating scatter plot for continuous data, SeqDepth vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:31.775306 INFO::Creating scatter plot for continuous data, SeqDepth vs Subdoligranulum
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:32.071839 INFO::Creating scatter plot for continuous data, SeqDepth vs Akkermansia
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:33.379614 INFO::Plotting data for metadata number 3, ASQtime_interaction
## 2026-05-27 15:36:33.38577 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Akkermansia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:33.667335 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:34.677558 INFO::Plotting data for metadata number 4, BW_infant
## 2026-05-27 15:36:34.683707 INFO::Creating scatter plot for continuous data, BW_infant vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:35.337602 INFO::Plotting data for metadata number 5, ASQ_slope
## 2026-05-27 15:36:35.343346 INFO::Creating scatter plot for continuous data, ASQ_slope vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-27 15:36:35.68115 INFO::Creating scatter plot for continuous data, ASQ_slope vs Akkermansia
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
results_by_depth
## $depth_10000
## $depth_10000$n_participants
## [1] 81
## 
## $depth_10000$n_timepointsperparticipant
## [1] 80
## 
## $depth_10000$eggerthella
## # A tibble: 1 × 9
##   feature     metadata          value  coef stderr     N N.not.0    pval    qval
##   <chr>       <chr>             <chr> <dbl>  <dbl> <dbl>   <dbl>   <dbl>   <dbl>
## 1 Eggerthella ASQtime_interact… ASQt… 0.413  0.120   383      91 6.60e-4 0.00809
## 
## $depth_10000$bifidobacterium
## # A tibble: 1 × 9
##   feature         metadata  value       coef stderr     N N.not.0    pval   qval
##   <chr>           <chr>     <chr>      <dbl>  <dbl> <dbl>   <dbl>   <dbl>  <dbl>
## 1 Bifidobacterium ASQ_slope ASQ_slope -0.585  0.182   383     371 0.00142 0.0166
## 
## 
## $depth_20000
## $depth_20000$n_participants
## [1] 81
## 
## $depth_20000$n_timepointsperparticipant
## [1] 80
## 
## $depth_20000$eggerthella
## # A tibble: 1 × 9
##   feature     metadata          value  coef stderr     N N.not.0    pval    qval
##   <chr>       <chr>             <chr> <dbl>  <dbl> <dbl>   <dbl>   <dbl>   <dbl>
## 1 Eggerthella ASQtime_interact… ASQt… 0.297 0.0815   373      68 3.22e-4 0.00440
## 
## $depth_20000$bifidobacterium
## # A tibble: 1 × 9
##   feature         metadata  value      coef stderr     N N.not.0    pval    qval
##   <chr>           <chr>     <chr>     <dbl>  <dbl> <dbl>   <dbl>   <dbl>   <dbl>
## 1 Bifidobacterium ASQ_slope ASQ_slo… -0.557  0.162   373     361 6.67e-4 0.00798
## 
## 
## $depth_30000
## $depth_30000$n_participants
## [1] 81
## 
## $depth_30000$n_timepointsperparticipant
## [1] 80
## 
## $depth_30000$eggerthella
## # A tibble: 1 × 9
##   feature     metadata          value  coef stderr     N N.not.0    pval    qval
##   <chr>       <chr>             <chr> <dbl>  <dbl> <dbl>   <dbl>   <dbl>   <dbl>
## 1 Eggerthella ASQtime_interact… ASQt… 0.291 0.0795   360      64 3.05e-4 0.00407
## 
## $depth_30000$bifidobacterium
## # A tibble: 1 × 9
##   feature         metadata  value      coef stderr     N N.not.0    pval    qval
##   <chr>           <chr>     <chr>     <dbl>  <dbl> <dbl>   <dbl>   <dbl>   <dbl>
## 1 Bifidobacterium ASQ_slope ASQ_slo… -0.577  0.165   360     348 5.56e-4 0.00648
## 
## 
## $depth_40000
## $depth_40000$n_participants
## [1] 81
## 
## $depth_40000$n_timepointsperparticipant
## [1] 78
## 
## $depth_40000$eggerthella
## # A tibble: 1 × 9
##   feature     metadata          value  coef stderr     N N.not.0    pval    qval
##   <chr>       <chr>             <chr> <dbl>  <dbl> <dbl>   <dbl>   <dbl>   <dbl>
## 1 Eggerthella ASQtime_interact… ASQt… 0.254 0.0749   350      61 8.02e-4 0.00921
## 
## $depth_40000$bifidobacterium
## # A tibble: 1 × 9
##   feature         metadata  value      coef stderr     N N.not.0    pval    qval
##   <chr>           <chr>     <chr>     <dbl>  <dbl> <dbl>   <dbl>   <dbl>   <dbl>
## 1 Bifidobacterium ASQ_slope ASQ_slo… -0.564  0.166   350     338 7.44e-4 0.00921
## 
## 
## $depth_50000
## $depth_50000$n_participants
## [1] 81
## 
## $depth_50000$n_timepointsperparticipant
## [1] 76
## 
## $depth_50000$eggerthella
## # A tibble: 1 × 9
##   feature     metadata          value  coef stderr     N N.not.0    pval    qval
##   <chr>       <chr>             <chr> <dbl>  <dbl> <dbl>   <dbl>   <dbl>   <dbl>
## 1 Eggerthella ASQtime_interact… ASQt… 0.276 0.0780   343      60 4.68e-4 0.00555
## 
## $depth_50000$bifidobacterium
## # A tibble: 1 × 9
##   feature         metadata  value      coef stderr     N N.not.0    pval    qval
##   <chr>           <chr>     <chr>     <dbl>  <dbl> <dbl>   <dbl>   <dbl>   <dbl>
## 1 Bifidobacterium ASQ_slope ASQ_slo… -0.574  0.169   343     331 8.00e-4 0.00910
## 
## 
## $depth_60000
## $depth_60000$n_participants
## [1] 80
## 
## $depth_60000$n_timepointsperparticipant
## [1] 74
## 
## $depth_60000$eggerthella
## # A tibble: 1 × 9
##   feature     metadata          value  coef stderr     N N.not.0    pval    qval
##   <chr>       <chr>             <chr> <dbl>  <dbl> <dbl>   <dbl>   <dbl>   <dbl>
## 1 Eggerthella ASQtime_interact… ASQt… 0.276 0.0765   332      56 3.66e-4 0.00435
## 
## $depth_60000$bifidobacterium
## # A tibble: 1 × 9
##   feature         metadata  value      coef stderr     N N.not.0    pval    qval
##   <chr>           <chr>     <chr>     <dbl>  <dbl> <dbl>   <dbl>   <dbl>   <dbl>
## 1 Bifidobacterium ASQ_slope ASQ_slo… -0.583  0.174   332     320 8.95e-4 0.00959
## 
## 
## $depth_70000
## $depth_70000$n_participants
## [1] 80
## 
## $depth_70000$n_timepointsperparticipant
## [1] 74
## 
## $depth_70000$eggerthella
## # A tibble: 1 × 9
##   feature     metadata          value  coef stderr     N N.not.0    pval    qval
##   <chr>       <chr>             <chr> <dbl>  <dbl> <dbl>   <dbl>   <dbl>   <dbl>
## 1 Eggerthella ASQtime_interact… ASQt… 0.306 0.0792   322      58 1.41e-4 0.00175
## 
## $depth_70000$bifidobacterium
## # A tibble: 1 × 9
##   feature         metadata  value      coef stderr     N N.not.0    pval    qval
##   <chr>           <chr>     <chr>     <dbl>  <dbl> <dbl>   <dbl>   <dbl>   <dbl>
## 1 Bifidobacterium ASQ_slope ASQ_slo… -0.617  0.178   322     310 5.90e-4 0.00671
## 
## 
## $depth_80000
## $depth_80000$n_participants
## [1] 80
## 
## $depth_80000$n_timepointsperparticipant
## [1] 70
## 
## $depth_80000$eggerthella
## # A tibble: 1 × 9
##   feature     metadata          value  coef stderr     N N.not.0    pval    qval
##   <chr>       <chr>             <chr> <dbl>  <dbl> <dbl>   <dbl>   <dbl>   <dbl>
## 1 Eggerthella ASQtime_interact… ASQt… 0.319 0.0831   308      50 1.56e-4 0.00207
## 
## $depth_80000$bifidobacterium
## # A tibble: 1 × 9
##   feature         metadata  value       coef stderr     N N.not.0    pval   qval
##   <chr>           <chr>     <chr>      <dbl>  <dbl> <dbl>   <dbl>   <dbl>  <dbl>
## 1 Bifidobacterium ASQ_slope ASQ_slope -0.619  0.188   308     296 0.00109 0.0126
## 
## 
## $depth_90000
## $depth_90000$n_participants
## [1] 80
## 
## $depth_90000$n_timepointsperparticipant
## [1] 67
## 
## $depth_90000$eggerthella
## # A tibble: 1 × 9
##   feature     metadata          value  coef stderr     N N.not.0    pval    qval
##   <chr>       <chr>             <chr> <dbl>  <dbl> <dbl>   <dbl>   <dbl>   <dbl>
## 1 Eggerthella ASQtime_interact… ASQt… 0.300 0.0777   299      50 1.48e-4 0.00197
## 
## $depth_90000$bifidobacterium
## # A tibble: 1 × 9
##   feature         metadata  value       coef stderr     N N.not.0    pval   qval
##   <chr>           <chr>     <chr>      <dbl>  <dbl> <dbl>   <dbl>   <dbl>  <dbl>
## 1 Bifidobacterium ASQ_slope ASQ_slope -0.608  0.187   299     287 0.00127 0.0147
## 
## 
## $depth_100000
## $depth_100000$n_participants
## [1] 80
## 
## $depth_100000$n_timepointsperparticipant
## [1] 64
## 
## $depth_100000$eggerthella
## # A tibble: 1 × 9
##   feature     metadata          value  coef stderr     N N.not.0    pval    qval
##   <chr>       <chr>             <chr> <dbl>  <dbl> <dbl>   <dbl>   <dbl>   <dbl>
## 1 Eggerthella ASQtime_interact… ASQt… 0.301 0.0806   285      52 2.45e-4 0.00291
## 
## $depth_100000$bifidobacterium
## # A tibble: 1 × 9
##   feature         metadata  value       coef stderr     N N.not.0    pval   qval
##   <chr>           <chr>     <chr>      <dbl>  <dbl> <dbl>   <dbl>   <dbl>  <dbl>
## 1 Bifidobacterium ASQ_slope ASQ_slope -0.630  0.193   285     273 0.00124 0.0141
## 
## 
## $depth_110000
## $depth_110000$n_participants
## [1] 79
## 
## $depth_110000$n_timepointsperparticipant
## [1] 60
## 
## $depth_110000$eggerthella
## # A tibble: 1 × 9
##   feature     metadata           value  coef stderr     N N.not.0    pval   qval
##   <chr>       <chr>              <chr> <dbl>  <dbl> <dbl>   <dbl>   <dbl>  <dbl>
## 1 Eggerthella ASQtime_interacti… ASQt… 0.271 0.0826   271      47 0.00121 0.0138
## 
## $depth_110000$bifidobacterium
## # A tibble: 1 × 9
##   feature         metadata  value       coef stderr     N N.not.0    pval   qval
##   <chr>           <chr>     <chr>      <dbl>  <dbl> <dbl>   <dbl>   <dbl>  <dbl>
## 1 Bifidobacterium ASQ_slope ASQ_slope -0.587  0.190   271     261 0.00220 0.0231
## 
## 
## $depth_120000
## $depth_120000$n_participants
## [1] 78
## 
## $depth_120000$n_timepointsperparticipant
## [1] 59
## 
## $depth_120000$eggerthella
## # A tibble: 1 × 9
##   feature     metadata           value  coef stderr     N N.not.0    pval   qval
##   <chr>       <chr>              <chr> <dbl>  <dbl> <dbl>   <dbl>   <dbl>  <dbl>
## 1 Eggerthella ASQtime_interacti… ASQt… 0.267 0.0835   258      44 0.00164 0.0186
## 
## $depth_120000$bifidobacterium
## # A tibble: 1 × 9
##   feature         metadata  value       coef stderr     N N.not.0    pval   qval
##   <chr>           <chr>     <chr>      <dbl>  <dbl> <dbl>   <dbl>   <dbl>  <dbl>
## 1 Bifidobacterium ASQ_slope ASQ_slope -0.598  0.198   258     248 0.00273 0.0276
saveRDS(results_by_depth,  here("outputmia", "results_by_depth.rds"))


results_by_depthbeta <- vector("list", length(depths))
names(results_by_depthbeta) <- paste0("depth_", depths)

Loop rarefaction beta

rm(list=ls())

tse.baby_alpha <- readRDS(here("outputmia", "tse.baby_alpha.rds"))
depths <- seq(10000, 120000, by = 10000)

results_by_depthbeta <- vector("list", length(depths))
names(results_by_depthbeta) <- paste0("depth_", depths)


for (d in depths) {

  message("=== Depth: ", d, " ===")

  # Rarefy counts 
  set.seed(1234 + d)  
  tse_subsampled <- rarefyAssay(
    tse.baby_alpha,
    assay.type = "counts",      
    sample = d,
    name = "subsampled"
  )
  
# Perform clr transformation
tse.baby_clr <- transformAssay(tse_subsampled, method = "clr",assay.type = "subsampled", pseudocount =TRUE )# 
rownames(tse.baby_clr) <- gsub("\\[|\\]", "", rownames(tse.baby_clr))

  #how many participants fell out
  n_ids= length(unique(colData(tse.baby_clr)$Deelnemerscode_rem))
  # how many participants have more than x number of timepoints
  n_timepoints <- table(colData(tse.baby_clr)$Deelnemerscode_rem)
  n_timepoints <-sum(n_timepoints >= 3)
  
# Filter out missing values in confounders: total N = 71 (w/o confouders N = 72)
uniqueBabies = length(unique(tse.baby_clr$Deelnemerscode_rem))
uniqueBabies
tse.baby_clr_ASQ <- tse.baby_clr[,!is.na(tse.baby_clr$ASQ_slope)]# &!is.na(BW_infant) & !is.na(GA_weeks))
uniqueBabiesASQ = length(unique(tse.baby_clr_ASQ$Deelnemerscode_rem))
uniqueBabiesASQ

tse.baby_clr_ASQ_cov <- tse.baby_clr[,!is.na(tse.baby_clr$ASQ_slope) &!is.na(tse.baby_clr$BW_infant) & !is.na(tse.baby_clr$GA_weeks)]
uniqueBabiesASQcov = length(unique(tse.baby_clr_ASQ_cov$Deelnemerscode_rem))
uniqueBabiesASQcov

## Aitchison Distance ~ ASQ slope

set.seed(248235)
# Create a permutation scheme, restricting permutations to Deelnemerscode
permu_scheme <- permute::how(within = Within(type = "free"), 
                    plots = Plots(type = "none"),
                    blocks = colData(tse.baby_clr_ASQ_cov)$Deelnemerscode_rem,
                    nperm = 999,
                    observed = TRUE)

# Adonis (permanova) including confounders
set.seed(248235)
adon <- adonis2(t(assays(tse.baby_clr_ASQ_cov)$clr) ~  Timepoint + ASQ_slope + Gender + BW_infant + GA_weeks + SeqDepth,
                data = data.frame(colData(tse.baby_clr_ASQ_cov)), permutations = permu_scheme, 
                method = "euclidean", by = "margin")

adon

 # store summary for this depth
  results_by_depthbeta[[paste0("depth_", d)]] <- list(
    n_participants = n_ids,
    n_timepointsperparticipant= n_timepoints,
    betaASQ = adon
  )
}
## === Depth: 10000 ===
## 17 samples removed because they contained fewer reads than `sample`.
## 3315 features removed because they are not present in all samples after subsampling.
## A pseudocount of 1 was applied.
## === Depth: 20000 ===
## 27 samples removed because they contained fewer reads than `sample`.
## 3382 features removed because they are not present in all samples after subsampling.
## A pseudocount of 3.5 was applied.
## === Depth: 30000 ===
## 40 samples removed because they contained fewer reads than `sample`.
## 3465 features removed because they are not present in all samples after subsampling.
## A pseudocount of 8 was applied.
## === Depth: 40000 ===
## 50 samples removed because they contained fewer reads than `sample`.
## 3507 features removed because they are not present in all samples after subsampling.
## A pseudocount of 11.5 was applied.
## === Depth: 50000 ===
## 57 samples removed because they contained fewer reads than `sample`.
## 3544 features removed because they are not present in all samples after subsampling.
## A pseudocount of 15.5 was applied.
## === Depth: 60000 ===
## 68 samples removed because they contained fewer reads than `sample`.
## 3593 features removed because they are not present in all samples after subsampling.
## A pseudocount of 20 was applied.
## === Depth: 70000 ===
## 78 samples removed because they contained fewer reads than `sample`.
## 3632 features removed because they are not present in all samples after subsampling.
## A pseudocount of 25 was applied.
## === Depth: 80000 ===
## 92 samples removed because they contained fewer reads than `sample`.
## 3664 features removed because they are not present in all samples after subsampling.
## A pseudocount of 28.5 was applied.
## === Depth: 90000 ===
## 101 samples removed because they contained fewer reads than `sample`.
## 3696 features removed because they are not present in all samples after subsampling.
## A pseudocount of 35 was applied.
## === Depth: 100000 ===
## 115 samples removed because they contained fewer reads than `sample`.
## 3765 features removed because they are not present in all samples after subsampling.
## A pseudocount of 35.5 was applied.
## === Depth: 110000 ===
## 129 samples removed because they contained fewer reads than `sample`.
## 3843 features removed because they are not present in all samples after subsampling.
## A pseudocount of 42.5 was applied.
## === Depth: 120000 ===
## 142 samples removed because they contained fewer reads than `sample`.
## 3899 features removed because they are not present in all samples after subsampling.
## A pseudocount of 46.5 was applied.
results_by_depthbeta 
## $depth_10000
## $depth_10000$n_participants
## [1] 81
## 
## $depth_10000$n_timepointsperparticipant
## [1] 80
## 
## $depth_10000$betaASQ
## Permutation test for adonis under reduced model
## Marginal effects of terms
## Blocks:  colData(tse.baby_clr_ASQ_cov)$Deelnemerscode_rem 
## Permutation: free
## Number of permutations: 999
## 
## adonis2(formula = t(assays(tse.baby_clr_ASQ_cov)$clr) ~ Timepoint + ASQ_slope + Gender + BW_infant + GA_weeks + SeqDepth, data = data.frame(colData(tse.baby_clr_ASQ_cov)), permutations = permu_scheme, method = "euclidean", by = "margin")
##            Df SumOfSqs      R2       F Pr(>F)    
## Timepoint   1    16218 0.06333 25.8057  0.001 ***
## ASQ_slope   1     1630 0.00636  2.5934  0.001 ***
## Gender      1     1388 0.00542  2.2080  0.012 *  
## BW_infant   1      887 0.00346  1.4109  0.001 ***
## GA_weeks    1     1347 0.00526  2.1430  0.005 ** 
## SeqDepth    1     1777 0.00694  2.8282  0.008 ** 
## Residual  371   233163 0.91051                   
## Total     377   256080 1.00000                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## $depth_20000
## $depth_20000$n_participants
## [1] 81
## 
## $depth_20000$n_timepointsperparticipant
## [1] 80
## 
## $depth_20000$betaASQ
## Permutation test for adonis under reduced model
## Marginal effects of terms
## Blocks:  colData(tse.baby_clr_ASQ_cov)$Deelnemerscode_rem 
## Permutation: free
## Number of permutations: 999
## 
## adonis2(formula = t(assays(tse.baby_clr_ASQ_cov)$clr) ~ Timepoint + ASQ_slope + Gender + BW_infant + GA_weeks + SeqDepth, data = data.frame(colData(tse.baby_clr_ASQ_cov)), permutations = permu_scheme, method = "euclidean", by = "margin")
##            Df SumOfSqs      R2       F Pr(>F)    
## Timepoint   1    12098 0.06486 25.7933  0.001 ***
## ASQ_slope   1     1256 0.00673  2.6774  0.001 ***
## Gender      1     1069 0.00573  2.2792  0.048 *  
## BW_infant   1      649 0.00348  1.3832  0.001 ***
## GA_weeks    1     1011 0.00542  2.1550  0.037 *  
## SeqDepth    1     1231 0.00660  2.6241  0.014 *  
## Residual  361   169315 0.90781                   
## Total     367   186509 1.00000                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## $depth_30000
## $depth_30000$n_participants
## [1] 81
## 
## $depth_30000$n_timepointsperparticipant
## [1] 80
## 
## $depth_30000$betaASQ
## Permutation test for adonis under reduced model
## Marginal effects of terms
## Blocks:  colData(tse.baby_clr_ASQ_cov)$Deelnemerscode_rem 
## Permutation: free
## Number of permutations: 999
## 
## adonis2(formula = t(assays(tse.baby_clr_ASQ_cov)$clr) ~ Timepoint + ASQ_slope + Gender + BW_infant + GA_weeks + SeqDepth, data = data.frame(colData(tse.baby_clr_ASQ_cov)), permutations = permu_scheme, method = "euclidean", by = "margin")
##            Df SumOfSqs      R2       F Pr(>F)    
## Timepoint   1     8673 0.06210 23.7436  0.001 ***
## ASQ_slope   1      956 0.00684  2.6164  0.001 ***
## Gender      1      793 0.00568  2.1701  0.005 ** 
## BW_infant   1      519 0.00371  1.4201  0.001 ***
## GA_weeks    1      764 0.00547  2.0906  0.161    
## SeqDepth    1      916 0.00656  2.5078  0.022 *  
## Residual  348   127113 0.91022                   
## Total     354   139651 1.00000                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## $depth_40000
## $depth_40000$n_participants
## [1] 81
## 
## $depth_40000$n_timepointsperparticipant
## [1] 78
## 
## $depth_40000$betaASQ
## Permutation test for adonis under reduced model
## Marginal effects of terms
## Blocks:  colData(tse.baby_clr_ASQ_cov)$Deelnemerscode_rem 
## Permutation: free
## Number of permutations: 999
## 
## adonis2(formula = t(assays(tse.baby_clr_ASQ_cov)$clr) ~ Timepoint + ASQ_slope + Gender + BW_infant + GA_weeks + SeqDepth, data = data.frame(colData(tse.baby_clr_ASQ_cov)), permutations = permu_scheme, method = "euclidean", by = "margin")
##            Df SumOfSqs      R2       F Pr(>F)    
## Timepoint   1     7692 0.05988 22.2144  0.001 ***
## ASQ_slope   1      923 0.00719  2.6659  0.001 ***
## Gender      1      780 0.00607  2.2527  0.058 .  
## BW_infant   1      481 0.00374  1.3891  0.001 ***
## GA_weeks    1      695 0.00541  2.0082  0.026 *  
## SeqDepth    1      896 0.00698  2.5888  0.015 *  
## Residual  338   117043 0.91108                   
## Total     344   128467 1.00000                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## $depth_50000
## $depth_50000$n_participants
## [1] 81
## 
## $depth_50000$n_timepointsperparticipant
## [1] 76
## 
## $depth_50000$betaASQ
## Permutation test for adonis under reduced model
## Marginal effects of terms
## Blocks:  colData(tse.baby_clr_ASQ_cov)$Deelnemerscode_rem 
## Permutation: free
## Number of permutations: 999
## 
## adonis2(formula = t(assays(tse.baby_clr_ASQ_cov)$clr) ~ Timepoint + ASQ_slope + Gender + BW_infant + GA_weeks + SeqDepth, data = data.frame(colData(tse.baby_clr_ASQ_cov)), permutations = permu_scheme, method = "euclidean", by = "margin")
##            Df SumOfSqs      R2       F Pr(>F)    
## Timepoint   1     7190 0.06005 21.8402  0.001 ***
## ASQ_slope   1      893 0.00746  2.7136  0.001 ***
## Gender      1      775 0.00648  2.3557  0.008 ** 
## BW_infant   1      455 0.00380  1.3821  0.001 ***
## GA_weeks    1      640 0.00534  1.9437  0.009 ** 
## SeqDepth    1      822 0.00686  2.4962  0.005 ** 
## Residual  331   108963 0.91005                   
## Total     337   119732 1.00000                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## $depth_60000
## $depth_60000$n_participants
## [1] 80
## 
## $depth_60000$n_timepointsperparticipant
## [1] 74
## 
## $depth_60000$betaASQ
## Permutation test for adonis under reduced model
## Marginal effects of terms
## Blocks:  colData(tse.baby_clr_ASQ_cov)$Deelnemerscode_rem 
## Permutation: free
## Number of permutations: 999
## 
## adonis2(formula = t(assays(tse.baby_clr_ASQ_cov)$clr) ~ Timepoint + ASQ_slope + Gender + BW_infant + GA_weeks + SeqDepth, data = data.frame(colData(tse.baby_clr_ASQ_cov)), permutations = permu_scheme, method = "euclidean", by = "margin")
##            Df SumOfSqs      R2       F Pr(>F)    
## Timepoint   1     6529 0.05922 20.8184  0.001 ***
## ASQ_slope   1      810 0.00735  2.5837  0.001 ***
## Gender      1      695 0.00630  2.2151  0.001 ***
## BW_infant   1      457 0.00415  1.4580  0.001 ***
## GA_weeks    1      621 0.00563  1.9808  0.164    
## SeqDepth    1      740 0.00671  2.3601  0.012 *  
## Residual  320   100355 0.91023                   
## Total     326   110252 1.00000                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## $depth_70000
## $depth_70000$n_participants
## [1] 80
## 
## $depth_70000$n_timepointsperparticipant
## [1] 74
## 
## $depth_70000$betaASQ
## Permutation test for adonis under reduced model
## Marginal effects of terms
## Blocks:  colData(tse.baby_clr_ASQ_cov)$Deelnemerscode_rem 
## Permutation: free
## Number of permutations: 999
## 
## adonis2(formula = t(assays(tse.baby_clr_ASQ_cov)$clr) ~ Timepoint + ASQ_slope + Gender + BW_infant + GA_weeks + SeqDepth, data = data.frame(colData(tse.baby_clr_ASQ_cov)), permutations = permu_scheme, method = "euclidean", by = "margin")
##            Df SumOfSqs      R2       F Pr(>F)    
## Timepoint   1     5913 0.05789 19.7802  0.001 ***
## ASQ_slope   1      720 0.00705  2.4075  0.001 ***
## Gender      1      621 0.00608  2.0781  0.450    
## BW_infant   1      445 0.00436  1.4888  0.001 ***
## GA_weeks    1      576 0.00564  1.9258  0.334    
## SeqDepth    1      793 0.00777  2.6543  0.010 ** 
## Residual  311    92961 0.91025                   
## Total     317   102127 1.00000                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## $depth_80000
## $depth_80000$n_participants
## [1] 80
## 
## $depth_80000$n_timepointsperparticipant
## [1] 70
## 
## $depth_80000$betaASQ
## Permutation test for adonis under reduced model
## Marginal effects of terms
## Blocks:  colData(tse.baby_clr_ASQ_cov)$Deelnemerscode_rem 
## Permutation: free
## Number of permutations: 999
## 
## adonis2(formula = t(assays(tse.baby_clr_ASQ_cov)$clr) ~ Timepoint + ASQ_slope + Gender + BW_infant + GA_weeks + SeqDepth, data = data.frame(colData(tse.baby_clr_ASQ_cov)), permutations = permu_scheme, method = "euclidean", by = "margin")
##            Df SumOfSqs      R2       F Pr(>F)    
## Timepoint   1     5644 0.05746 18.7013  0.001 ***
## ASQ_slope   1      667 0.00679  2.2093  0.001 ***
## Gender      1      606 0.00617  2.0094  0.001 ***
## BW_infant   1      436 0.00444  1.4440  0.001 ***
## GA_weeks    1      524 0.00534  1.7368  0.278    
## SeqDepth    1      665 0.00677  2.2034  0.016 *  
## Residual  297    89632 0.91249                   
## Total     303    98227 1.00000                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## $depth_90000
## $depth_90000$n_participants
## [1] 80
## 
## $depth_90000$n_timepointsperparticipant
## [1] 67
## 
## $depth_90000$betaASQ
## Permutation test for adonis under reduced model
## Marginal effects of terms
## Blocks:  colData(tse.baby_clr_ASQ_cov)$Deelnemerscode_rem 
## Permutation: free
## Number of permutations: 999
## 
## adonis2(formula = t(assays(tse.baby_clr_ASQ_cov)$clr) ~ Timepoint + ASQ_slope + Gender + BW_infant + GA_weeks + SeqDepth, data = data.frame(colData(tse.baby_clr_ASQ_cov)), permutations = permu_scheme, method = "euclidean", by = "margin")
##            Df SumOfSqs      R2       F Pr(>F)    
## Timepoint   1     5294 0.05865 18.5524  0.001 ***
## ASQ_slope   1      599 0.00664  2.0988  0.001 ***
## Gender      1      555 0.00615  1.9446  0.052 .  
## BW_infant   1      417 0.00462  1.4604  0.001 ***
## GA_weeks    1      523 0.00579  1.8311  0.017 *  
## SeqDepth    1      595 0.00659  2.0843  0.022 *  
## Residual  288    82182 0.91050                   
## Total     294    90260 1.00000                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## $depth_100000
## $depth_100000$n_participants
## [1] 80
## 
## $depth_100000$n_timepointsperparticipant
## [1] 64
## 
## $depth_100000$betaASQ
## Permutation test for adonis under reduced model
## Marginal effects of terms
## Blocks:  colData(tse.baby_clr_ASQ_cov)$Deelnemerscode_rem 
## Permutation: free
## Number of permutations: 999
## 
## adonis2(formula = t(assays(tse.baby_clr_ASQ_cov)$clr) ~ Timepoint + ASQ_slope + Gender + BW_infant + GA_weeks + SeqDepth, data = data.frame(colData(tse.baby_clr_ASQ_cov)), permutations = permu_scheme, method = "euclidean", by = "margin")
##            Df SumOfSqs      R2       F Pr(>F)    
## Timepoint   1     5202 0.05730 17.2465  0.001 ***
## ASQ_slope   1      612 0.00674  2.0275  0.001 ***
## Gender      1      592 0.00652  1.9636  0.001 ***
## BW_infant   1      435 0.00479  1.4430  0.001 ***
## GA_weeks    1      570 0.00628  1.8903  0.015 *  
## SeqDepth    1      603 0.00664  2.0001  0.023 *  
## Residual  274    82645 0.91030                   
## Total     280    90789 1.00000                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## $depth_110000
## $depth_110000$n_participants
## [1] 79
## 
## $depth_110000$n_timepointsperparticipant
## [1] 60
## 
## $depth_110000$betaASQ
## Permutation test for adonis under reduced model
## Marginal effects of terms
## Blocks:  colData(tse.baby_clr_ASQ_cov)$Deelnemerscode_rem 
## Permutation: free
## Number of permutations: 999
## 
## adonis2(formula = t(assays(tse.baby_clr_ASQ_cov)$clr) ~ Timepoint + ASQ_slope + Gender + BW_infant + GA_weeks + SeqDepth, data = data.frame(colData(tse.baby_clr_ASQ_cov)), permutations = permu_scheme, method = "euclidean", by = "margin")
##            Df SumOfSqs      R2       F Pr(>F)    
## Timepoint   1     4745 0.05827 16.6801  0.001 ***
## ASQ_slope   1      587 0.00721  2.0650  0.001 ***
## Gender      1      508 0.00624  1.7854  0.001 ***
## BW_infant   1      407 0.00500  1.4312  0.001 ***
## GA_weeks    1      512 0.00628  1.7986  0.033 *  
## SeqDepth    1      538 0.00661  1.8925  0.066 .  
## Residual  260    73963 0.90835                   
## Total     266    81426 1.00000                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## $depth_120000
## $depth_120000$n_participants
## [1] 78
## 
## $depth_120000$n_timepointsperparticipant
## [1] 59
## 
## $depth_120000$betaASQ
## Permutation test for adonis under reduced model
## Marginal effects of terms
## Blocks:  colData(tse.baby_clr_ASQ_cov)$Deelnemerscode_rem 
## Permutation: free
## Number of permutations: 999
## 
## adonis2(formula = t(assays(tse.baby_clr_ASQ_cov)$clr) ~ Timepoint + ASQ_slope + Gender + BW_infant + GA_weeks + SeqDepth, data = data.frame(colData(tse.baby_clr_ASQ_cov)), permutations = permu_scheme, method = "euclidean", by = "margin")
##            Df SumOfSqs      R2       F Pr(>F)    
## Timepoint   1     4473 0.05772 15.7092  0.001 ***
## ASQ_slope   1      563 0.00726  1.9767  0.001 ***
## Gender      1      505 0.00651  1.7729  0.176    
## BW_infant   1      407 0.00525  1.4277  0.001 ***
## GA_weeks    1      520 0.00670  1.8249  0.037 *  
## SeqDepth    1      492 0.00635  1.7288  0.083 .  
## Residual  247    70328 0.90752                   
## Total     253    77495 1.00000                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1