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("Early concern","Late 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-05 17:46:38.276684 INFO::Writing function arguments to log file
## 2026-05-05 17:46:38.38733 INFO::Verifying options selected are valid
## 2026-05-05 17:46:38.923418 INFO::Determining format of input files
## 2026-05-05 17:46:38.930583 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-05 17:46:38.959255 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-05 17:46:38.962555 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-05 17:46:38.968936 INFO::Filter data based on min abundance and min prevalence
## 2026-05-05 17:46:38.973016 INFO::Total samples in data: 400
## 2026-05-05 17:46:38.976965 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-05 17:46:39.011265 INFO::Total filtered features: 0
## 2026-05-05 17:46:39.019686 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-05 17:46:39.035188 INFO::Total filtered features with variance filtering: 0
## 2026-05-05 17:46:39.038472 INFO::Filtered feature names from variance filtering:
## 2026-05-05 17:46:39.042575 INFO::Running selected normalization method: NONE
## 2026-05-05 17:46:39.049367 INFO::Applying z-score to standardize continuous metadata
## 2026-05-05 17:46:39.124552 INFO::Running selected transform method: NONE
## 2026-05-05 17:46:39.129603 INFO::Running selected analysis method: LM
## 2026-05-05 17:46:39.198385 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-05 17:46:39.823907 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## 2026-05-05 17:46:40.016225 INFO::Fitting model to feature number 3, Eubacterium_hallii_group
## 2026-05-05 17:46:40.30515 INFO::Fitting model to feature number 4, Ruminococcus_gnavus_group
## 2026-05-05 17:46:40.436024 INFO::Fitting model to feature number 5, Ruminococcus_torques_group
## 2026-05-05 17:46:40.588542 INFO::Fitting model to feature number 6, Actinomyces
## 2026-05-05 17:46:40.744423 INFO::Fitting model to feature number 7, Akkermansia
## 2026-05-05 17:46:40.935839 INFO::Fitting model to feature number 8, Alistipes
## 2026-05-05 17:46:41.134172 INFO::Fitting model to feature number 9, Anaerostipes
## 2026-05-05 17:46:41.382754 INFO::Fitting model to feature number 10, Bacteroides
## 2026-05-05 17:46:41.54638 INFO::Fitting model to feature number 11, Bifidobacterium
## 2026-05-05 17:46:41.69887 INFO::Fitting model to feature number 12, Blautia
## 2026-05-05 17:46:41.85966 INFO::Fitting model to feature number 13, Butyricicoccus
## 2026-05-05 17:46:42.042316 INFO::Fitting model to feature number 14, Clostridioides
## 2026-05-05 17:46:42.198965 INFO::Fitting model to feature number 15, Clostridium_sensu_stricto_1
## 2026-05-05 17:46:42.356274 INFO::Fitting model to feature number 16, Collinsella
## 2026-05-05 17:46:42.49879 INFO::Fitting model to feature number 17, Dorea
## 2026-05-05 17:46:42.722774 INFO::Fitting model to feature number 18, Eggerthella
## 2026-05-05 17:46:43.283942 INFO::Fitting model to feature number 19, Enterococcus
## 2026-05-05 17:46:43.458671 INFO::Fitting model to feature number 20, Erysipelatoclostridium
## 2026-05-05 17:46:43.665772 INFO::Fitting model to feature number 21, Faecalibacterium
## 2026-05-05 17:46:43.920031 INFO::Fitting model to feature number 22, Flavonifractor
## 2026-05-05 17:46:44.150142 INFO::Fitting model to feature number 23, Fusicatenibacter
## 2026-05-05 17:46:44.372478 INFO::Fitting model to feature number 24, Haemophilus
## 2026-05-05 17:46:44.542471 INFO::Fitting model to feature number 25, Intestinibacter
## 2026-05-05 17:46:44.871788 INFO::Fitting model to feature number 26, Lachnoclostridium
## 2026-05-05 17:46:45.007062 INFO::Fitting model to feature number 27, Lachnospira
## 2026-05-05 17:46:45.108238 INFO::Fitting model to feature number 28, Lachnospiraceae_NK4A136_group
## 2026-05-05 17:46:45.218406 INFO::Fitting model to feature number 29, Lachnospiraceae_UCG.004
## 2026-05-05 17:46:45.346083 INFO::Fitting model to feature number 30, Lactobacillus
## 2026-05-05 17:46:45.481528 INFO::Fitting model to feature number 31, Megasphaera
## 2026-05-05 17:46:45.633292 INFO::Fitting model to feature number 32, Parabacteroides
## 2026-05-05 17:46:45.773022 INFO::Fitting model to feature number 33, Roseburia
## 2026-05-05 17:46:45.895706 INFO::Fitting model to feature number 34, Ruminococcaceae_UCG.013
## 2026-05-05 17:46:46.012289 INFO::Fitting model to feature number 35, Sellimonas
## 2026-05-05 17:46:46.122797 INFO::Fitting model to feature number 36, Senegalimassilia
## 2026-05-05 17:46:46.247861 INFO::Fitting model to feature number 37, Streptococcus
## 2026-05-05 17:46:46.398065 INFO::Fitting model to feature number 38, Subdoligranulum
## 2026-05-05 17:46:46.5195 INFO::Fitting model to feature number 39, Sutterella
## 2026-05-05 17:46:46.639965 INFO::Fitting model to feature number 40, Tyzzerella_4
## 2026-05-05 17:46:46.756883 INFO::Fitting model to feature number 41, uncultured_6
## 2026-05-05 17:46:46.8554 INFO::Fitting model to feature number 42, Veillonella
## 2026-05-05 17:46:46.966093 INFO::Fitting model to feature number 43, Other
## 2026-05-05 17:46:47.136649 INFO::Counting total values for each feature
## 2026-05-05 17:46:47.169877 INFO::Writing filtered data to file asq8_mia/features/filtered_data.tsv
## 2026-05-05 17:46:47.257998 INFO::Writing filtered, normalized data to file asq8_mia/features/filtered_data_norm.tsv
## 2026-05-05 17:46:47.329202 INFO::Writing filtered, normalized, transformed data to file asq8_mia/features/filtered_data_norm_transformed.tsv
## 2026-05-05 17:46:47.401592 WARNING::Deleting existing residuals file: asq8_mia/fits/residuals.rds
## 2026-05-05 17:46:47.416908 INFO::Writing residuals to file asq8_mia/fits/residuals.rds
## 2026-05-05 17:46:47.436138 WARNING::Deleting existing fitted file: asq8_mia/fits/fitted.rds
## 2026-05-05 17:46:47.442656 INFO::Writing fitted values to file asq8_mia/fits/fitted.rds
## 2026-05-05 17:46:47.466847 WARNING::Deleting existing ranef file: asq8_mia/fits/ranef.rds
## 2026-05-05 17:46:47.475178 INFO::Writing extracted random effects to file asq8_mia/fits/ranef.rds
## 2026-05-05 17:46:47.484214 INFO::Writing all results to file (ordered by increasing q-values): asq8_mia/all_results.tsv
## 2026-05-05 17:46:47.501163 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-05 17:46:47.509718 INFO::Writing heatmap of significant results to file: asq8_mia/heatmap.pdf
## 2026-05-05 17:46:48.03409 INFO::Writing association plots (one for each significant association) to output folder: asq8_mia
## 2026-05-05 17:46:48.04885 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-05 17:46:48.053178 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-05 17:46:48.061314 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:46:48.803461 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:46:49.314846 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:46:49.979833 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:46:50.520505 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:46:51.146427 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:46:51.728685 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:46:52.21475 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:46:52.859459 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:46:53.527814 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:46:54.130037 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:46:54.664854 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:46:55.384974 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:46:55.924813 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:46:56.79487 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:46:57.451968 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:46:57.963117 INFO::Creating scatter plot for continuous data, Timepoint vs Alistipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:46:58.63465 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:46:59.180615 INFO::Creating scatter plot for continuous data, Timepoint vs Streptococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:46:59.763452 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:47:00.353805 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnoclostridium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:47:01.070827 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:47:01.8692 INFO::Creating scatter plot for continuous data, Timepoint vs Sellimonas
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:47:02.814423 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:47:03.807499 INFO::Creating scatter plot for continuous data, Timepoint vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:47:04.314836 INFO::Creating scatter plot for continuous data, Timepoint vs Haemophilus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:47:04.944375 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_hallii_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:47:05.424167 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-05 17:47:13.202357 INFO::Plotting data for metadata number 2, SeqDepth
## 2026-05-05 17:47:13.215339 INFO::Creating scatter plot for continuous data, SeqDepth vs Other
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:47:13.948755 INFO::Creating scatter plot for continuous data, SeqDepth vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:47:14.806151 INFO::Creating scatter plot for continuous data, SeqDepth vs Ruminococcaceae_UCG.013
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:47:15.511206 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-05 17:47:31.396129 INFO::Plotting data for metadata number 3, ASQtime_interaction
## 2026-05-05 17:47:31.407641 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-05 17:47:32.747325 INFO::Plotting data for metadata number 4, GA_weeks
## 2026-05-05 17:47:32.758427 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-05 17:47:34.124476 INFO::Plotting data for metadata number 5, ASQ_slope
## 2026-05-05 17:47:34.13277 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-05 17:47:45.11962 INFO::Writing function arguments to log file
## 2026-05-05 17:47:45.177544 INFO::Verifying options selected are valid
## 2026-05-05 17:47:45.183984 INFO::Determining format of input files
## 2026-05-05 17:47:45.190891 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-05 17:47:45.218638 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-05 17:47:45.223536 INFO::Formula for fixed effects: expr ~  Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-05 17:47:45.228293 INFO::Filter data based on min abundance and min prevalence
## 2026-05-05 17:47:45.233134 INFO::Total samples in data: 123
## 2026-05-05 17:47:45.237848 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-05 17:47:45.244366 INFO::Total filtered features: 0
## 2026-05-05 17:47:45.251105 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-05 17:47:45.258764 INFO::Total filtered features with variance filtering: 0
## 2026-05-05 17:47:45.262418 INFO::Filtered feature names from variance filtering:
## 2026-05-05 17:47:45.268172 INFO::Running selected normalization method: NONE
## 2026-05-05 17:47:45.272025 INFO::Applying z-score to standardize continuous metadata
## 2026-05-05 17:47:45.291077 INFO::Running selected transform method: NONE
## 2026-05-05 17:47:45.295452 INFO::Running selected analysis method: LM
## 2026-05-05 17:47:45.301519 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-05 17:47:45.461453 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## 2026-05-05 17:47:45.576767 INFO::Fitting model to feature number 3, Eubacterium_hallii_group
## 2026-05-05 17:47:45.712081 INFO::Fitting model to feature number 4, Ruminococcus_gnavus_group
## 2026-05-05 17:47:45.93674 INFO::Fitting model to feature number 5, Ruminococcus_torques_group
## 2026-05-05 17:47:46.050309 INFO::Fitting model to feature number 6, Actinomyces
## boundary (singular) fit: see help('isSingular')
## 2026-05-05 17:47:46.172943 INFO::Fitting model to feature number 7, Akkermansia
## 2026-05-05 17:47:46.285383 INFO::Fitting model to feature number 8, Alistipes
## 2026-05-05 17:47:46.433172 INFO::Fitting model to feature number 9, Anaerostipes
## 2026-05-05 17:47:46.579089 INFO::Fitting model to feature number 10, Bacteroides
## 2026-05-05 17:47:46.760142 INFO::Fitting model to feature number 11, Bifidobacterium
## 2026-05-05 17:47:46.953564 INFO::Fitting model to feature number 12, Blautia
## 2026-05-05 17:47:47.109782 INFO::Fitting model to feature number 13, Butyricicoccus
## boundary (singular) fit: see help('isSingular')
## 2026-05-05 17:47:47.264718 INFO::Fitting model to feature number 14, Clostridioides
## boundary (singular) fit: see help('isSingular')
## 2026-05-05 17:47:47.390618 INFO::Fitting model to feature number 15, Clostridium_sensu_stricto_1
## 2026-05-05 17:47:47.585455 INFO::Fitting model to feature number 16, Collinsella
## 2026-05-05 17:47:47.757841 INFO::Fitting model to feature number 17, Dorea
## 2026-05-05 17:47:47.942603 INFO::Fitting model to feature number 18, Eggerthella
## 2026-05-05 17:47:48.11402 INFO::Fitting model to feature number 19, Enterococcus
## 2026-05-05 17:47:48.302209 INFO::Fitting model to feature number 20, Erysipelatoclostridium
## 2026-05-05 17:47:48.513869 INFO::Fitting model to feature number 21, Faecalibacterium
## 2026-05-05 17:47:48.687245 INFO::Fitting model to feature number 22, Flavonifractor
## 2026-05-05 17:47:48.90365 INFO::Fitting model to feature number 23, Fusicatenibacter
## 2026-05-05 17:47:49.160372 INFO::Fitting model to feature number 24, Haemophilus
## 2026-05-05 17:47:49.373329 INFO::Fitting model to feature number 25, Intestinibacter
## 2026-05-05 17:47:49.47084 INFO::Fitting model to feature number 26, Lachnoclostridium
## 2026-05-05 17:47:49.610877 INFO::Fitting model to feature number 27, Lachnospira
## boundary (singular) fit: see help('isSingular')
## 2026-05-05 17:47:49.800093 INFO::Fitting model to feature number 28, Lachnospiraceae_NK4A136_group
## 2026-05-05 17:47:50.169256 INFO::Fitting model to feature number 29, Lachnospiraceae_UCG.004
## 2026-05-05 17:47:50.354303 INFO::Fitting model to feature number 30, Lactobacillus
## 2026-05-05 17:47:50.49823 INFO::Fitting model to feature number 31, Megasphaera
## 2026-05-05 17:47:50.621534 INFO::Fitting model to feature number 32, Parabacteroides
## 2026-05-05 17:47:50.788615 INFO::Fitting model to feature number 33, Roseburia
## boundary (singular) fit: see help('isSingular')
## 2026-05-05 17:47:50.955626 INFO::Fitting model to feature number 34, Ruminococcaceae_UCG.013
## 2026-05-05 17:47:51.129285 INFO::Fitting model to feature number 35, Sellimonas
## 2026-05-05 17:47:51.414209 INFO::Fitting model to feature number 36, Senegalimassilia
## 2026-05-05 17:47:51.56353 INFO::Fitting model to feature number 37, Streptococcus
## 2026-05-05 17:47:51.686315 INFO::Fitting model to feature number 38, Subdoligranulum
## 2026-05-05 17:47:51.967883 INFO::Fitting model to feature number 39, Sutterella
## 2026-05-05 17:47:52.092643 INFO::Fitting model to feature number 40, Tyzzerella_4
## 2026-05-05 17:47:52.187198 INFO::Fitting model to feature number 41, uncultured_6
## 2026-05-05 17:47:52.298084 INFO::Fitting model to feature number 42, Veillonella
## 2026-05-05 17:47:52.398409 INFO::Fitting model to feature number 43, Other
## 2026-05-05 17:47:52.525748 INFO::Counting total values for each feature
## 2026-05-05 17:47:52.545183 INFO::Writing filtered data to file asq8_Earlyzero/features/filtered_data.tsv
## 2026-05-05 17:47:52.576529 INFO::Writing filtered, normalized data to file asq8_Earlyzero/features/filtered_data_norm.tsv
## 2026-05-05 17:47:52.60973 INFO::Writing filtered, normalized, transformed data to file asq8_Earlyzero/features/filtered_data_norm_transformed.tsv
## 2026-05-05 17:47:52.638862 WARNING::Deleting existing residuals file: asq8_Earlyzero/fits/residuals.rds
## 2026-05-05 17:47:52.647032 INFO::Writing residuals to file asq8_Earlyzero/fits/residuals.rds
## 2026-05-05 17:47:52.661661 WARNING::Deleting existing fitted file: asq8_Earlyzero/fits/fitted.rds
## 2026-05-05 17:47:52.671062 INFO::Writing fitted values to file asq8_Earlyzero/fits/fitted.rds
## 2026-05-05 17:47:52.685456 WARNING::Deleting existing ranef file: asq8_Earlyzero/fits/ranef.rds
## 2026-05-05 17:47:52.693692 INFO::Writing extracted random effects to file asq8_Earlyzero/fits/ranef.rds
## 2026-05-05 17:47:52.701519 INFO::Writing all results to file (ordered by increasing q-values): asq8_Earlyzero/all_results.tsv
## 2026-05-05 17:47:52.831315 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-05 17:47:52.840696 INFO::Writing heatmap of significant results to file: asq8_Earlyzero/heatmap.pdf
## 2026-05-05 17:47:53.017059 INFO::Writing association plots (one for each significant association) to output folder: asq8_Earlyzero
## 2026-05-05 17:47:53.028322 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-05 17:47:53.032153 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-05 17:47:53.039125 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:47:53.621663 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:47:54.140682 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:47:54.814419 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:47:55.389538 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:47:56.085461 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:47:56.636608 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:47:57.434515 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:47:58.078409 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:47:58.714176 INFO::Creating scatter plot for continuous data, Timepoint vs Sellimonas
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:47:59.243396 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:47:59.696042 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:00.222576 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:00.806318 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:01.610365 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:02.233179 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:03.183108 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:04.062332 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-05 17:48:09.739293 INFO::Plotting data for metadata number 2, SeqDepth
## 2026-05-05 17:48:09.747881 INFO::Creating scatter plot for continuous data, SeqDepth vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:10.08572 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-05 17:48:12.571369 INFO::Writing function arguments to log file
## 2026-05-05 17:48:12.631218 INFO::Verifying options selected are valid
## 2026-05-05 17:48:12.63564 INFO::Determining format of input files
## 2026-05-05 17:48:12.64295 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-05 17:48:12.672389 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-05 17:48:12.676422 INFO::Formula for fixed effects: expr ~  Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-05 17:48:12.681856 INFO::Filter data based on min abundance and min prevalence
## 2026-05-05 17:48:12.685714 INFO::Total samples in data: 277
## 2026-05-05 17:48:12.690202 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-05 17:48:12.699079 INFO::Total filtered features: 0
## 2026-05-05 17:48:12.704061 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-05 17:48:12.713762 INFO::Total filtered features with variance filtering: 0
## 2026-05-05 17:48:12.71844 INFO::Filtered feature names from variance filtering:
## 2026-05-05 17:48:12.723926 INFO::Running selected normalization method: NONE
## 2026-05-05 17:48:12.729803 INFO::Applying z-score to standardize continuous metadata
## 2026-05-05 17:48:12.744962 INFO::Running selected transform method: NONE
## 2026-05-05 17:48:12.748595 INFO::Running selected analysis method: LM
## 2026-05-05 17:48:12.75307 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-05 17:48:12.865896 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## 2026-05-05 17:48:12.982621 INFO::Fitting model to feature number 3, Eubacterium_hallii_group
## boundary (singular) fit: see help('isSingular')
## 2026-05-05 17:48:13.115329 INFO::Fitting model to feature number 4, Ruminococcus_gnavus_group
## 2026-05-05 17:48:13.235617 INFO::Fitting model to feature number 5, Ruminococcus_torques_group
## 2026-05-05 17:48:13.331202 INFO::Fitting model to feature number 6, Actinomyces
## 2026-05-05 17:48:13.456677 INFO::Fitting model to feature number 7, Akkermansia
## 2026-05-05 17:48:13.61048 INFO::Fitting model to feature number 8, Alistipes
## 2026-05-05 17:48:13.71161 INFO::Fitting model to feature number 9, Anaerostipes
## 2026-05-05 17:48:13.806346 INFO::Fitting model to feature number 10, Bacteroides
## 2026-05-05 17:48:13.888844 INFO::Fitting model to feature number 11, Bifidobacterium
## 2026-05-05 17:48:14.01474 INFO::Fitting model to feature number 12, Blautia
## 2026-05-05 17:48:14.098853 INFO::Fitting model to feature number 13, Butyricicoccus
## 2026-05-05 17:48:14.185952 INFO::Fitting model to feature number 14, Clostridioides
## 2026-05-05 17:48:14.263956 INFO::Fitting model to feature number 15, Clostridium_sensu_stricto_1
## 2026-05-05 17:48:14.347594 INFO::Fitting model to feature number 16, Collinsella
## 2026-05-05 17:48:14.435209 INFO::Fitting model to feature number 17, Dorea
## 2026-05-05 17:48:14.520051 INFO::Fitting model to feature number 18, Eggerthella
## 2026-05-05 17:48:14.601944 INFO::Fitting model to feature number 19, Enterococcus
## 2026-05-05 17:48:14.70906 INFO::Fitting model to feature number 20, Erysipelatoclostridium
## 2026-05-05 17:48:14.814397 INFO::Fitting model to feature number 21, Faecalibacterium
## 2026-05-05 17:48:14.911637 INFO::Fitting model to feature number 22, Flavonifractor
## 2026-05-05 17:48:14.998157 INFO::Fitting model to feature number 23, Fusicatenibacter
## 2026-05-05 17:48:15.078246 INFO::Fitting model to feature number 24, Haemophilus
## 2026-05-05 17:48:15.169544 INFO::Fitting model to feature number 25, Intestinibacter
## 2026-05-05 17:48:15.262202 INFO::Fitting model to feature number 26, Lachnoclostridium
## 2026-05-05 17:48:15.349932 INFO::Fitting model to feature number 27, Lachnospira
## 2026-05-05 17:48:15.441984 INFO::Fitting model to feature number 28, Lachnospiraceae_NK4A136_group
## 2026-05-05 17:48:15.524792 INFO::Fitting model to feature number 29, Lachnospiraceae_UCG.004
## 2026-05-05 17:48:15.613464 INFO::Fitting model to feature number 30, Lactobacillus
## 2026-05-05 17:48:15.72744 INFO::Fitting model to feature number 31, Megasphaera
## 2026-05-05 17:48:15.871269 INFO::Fitting model to feature number 32, Parabacteroides
## 2026-05-05 17:48:15.989032 INFO::Fitting model to feature number 33, Roseburia
## 2026-05-05 17:48:16.086079 INFO::Fitting model to feature number 34, Ruminococcaceae_UCG.013
## 2026-05-05 17:48:16.172005 INFO::Fitting model to feature number 35, Sellimonas
## 2026-05-05 17:48:16.25064 INFO::Fitting model to feature number 36, Senegalimassilia
## 2026-05-05 17:48:16.332124 INFO::Fitting model to feature number 37, Streptococcus
## 2026-05-05 17:48:16.426283 INFO::Fitting model to feature number 38, Subdoligranulum
## 2026-05-05 17:48:16.503959 INFO::Fitting model to feature number 39, Sutterella
## 2026-05-05 17:48:16.591102 INFO::Fitting model to feature number 40, Tyzzerella_4
## 2026-05-05 17:48:16.691584 INFO::Fitting model to feature number 41, uncultured_6
## 2026-05-05 17:48:16.788465 INFO::Fitting model to feature number 42, Veillonella
## 2026-05-05 17:48:16.882238 INFO::Fitting model to feature number 43, Other
## 2026-05-05 17:48:16.996786 INFO::Counting total values for each feature
## 2026-05-05 17:48:17.016499 INFO::Writing filtered data to file asq8_Latezero/features/filtered_data.tsv
## 2026-05-05 17:48:17.067059 INFO::Writing filtered, normalized data to file asq8_Latezero/features/filtered_data_norm.tsv
## 2026-05-05 17:48:17.117436 INFO::Writing filtered, normalized, transformed data to file asq8_Latezero/features/filtered_data_norm_transformed.tsv
## 2026-05-05 17:48:17.177984 WARNING::Deleting existing residuals file: asq8_Latezero/fits/residuals.rds
## 2026-05-05 17:48:17.184424 INFO::Writing residuals to file asq8_Latezero/fits/residuals.rds
## 2026-05-05 17:48:17.206108 WARNING::Deleting existing fitted file: asq8_Latezero/fits/fitted.rds
## 2026-05-05 17:48:17.212577 INFO::Writing fitted values to file asq8_Latezero/fits/fitted.rds
## 2026-05-05 17:48:17.227375 WARNING::Deleting existing ranef file: asq8_Latezero/fits/ranef.rds
## 2026-05-05 17:48:17.233104 INFO::Writing extracted random effects to file asq8_Latezero/fits/ranef.rds
## 2026-05-05 17:48:17.24124 INFO::Writing all results to file (ordered by increasing q-values): asq8_Latezero/all_results.tsv
## 2026-05-05 17:48:17.254845 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-05 17:48:17.263921 INFO::Writing heatmap of significant results to file: asq8_Latezero/heatmap.pdf
## 2026-05-05 17:48:17.411701 INFO::Writing association plots (one for each significant association) to output folder: asq8_Latezero
## 2026-05-05 17:48:17.424072 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-05 17:48:17.42868 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-05 17:48:17.436077 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:18.103575 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:18.570361 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:19.021634 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:19.415778 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:19.880878 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:20.420805 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:21.094054 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:21.634847 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:22.109193 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:22.660372 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:23.281246 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:24.046504 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:24.54628 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:25.050269 INFO::Creating scatter plot for continuous data, Timepoint vs Streptococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:25.525626 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnoclostridium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:26.226722 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:27.279285 INFO::Creating scatter plot for continuous data, Timepoint vs Alistipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:28.361114 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:29.364364 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:30.120465 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:30.751892 INFO::Creating scatter plot for continuous data, Timepoint vs Butyricicoccus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:31.368607 INFO::Creating scatter plot for continuous data, Timepoint vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:32.010235 INFO::Creating scatter plot for continuous data, Timepoint vs Haemophilus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:32.79857 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_torques_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:33.553142 INFO::Creating scatter plot for continuous data, Timepoint vs Erysipelatoclostridium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:34.078947 INFO::Creating scatter plot for continuous data, Timepoint vs Sellimonas
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:34.817205 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:35.732371 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-05 17:48:44.375599 INFO::Plotting data for metadata number 2, SeqDepth
## 2026-05-05 17:48:44.390806 INFO::Creating scatter plot for continuous data, SeqDepth vs Ruminococcaceae_UCG.013
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:44.9028 INFO::Creating scatter plot for continuous data, SeqDepth vs Other
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:48:45.416596 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-05 17:48:47.986148 INFO::Plotting data for metadata number 3, GA_weeks
## 2026-05-05 17:48:47.994396 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-05 17:49:06.781069 INFO::Writing function arguments to log file
## 2026-05-05 17:49:06.831292 INFO::Verifying options selected are valid
## 2026-05-05 17:49:06.834672 INFO::Determining format of input files
## 2026-05-05 17:49:06.841688 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-05 17:49:06.863314 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-05 17:49:06.867391 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-05 17:49:06.872157 INFO::Filter data based on min abundance and min prevalence
## 2026-05-05 17:49:06.876055 INFO::Total samples in data: 383
## 2026-05-05 17:49:06.88003 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-05 17:49:06.887939 INFO::Total filtered features: 0
## 2026-05-05 17:49:06.891716 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-05 17:49:06.897489 INFO::Total filtered features with variance filtering: 0
## 2026-05-05 17:49:06.900232 INFO::Filtered feature names from variance filtering:
## 2026-05-05 17:49:06.904588 INFO::Running selected normalization method: NONE
## 2026-05-05 17:49:06.908033 INFO::Applying z-score to standardize continuous metadata
## 2026-05-05 17:49:06.923658 INFO::Running selected transform method: NONE
## 2026-05-05 17:49:06.927921 INFO::Running selected analysis method: LM
## 2026-05-05 17:49:06.934539 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-05 17:49:07.117428 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## 2026-05-05 17:49:07.300081 INFO::Fitting model to feature number 3, Eubacterium_hallii_group
## boundary (singular) fit: see help('isSingular')
## 2026-05-05 17:49:07.398069 INFO::Fitting model to feature number 4, Ruminococcus_gnavus_group
## 2026-05-05 17:49:07.494789 INFO::Fitting model to feature number 5, Ruminococcus_torques_group
## 2026-05-05 17:49:07.605133 INFO::Fitting model to feature number 6, Actinomyces
## 2026-05-05 17:49:07.712457 INFO::Fitting model to feature number 7, Akkermansia
## 2026-05-05 17:49:07.846922 INFO::Fitting model to feature number 8, Anaerostipes
## 2026-05-05 17:49:07.979814 INFO::Fitting model to feature number 9, Bacteroides
## 2026-05-05 17:49:08.122633 INFO::Fitting model to feature number 10, Bifidobacterium
## 2026-05-05 17:49:08.334115 INFO::Fitting model to feature number 11, Blautia
## 2026-05-05 17:49:08.529629 INFO::Fitting model to feature number 12, Butyricicoccus
## 2026-05-05 17:49:08.728826 INFO::Fitting model to feature number 13, Clostridioides
## 2026-05-05 17:49:08.920969 INFO::Fitting model to feature number 14, Clostridium_sensu_stricto_1
## 2026-05-05 17:49:09.042106 INFO::Fitting model to feature number 15, Collinsella
## 2026-05-05 17:49:09.195012 INFO::Fitting model to feature number 16, Dorea
## 2026-05-05 17:49:09.31995 INFO::Fitting model to feature number 17, Eggerthella
## 2026-05-05 17:49:09.454324 INFO::Fitting model to feature number 18, Enterococcus
## 2026-05-05 17:49:09.579818 INFO::Fitting model to feature number 19, Erysipelatoclostridium
## 2026-05-05 17:49:09.720862 INFO::Fitting model to feature number 20, Faecalibacterium
## 2026-05-05 17:49:09.856523 INFO::Fitting model to feature number 21, Flavonifractor
## 2026-05-05 17:49:09.970613 INFO::Fitting model to feature number 22, Fusicatenibacter
## 2026-05-05 17:49:10.109385 INFO::Fitting model to feature number 23, Haemophilus
## 2026-05-05 17:49:10.314494 INFO::Fitting model to feature number 24, Intestinibacter
## 2026-05-05 17:49:10.42245 INFO::Fitting model to feature number 25, Lachnoclostridium
## 2026-05-05 17:49:10.585875 INFO::Fitting model to feature number 26, Lachnospira
## 2026-05-05 17:49:10.71897 INFO::Fitting model to feature number 27, Lachnospiraceae_NK4A136_group
## 2026-05-05 17:49:10.847414 INFO::Fitting model to feature number 28, Lachnospiraceae_UCG.004
## 2026-05-05 17:49:10.95943 INFO::Fitting model to feature number 29, Lactobacillus
## 2026-05-05 17:49:11.074319 INFO::Fitting model to feature number 30, Megasphaera
## 2026-05-05 17:49:11.261763 INFO::Fitting model to feature number 31, Parabacteroides
## 2026-05-05 17:49:11.387653 INFO::Fitting model to feature number 32, Roseburia
## 2026-05-05 17:49:11.496793 INFO::Fitting model to feature number 33, Ruminococcaceae_UCG.013
## 2026-05-05 17:49:11.604737 INFO::Fitting model to feature number 34, Sellimonas
## 2026-05-05 17:49:11.738373 INFO::Fitting model to feature number 35, Senegalimassilia
## 2026-05-05 17:49:11.860775 INFO::Fitting model to feature number 36, Streptococcus
## 2026-05-05 17:49:11.967503 INFO::Fitting model to feature number 37, Subdoligranulum
## 2026-05-05 17:49:12.078645 INFO::Fitting model to feature number 38, Sutterella
## 2026-05-05 17:49:12.220016 INFO::Fitting model to feature number 39, Tyzzerella_4
## 2026-05-05 17:49:12.371654 INFO::Fitting model to feature number 40, uncultured
## 2026-05-05 17:49:12.53205 INFO::Fitting model to feature number 41, Veillonella
## 2026-05-05 17:49:12.651735 INFO::Fitting model to feature number 42, Other
## 2026-05-05 17:49:13.009068 INFO::Counting total values for each feature
## 2026-05-05 17:49:13.043803 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-05 17:49:13.119668 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-05 17:49:13.194666 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-05 17:49:13.294056 WARNING::Deleting existing residuals file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_10000/fits/residuals.rds
## 2026-05-05 17:49:13.302311 INFO::Writing residuals to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_10000/fits/residuals.rds
## 2026-05-05 17:49:13.324864 WARNING::Deleting existing fitted file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_10000/fits/fitted.rds
## 2026-05-05 17:49:13.330879 INFO::Writing fitted values to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_10000/fits/fitted.rds
## 2026-05-05 17:49:13.348749 WARNING::Deleting existing ranef file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_10000/fits/ranef.rds
## 2026-05-05 17:49:13.355083 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-05 17:49:13.36735 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-05 17:49:13.388181 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-05 17:49:13.397425 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-05 17:49:13.574956 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-05 17:49:13.585143 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-05 17:49:13.589578 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-05 17:49:13.598328 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:14.193833 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:14.775529 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:15.349073 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:15.855104 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:16.272892 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:16.735135 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:17.387963 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:18.366779 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:18.905604 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:19.38731 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:20.136146 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:20.624974 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:21.099898 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:21.636563 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:22.21556 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:22.74555 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:23.348164 INFO::Creating scatter plot for continuous data, Timepoint vs Sellimonas
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:23.994568 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:24.720314 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:25.400243 INFO::Creating scatter plot for continuous data, Timepoint vs Haemophilus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:26.031919 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnoclostridium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:26.561315 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:27.039746 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridium_innocuum_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:27.466088 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-05 17:49:33.915815 INFO::Plotting data for metadata number 2, ASQtime_interaction
## 2026-05-05 17:49:33.924517 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-05 17:49:35.078075 INFO::Plotting data for metadata number 3, ASQ_slope
## 2026-05-05 17:49:35.086381 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-05 17:49:36.09053 INFO::Plotting data for metadata number 4, GA_weeks
## 2026-05-05 17:49:36.12543 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-05 17:49:37.391635 INFO::Plotting data for metadata number 5, SeqDepth
## 2026-05-05 17:49:37.399178 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-05 17:49:45.282853 INFO::Writing function arguments to log file
## 2026-05-05 17:49:45.33063 INFO::Verifying options selected are valid
## 2026-05-05 17:49:45.334189 INFO::Determining format of input files
## 2026-05-05 17:49:45.340324 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-05 17:49:45.361625 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-05 17:49:45.365039 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-05 17:49:45.368651 INFO::Filter data based on min abundance and min prevalence
## 2026-05-05 17:49:45.371759 INFO::Total samples in data: 373
## 2026-05-05 17:49:45.37641 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-05 17:49:45.380899 INFO::Total filtered features: 0
## 2026-05-05 17:49:45.383673 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-05 17:49:45.389004 INFO::Total filtered features with variance filtering: 0
## 2026-05-05 17:49:45.392783 INFO::Filtered feature names from variance filtering:
## 2026-05-05 17:49:45.395978 INFO::Running selected normalization method: NONE
## 2026-05-05 17:49:45.398998 INFO::Applying z-score to standardize continuous metadata
## 2026-05-05 17:49:45.416867 INFO::Running selected transform method: NONE
## 2026-05-05 17:49:45.419566 INFO::Running selected analysis method: LM
## 2026-05-05 17:49:45.424221 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-05 17:49:45.514432 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## 2026-05-05 17:49:45.599113 INFO::Fitting model to feature number 3, Eubacterium_hallii_group
## 2026-05-05 17:49:45.691089 INFO::Fitting model to feature number 4, Ruminococcus_gnavus_group
## 2026-05-05 17:49:45.775935 INFO::Fitting model to feature number 5, Ruminococcus_torques_group
## 2026-05-05 17:49:45.875659 INFO::Fitting model to feature number 6, Actinomyces
## 2026-05-05 17:49:45.998168 INFO::Fitting model to feature number 7, Akkermansia
## 2026-05-05 17:49:46.09427 INFO::Fitting model to feature number 8, Anaerostipes
## 2026-05-05 17:49:46.184732 INFO::Fitting model to feature number 9, Bacteroides
## 2026-05-05 17:49:46.271561 INFO::Fitting model to feature number 10, Bifidobacterium
## 2026-05-05 17:49:46.366603 INFO::Fitting model to feature number 11, Blautia
## 2026-05-05 17:49:46.459671 INFO::Fitting model to feature number 12, Butyricicoccus
## 2026-05-05 17:49:46.545661 INFO::Fitting model to feature number 13, Clostridioides
## 2026-05-05 17:49:46.638925 INFO::Fitting model to feature number 14, Clostridium_sensu_stricto_1
## 2026-05-05 17:49:46.728313 INFO::Fitting model to feature number 15, Collinsella
## 2026-05-05 17:49:46.819549 INFO::Fitting model to feature number 16, Dorea
## 2026-05-05 17:49:46.911457 INFO::Fitting model to feature number 17, Eggerthella
## 2026-05-05 17:49:47.001373 INFO::Fitting model to feature number 18, Enterococcus
## 2026-05-05 17:49:47.086137 INFO::Fitting model to feature number 19, Erysipelatoclostridium
## 2026-05-05 17:49:47.171419 INFO::Fitting model to feature number 20, Faecalibacterium
## 2026-05-05 17:49:47.257335 INFO::Fitting model to feature number 21, Flavonifractor
## 2026-05-05 17:49:47.342658 INFO::Fitting model to feature number 22, Fusicatenibacter
## 2026-05-05 17:49:47.433157 INFO::Fitting model to feature number 23, Haemophilus
## 2026-05-05 17:49:47.54317 INFO::Fitting model to feature number 24, Intestinibacter
## 2026-05-05 17:49:47.733399 INFO::Fitting model to feature number 25, Lachnoclostridium
## 2026-05-05 17:49:47.868648 INFO::Fitting model to feature number 26, Lachnospira
## 2026-05-05 17:49:47.984856 INFO::Fitting model to feature number 27, Lachnospiraceae_NK4A136_group
## 2026-05-05 17:49:48.093995 INFO::Fitting model to feature number 28, Lachnospiraceae_UCG.004
## 2026-05-05 17:49:48.244379 INFO::Fitting model to feature number 29, Lactobacillus
## 2026-05-05 17:49:48.360748 INFO::Fitting model to feature number 30, Megasphaera
## 2026-05-05 17:49:48.446132 INFO::Fitting model to feature number 31, Parabacteroides
## 2026-05-05 17:49:48.533196 INFO::Fitting model to feature number 32, Roseburia
## 2026-05-05 17:49:48.647494 INFO::Fitting model to feature number 33, Sellimonas
## 2026-05-05 17:49:48.747055 INFO::Fitting model to feature number 34, Senegalimassilia
## 2026-05-05 17:49:48.829961 INFO::Fitting model to feature number 35, Streptococcus
## 2026-05-05 17:49:48.915021 INFO::Fitting model to feature number 36, Subdoligranulum
## 2026-05-05 17:49:49.001017 INFO::Fitting model to feature number 37, Sutterella
## 2026-05-05 17:49:49.095198 INFO::Fitting model to feature number 38, Tyzzerella_4
## 2026-05-05 17:49:49.180479 INFO::Fitting model to feature number 39, uncultured
## 2026-05-05 17:49:49.265973 INFO::Fitting model to feature number 40, Veillonella
## 2026-05-05 17:49:49.34878 INFO::Fitting model to feature number 41, Other
## 2026-05-05 17:49:49.45184 INFO::Counting total values for each feature
## 2026-05-05 17:49:49.474559 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-05 17:49:49.53235 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-05 17:49:49.588834 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-05 17:49:49.645745 WARNING::Deleting existing residuals file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_20000/fits/residuals.rds
## 2026-05-05 17:49:49.650705 INFO::Writing residuals to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_20000/fits/residuals.rds
## 2026-05-05 17:49:49.668114 WARNING::Deleting existing fitted file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_20000/fits/fitted.rds
## 2026-05-05 17:49:49.675283 INFO::Writing fitted values to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_20000/fits/fitted.rds
## 2026-05-05 17:49:49.693345 WARNING::Deleting existing ranef file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_20000/fits/ranef.rds
## 2026-05-05 17:49:49.699012 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-05 17:49:49.708008 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-05 17:49:49.726089 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-05 17:49:49.73457 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-05 17:49:49.883453 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-05 17:49:49.895999 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-05 17:49:49.899076 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-05 17:49:49.907087 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:50.241502 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:50.610082 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:50.97947 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:51.349567 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:51.791671 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:52.311076 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:52.702726 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:53.206349 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:53.696674 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:54.122406 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:54.512121 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:54.884821 INFO::Creating scatter plot for continuous data, Timepoint vs Sellimonas
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:55.256968 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:55.623137 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:56.020046 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:56.439459 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:56.854206 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:57.266819 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:57.758279 INFO::Creating scatter plot for continuous data, Timepoint vs Haemophilus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:58.188867 INFO::Creating scatter plot for continuous data, Timepoint vs Flavonifractor
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:58.560093 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:59.087569 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:59.473097 INFO::Creating scatter plot for continuous data, Timepoint vs Other
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:49:59.867925 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnoclostridium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:00.252983 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridium_innocuum_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:00.673618 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-05 17:50:06.68373 INFO::Plotting data for metadata number 2, ASQtime_interaction
## 2026-05-05 17:50:06.692742 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-05 17:50:07.736948 INFO::Plotting data for metadata number 3, ASQ_slope
## 2026-05-05 17:50:07.747678 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-05 17:50:08.953414 INFO::Plotting data for metadata number 4, SeqDepth
## 2026-05-05 17:50:08.964286 INFO::Creating scatter plot for continuous data, SeqDepth vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:09.61131 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-05 17:50:11.841973 INFO::Plotting data for metadata number 5, GA_weeks
## 2026-05-05 17:50:11.851005 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-05 17:50:19.7696 INFO::Writing function arguments to log file
## 2026-05-05 17:50:19.8226 INFO::Verifying options selected are valid
## 2026-05-05 17:50:19.826445 INFO::Determining format of input files
## 2026-05-05 17:50:19.833092 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-05 17:50:19.854018 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-05 17:50:19.857254 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-05 17:50:19.861244 INFO::Filter data based on min abundance and min prevalence
## 2026-05-05 17:50:19.865331 INFO::Total samples in data: 360
## 2026-05-05 17:50:19.868659 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-05 17:50:19.873885 INFO::Total filtered features: 0
## 2026-05-05 17:50:19.87661 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-05 17:50:19.88319 INFO::Total filtered features with variance filtering: 0
## 2026-05-05 17:50:19.886346 INFO::Filtered feature names from variance filtering:
## 2026-05-05 17:50:19.889531 INFO::Running selected normalization method: NONE
## 2026-05-05 17:50:19.892841 INFO::Applying z-score to standardize continuous metadata
## 2026-05-05 17:50:19.906331 INFO::Running selected transform method: NONE
## 2026-05-05 17:50:19.90895 INFO::Running selected analysis method: LM
## 2026-05-05 17:50:19.912936 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-05 17:50:20.010436 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## 2026-05-05 17:50:20.100108 INFO::Fitting model to feature number 3, Eubacterium_hallii_group
## boundary (singular) fit: see help('isSingular')
## 2026-05-05 17:50:20.191048 INFO::Fitting model to feature number 4, Ruminococcus_gnavus_group
## 2026-05-05 17:50:20.282027 INFO::Fitting model to feature number 5, Ruminococcus_torques_group
## 2026-05-05 17:50:20.368772 INFO::Fitting model to feature number 6, Actinomyces
## 2026-05-05 17:50:20.453399 INFO::Fitting model to feature number 7, Akkermansia
## 2026-05-05 17:50:20.587121 INFO::Fitting model to feature number 8, Anaerostipes
## 2026-05-05 17:50:20.775076 INFO::Fitting model to feature number 9, Bacteroides
## 2026-05-05 17:50:20.911568 INFO::Fitting model to feature number 10, Bifidobacterium
## 2026-05-05 17:50:21.035556 INFO::Fitting model to feature number 11, Blautia
## 2026-05-05 17:50:21.143605 INFO::Fitting model to feature number 12, Butyricicoccus
## 2026-05-05 17:50:21.227588 INFO::Fitting model to feature number 13, Clostridioides
## 2026-05-05 17:50:21.315528 INFO::Fitting model to feature number 14, Clostridium_sensu_stricto_1
## 2026-05-05 17:50:21.406489 INFO::Fitting model to feature number 15, Collinsella
## 2026-05-05 17:50:21.498566 INFO::Fitting model to feature number 16, Dorea
## 2026-05-05 17:50:21.627272 INFO::Fitting model to feature number 17, Eggerthella
## 2026-05-05 17:50:21.722305 INFO::Fitting model to feature number 18, Enterococcus
## 2026-05-05 17:50:21.815199 INFO::Fitting model to feature number 19, Erysipelatoclostridium
## 2026-05-05 17:50:21.902137 INFO::Fitting model to feature number 20, Faecalibacterium
## 2026-05-05 17:50:21.988457 INFO::Fitting model to feature number 21, Flavonifractor
## 2026-05-05 17:50:22.089114 INFO::Fitting model to feature number 22, Fusicatenibacter
## 2026-05-05 17:50:22.250985 INFO::Fitting model to feature number 23, Haemophilus
## 2026-05-05 17:50:22.361824 INFO::Fitting model to feature number 24, Intestinibacter
## 2026-05-05 17:50:22.451541 INFO::Fitting model to feature number 25, Lachnoclostridium
## 2026-05-05 17:50:22.542779 INFO::Fitting model to feature number 26, Lachnospira
## 2026-05-05 17:50:22.627114 INFO::Fitting model to feature number 27, Lachnospiraceae_NK4A136_group
## 2026-05-05 17:50:22.717491 INFO::Fitting model to feature number 28, Lachnospiraceae_UCG.004
## 2026-05-05 17:50:22.803672 INFO::Fitting model to feature number 29, Lactobacillus
## 2026-05-05 17:50:22.895906 INFO::Fitting model to feature number 30, Megasphaera
## 2026-05-05 17:50:22.981139 INFO::Fitting model to feature number 31, Parabacteroides
## 2026-05-05 17:50:23.065543 INFO::Fitting model to feature number 32, Roseburia
## 2026-05-05 17:50:23.150647 INFO::Fitting model to feature number 33, Senegalimassilia
## 2026-05-05 17:50:23.237715 INFO::Fitting model to feature number 34, Streptococcus
## 2026-05-05 17:50:23.352621 INFO::Fitting model to feature number 35, Subdoligranulum
## 2026-05-05 17:50:23.440579 INFO::Fitting model to feature number 36, Sutterella
## 2026-05-05 17:50:23.527612 INFO::Fitting model to feature number 37, Tyzzerella_4
## 2026-05-05 17:50:23.610754 INFO::Fitting model to feature number 38, uncultured
## 2026-05-05 17:50:23.706693 INFO::Fitting model to feature number 39, Veillonella
## 2026-05-05 17:50:23.794812 INFO::Fitting model to feature number 40, Other
## 2026-05-05 17:50:23.909599 INFO::Counting total values for each feature
## 2026-05-05 17:50:23.929323 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-05 17:50:23.983085 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-05 17:50:24.039467 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-05 17:50:24.094677 WARNING::Deleting existing residuals file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_30000/fits/residuals.rds
## 2026-05-05 17:50:24.100756 INFO::Writing residuals to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_30000/fits/residuals.rds
## 2026-05-05 17:50:24.117004 WARNING::Deleting existing fitted file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_30000/fits/fitted.rds
## 2026-05-05 17:50:24.123309 INFO::Writing fitted values to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_30000/fits/fitted.rds
## 2026-05-05 17:50:24.139081 WARNING::Deleting existing ranef file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_30000/fits/ranef.rds
## 2026-05-05 17:50:24.144254 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-05 17:50:24.152583 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-05 17:50:24.169431 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-05 17:50:24.177261 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-05 17:50:24.299717 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-05 17:50:24.308514 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-05 17:50:24.313658 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-05 17:50:24.320764 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:24.728818 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:25.183605 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:25.700641 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:26.197917 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:26.753205 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:27.075169 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:27.394422 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:27.777697 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:28.142939 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:28.47236 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:28.861931 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:29.231552 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:29.548082 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:29.926365 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:30.252605 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:30.592774 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:30.919857 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:31.291701 INFO::Creating scatter plot for continuous data, Timepoint vs Haemophilus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:31.711676 INFO::Creating scatter plot for continuous data, Timepoint vs Flavonifractor
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:32.208565 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:32.567552 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:32.944805 INFO::Creating scatter plot for continuous data, Timepoint vs Other
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:33.261873 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-05 17:50:37.529822 INFO::Plotting data for metadata number 2, ASQtime_interaction
## 2026-05-05 17:50:37.539556 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-05 17:50:38.414091 INFO::Plotting data for metadata number 3, SeqDepth
## 2026-05-05 17:50:38.443398 INFO::Creating scatter plot for continuous data, SeqDepth vs Subdoligranulum
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:38.938701 INFO::Creating scatter plot for continuous data, SeqDepth vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:39.423812 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-05 17:50:41.545542 INFO::Plotting data for metadata number 4, ASQ_slope
## 2026-05-05 17:50:41.554598 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-05 17:50:42.885977 INFO::Plotting data for metadata number 5, GA_weeks
## 2026-05-05 17:50:42.900145 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-05 17:50:54.183417 INFO::Writing function arguments to log file
## 2026-05-05 17:50:54.250075 INFO::Verifying options selected are valid
## 2026-05-05 17:50:54.255813 INFO::Determining format of input files
## 2026-05-05 17:50:54.262585 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-05 17:50:54.285721 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-05 17:50:54.292409 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-05 17:50:54.29747 INFO::Filter data based on min abundance and min prevalence
## 2026-05-05 17:50:54.301467 INFO::Total samples in data: 350
## 2026-05-05 17:50:54.30575 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-05 17:50:54.312918 INFO::Total filtered features: 0
## 2026-05-05 17:50:54.316212 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-05 17:50:54.323839 INFO::Total filtered features with variance filtering: 0
## 2026-05-05 17:50:54.327714 INFO::Filtered feature names from variance filtering:
## 2026-05-05 17:50:54.331337 INFO::Running selected normalization method: NONE
## 2026-05-05 17:50:54.334391 INFO::Applying z-score to standardize continuous metadata
## 2026-05-05 17:50:54.35153 INFO::Running selected transform method: NONE
## 2026-05-05 17:50:54.355134 INFO::Running selected analysis method: LM
## 2026-05-05 17:50:54.359622 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-05 17:50:54.463369 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## 2026-05-05 17:50:54.556302 INFO::Fitting model to feature number 3, Eubacterium_hallii_group
## boundary (singular) fit: see help('isSingular')
## 2026-05-05 17:50:54.670673 INFO::Fitting model to feature number 4, Ruminococcus_gnavus_group
## 2026-05-05 17:50:54.758982 INFO::Fitting model to feature number 5, Ruminococcus_torques_group
## 2026-05-05 17:50:54.846055 INFO::Fitting model to feature number 6, Actinomyces
## 2026-05-05 17:50:54.976452 INFO::Fitting model to feature number 7, Akkermansia
## 2026-05-05 17:50:55.159621 INFO::Fitting model to feature number 8, Anaerostipes
## 2026-05-05 17:50:55.257244 INFO::Fitting model to feature number 9, Bacteroides
## 2026-05-05 17:50:55.354593 INFO::Fitting model to feature number 10, Bifidobacterium
## 2026-05-05 17:50:55.460349 INFO::Fitting model to feature number 11, Blautia
## 2026-05-05 17:50:55.550991 INFO::Fitting model to feature number 12, Butyricicoccus
## 2026-05-05 17:50:55.64723 INFO::Fitting model to feature number 13, Clostridioides
## 2026-05-05 17:50:55.750705 INFO::Fitting model to feature number 14, Clostridium_sensu_stricto_1
## 2026-05-05 17:50:55.843098 INFO::Fitting model to feature number 15, Collinsella
## 2026-05-05 17:50:55.935264 INFO::Fitting model to feature number 16, Dorea
## 2026-05-05 17:50:56.032374 INFO::Fitting model to feature number 17, Eggerthella
## 2026-05-05 17:50:56.121516 INFO::Fitting model to feature number 18, Enterococcus
## 2026-05-05 17:50:56.213644 INFO::Fitting model to feature number 19, Erysipelatoclostridium
## 2026-05-05 17:50:56.307016 INFO::Fitting model to feature number 20, Faecalibacterium
## 2026-05-05 17:50:56.413515 INFO::Fitting model to feature number 21, Flavonifractor
## 2026-05-05 17:50:56.502136 INFO::Fitting model to feature number 22, Fusicatenibacter
## 2026-05-05 17:50:56.67102 INFO::Fitting model to feature number 23, Haemophilus
## 2026-05-05 17:50:56.791457 INFO::Fitting model to feature number 24, Intestinibacter
## 2026-05-05 17:50:56.89135 INFO::Fitting model to feature number 25, Lachnoclostridium
## 2026-05-05 17:50:57.022254 INFO::Fitting model to feature number 26, Lachnospira
## 2026-05-05 17:50:57.1178 INFO::Fitting model to feature number 27, Lachnospiraceae_NK4A136_group
## 2026-05-05 17:50:57.21348 INFO::Fitting model to feature number 28, Lachnospiraceae_UCG.004
## 2026-05-05 17:50:57.315443 INFO::Fitting model to feature number 29, Lactobacillus
## 2026-05-05 17:50:57.483468 INFO::Fitting model to feature number 30, Megasphaera
## 2026-05-05 17:50:57.579496 INFO::Fitting model to feature number 31, Parabacteroides
## 2026-05-05 17:50:57.673817 INFO::Fitting model to feature number 32, Roseburia
## 2026-05-05 17:50:57.793515 INFO::Fitting model to feature number 33, Sellimonas
## 2026-05-05 17:50:57.908995 INFO::Fitting model to feature number 34, Senegalimassilia
## 2026-05-05 17:50:57.998016 INFO::Fitting model to feature number 35, Streptococcus
## 2026-05-05 17:50:58.081715 INFO::Fitting model to feature number 36, Subdoligranulum
## 2026-05-05 17:50:58.167195 INFO::Fitting model to feature number 37, Sutterella
## 2026-05-05 17:50:58.249247 INFO::Fitting model to feature number 38, Tyzzerella_4
## 2026-05-05 17:50:58.334267 INFO::Fitting model to feature number 39, uncultured
## 2026-05-05 17:50:58.424489 INFO::Fitting model to feature number 40, Veillonella
## 2026-05-05 17:50:58.508122 INFO::Fitting model to feature number 41, Other
## 2026-05-05 17:50:58.612442 INFO::Counting total values for each feature
## 2026-05-05 17:50:58.633693 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-05 17:50:58.693944 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-05 17:50:58.760668 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-05 17:50:58.823267 WARNING::Deleting existing residuals file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_40000/fits/residuals.rds
## 2026-05-05 17:50:58.829206 INFO::Writing residuals to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_40000/fits/residuals.rds
## 2026-05-05 17:50:58.846235 WARNING::Deleting existing fitted file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_40000/fits/fitted.rds
## 2026-05-05 17:50:58.852418 INFO::Writing fitted values to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_40000/fits/fitted.rds
## 2026-05-05 17:50:58.867692 WARNING::Deleting existing ranef file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_40000/fits/ranef.rds
## 2026-05-05 17:50:58.873724 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-05 17:50:58.881755 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-05 17:50:58.898403 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-05 17:50:58.906494 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-05 17:50:59.059645 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-05 17:50:59.071384 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-05 17:50:59.075962 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-05 17:50:59.084807 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:50:59.642736 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:00.24617 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:00.69251 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:01.197361 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:01.582529 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:02.157563 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:02.628146 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:03.120052 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:03.503788 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:03.995018 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:04.492324 INFO::Creating scatter plot for continuous data, Timepoint vs Sellimonas
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:04.926675 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:05.414049 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:05.802522 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:06.20688 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:06.691497 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:07.187936 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:07.552945 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:07.98623 INFO::Creating scatter plot for continuous data, Timepoint vs Haemophilus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:08.530385 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:09.137838 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:09.548548 INFO::Creating scatter plot for continuous data, Timepoint vs Flavonifractor
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:09.972692 INFO::Creating scatter plot for continuous data, Timepoint vs Other
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:10.466734 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-05 17:51:16.456091 INFO::Plotting data for metadata number 2, SeqDepth
## 2026-05-05 17:51:16.46555 INFO::Creating scatter plot for continuous data, SeqDepth vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:16.940957 INFO::Creating scatter plot for continuous data, SeqDepth vs Subdoligranulum
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:17.413222 INFO::Creating scatter plot for continuous data, SeqDepth vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:17.907211 INFO::Creating scatter plot for continuous data, SeqDepth vs Butyricicoccus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:18.380541 INFO::Creating scatter plot for continuous data, SeqDepth vs Akkermansia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:18.868264 INFO::Creating scatter plot for continuous data, SeqDepth vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:19.361299 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-05 17:51:24.130527 INFO::Plotting data for metadata number 3, ASQ_slope
## 2026-05-05 17:51:24.138319 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-05 17:51:25.054785 INFO::Plotting data for metadata number 4, ASQtime_interaction
## 2026-05-05 17:51:25.061376 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-05 17:51:25.97771 INFO::Plotting data for metadata number 5, GA_weeks
## 2026-05-05 17:51:25.988489 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-05 17:51:49.078846 INFO::Writing function arguments to log file
## 2026-05-05 17:51:49.140299 INFO::Verifying options selected are valid
## 2026-05-05 17:51:49.145097 INFO::Determining format of input files
## 2026-05-05 17:51:49.152064 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-05 17:51:49.176187 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-05 17:51:49.181077 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-05 17:51:49.185317 INFO::Filter data based on min abundance and min prevalence
## 2026-05-05 17:51:49.189085 INFO::Total samples in data: 343
## 2026-05-05 17:51:49.192777 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-05 17:51:49.198541 INFO::Total filtered features: 0
## 2026-05-05 17:51:49.201809 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-05 17:51:49.210585 INFO::Total filtered features with variance filtering: 0
## 2026-05-05 17:51:49.214647 INFO::Filtered feature names from variance filtering:
## 2026-05-05 17:51:49.218886 INFO::Running selected normalization method: NONE
## 2026-05-05 17:51:49.223417 INFO::Applying z-score to standardize continuous metadata
## 2026-05-05 17:51:49.255791 INFO::Running selected transform method: NONE
## 2026-05-05 17:51:49.260525 INFO::Running selected analysis method: LM
## 2026-05-05 17:51:49.268345 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-05 17:51:49.488531 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## 2026-05-05 17:51:49.659506 INFO::Fitting model to feature number 3, Eubacterium_hallii_group
## boundary (singular) fit: see help('isSingular')
## 2026-05-05 17:51:49.801186 INFO::Fitting model to feature number 4, Ruminococcus_gnavus_group
## 2026-05-05 17:51:49.919078 INFO::Fitting model to feature number 5, Ruminococcus_torques_group
## 2026-05-05 17:51:50.046233 INFO::Fitting model to feature number 6, Actinomyces
## 2026-05-05 17:51:50.25953 INFO::Fitting model to feature number 7, Akkermansia
## 2026-05-05 17:51:50.394529 INFO::Fitting model to feature number 8, Anaerostipes
## 2026-05-05 17:51:50.527567 INFO::Fitting model to feature number 9, Bacteroides
## 2026-05-05 17:51:50.625023 INFO::Fitting model to feature number 10, Bifidobacterium
## 2026-05-05 17:51:50.743003 INFO::Fitting model to feature number 11, Blautia
## 2026-05-05 17:51:50.861217 INFO::Fitting model to feature number 12, Butyricicoccus
## 2026-05-05 17:51:50.961102 INFO::Fitting model to feature number 13, Clostridioides
## 2026-05-05 17:51:51.053731 INFO::Fitting model to feature number 14, Clostridium_sensu_stricto_1
## 2026-05-05 17:51:51.147155 INFO::Fitting model to feature number 15, Collinsella
## 2026-05-05 17:51:51.236023 INFO::Fitting model to feature number 16, Dorea
## 2026-05-05 17:51:51.320201 INFO::Fitting model to feature number 17, Eggerthella
## 2026-05-05 17:51:51.410431 INFO::Fitting model to feature number 18, Enterococcus
## 2026-05-05 17:51:51.498053 INFO::Fitting model to feature number 19, Erysipelatoclostridium
## 2026-05-05 17:51:51.588496 INFO::Fitting model to feature number 20, Faecalibacterium
## 2026-05-05 17:51:51.686147 INFO::Fitting model to feature number 21, Flavonifractor
## 2026-05-05 17:51:51.814886 INFO::Fitting model to feature number 22, Fusicatenibacter
## 2026-05-05 17:51:51.904035 INFO::Fitting model to feature number 23, Haemophilus
## 2026-05-05 17:51:51.992679 INFO::Fitting model to feature number 24, Intestinibacter
## 2026-05-05 17:51:52.09885 INFO::Fitting model to feature number 25, Lachnoclostridium
## 2026-05-05 17:51:52.215591 INFO::Fitting model to feature number 26, Lachnospira
## 2026-05-05 17:51:52.319285 INFO::Fitting model to feature number 27, Lachnospiraceae_UCG.004
## 2026-05-05 17:51:52.492232 INFO::Fitting model to feature number 28, Lactobacillus
## 2026-05-05 17:51:52.667009 INFO::Fitting model to feature number 29, Megasphaera
## 2026-05-05 17:51:52.824773 INFO::Fitting model to feature number 30, Parabacteroides
## 2026-05-05 17:51:52.943163 INFO::Fitting model to feature number 31, Roseburia
## 2026-05-05 17:51:53.051318 INFO::Fitting model to feature number 32, Senegalimassilia
## 2026-05-05 17:51:53.193222 INFO::Fitting model to feature number 33, Streptococcus
## 2026-05-05 17:51:53.341257 INFO::Fitting model to feature number 34, Subdoligranulum
## 2026-05-05 17:51:53.479852 INFO::Fitting model to feature number 35, Sutterella
## 2026-05-05 17:51:53.627437 INFO::Fitting model to feature number 36, Tyzzerella_4
## 2026-05-05 17:51:53.776508 INFO::Fitting model to feature number 37, uncultured
## 2026-05-05 17:51:53.924068 INFO::Fitting model to feature number 38, Veillonella
## 2026-05-05 17:51:54.060143 INFO::Fitting model to feature number 39, Other
## 2026-05-05 17:51:54.201375 INFO::Counting total values for each feature
## 2026-05-05 17:51:54.237371 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-05 17:51:54.322352 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-05 17:51:54.400492 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-05 17:51:54.481514 WARNING::Deleting existing residuals file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_50000/fits/residuals.rds
## 2026-05-05 17:51:54.49106 INFO::Writing residuals to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_50000/fits/residuals.rds
## 2026-05-05 17:51:54.512575 WARNING::Deleting existing fitted file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_50000/fits/fitted.rds
## 2026-05-05 17:51:54.520067 INFO::Writing fitted values to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_50000/fits/fitted.rds
## 2026-05-05 17:51:54.539928 WARNING::Deleting existing ranef file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_50000/fits/ranef.rds
## 2026-05-05 17:51:54.547262 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-05 17:51:54.558508 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-05 17:51:54.579982 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-05 17:51:54.5905 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-05 17:51:54.820411 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-05 17:51:54.837086 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-05 17:51:54.842517 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-05 17:51:54.856816 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:55.506551 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:56.143057 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:56.576196 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:57.043648 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:57.472614 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:57.888639 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:58.31441 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:58.697579 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:59.112027 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:59.496473 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:51:59.900244 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:00.390857 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:00.979521 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:01.360682 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:01.741982 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:02.123853 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:02.463986 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:02.834318 INFO::Creating scatter plot for continuous data, Timepoint vs Haemophilus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:03.165332 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:03.544208 INFO::Creating scatter plot for continuous data, Timepoint vs Flavonifractor
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:03.927385 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:04.230475 INFO::Creating scatter plot for continuous data, Timepoint vs Other
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:04.664314 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-05 17:52:10.203661 INFO::Plotting data for metadata number 2, SeqDepth
## 2026-05-05 17:52:10.222836 INFO::Creating scatter plot for continuous data, SeqDepth vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:11.003294 INFO::Creating scatter plot for continuous data, SeqDepth vs Subdoligranulum
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:12.178514 INFO::Creating scatter plot for continuous data, SeqDepth vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:13.130932 INFO::Creating scatter plot for continuous data, SeqDepth vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:14.010109 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-05 17:52:18.562781 INFO::Plotting data for metadata number 3, ASQtime_interaction
## 2026-05-05 17:52:18.57546 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-05 17:52:19.725954 INFO::Plotting data for metadata number 4, ASQ_slope
## 2026-05-05 17:52:19.734526 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-05 17:52:20.74454 INFO::Plotting data for metadata number 5, GA_weeks
## 2026-05-05 17:52:20.751779 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-05 17:52:21.684654 INFO::Plotting data for metadata number 6, BW_infant
## 2026-05-05 17:52:21.696473 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-05 17:52:33.532795 INFO::Writing function arguments to log file
## 2026-05-05 17:52:33.616214 INFO::Verifying options selected are valid
## 2026-05-05 17:52:33.619899 INFO::Determining format of input files
## 2026-05-05 17:52:33.625493 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-05 17:52:33.64254 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-05 17:52:33.649675 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-05 17:52:33.652699 INFO::Filter data based on min abundance and min prevalence
## 2026-05-05 17:52:33.655248 INFO::Total samples in data: 332
## 2026-05-05 17:52:33.657873 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-05 17:52:33.662503 INFO::Total filtered features: 0
## 2026-05-05 17:52:33.665426 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-05 17:52:33.767931 INFO::Total filtered features with variance filtering: 0
## 2026-05-05 17:52:33.77312 INFO::Filtered feature names from variance filtering:
## 2026-05-05 17:52:33.777006 INFO::Running selected normalization method: NONE
## 2026-05-05 17:52:33.780764 INFO::Applying z-score to standardize continuous metadata
## 2026-05-05 17:52:33.801223 INFO::Running selected transform method: NONE
## 2026-05-05 17:52:33.804082 INFO::Running selected analysis method: LM
## 2026-05-05 17:52:33.817966 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-05 17:52:34.312101 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## 2026-05-05 17:52:34.401729 INFO::Fitting model to feature number 3, Eubacterium_hallii_group
## boundary (singular) fit: see help('isSingular')
## 2026-05-05 17:52:34.487412 INFO::Fitting model to feature number 4, Ruminococcus_gnavus_group
## 2026-05-05 17:52:34.573624 INFO::Fitting model to feature number 5, Ruminococcus_torques_group
## 2026-05-05 17:52:34.645727 INFO::Fitting model to feature number 6, Actinomyces
## 2026-05-05 17:52:34.731275 INFO::Fitting model to feature number 7, Akkermansia
## 2026-05-05 17:52:34.838182 INFO::Fitting model to feature number 8, Anaerostipes
## 2026-05-05 17:52:34.921313 INFO::Fitting model to feature number 9, Bacteroides
## 2026-05-05 17:52:35.00632 INFO::Fitting model to feature number 10, Bifidobacterium
## 2026-05-05 17:52:35.07984 INFO::Fitting model to feature number 11, Blautia
## 2026-05-05 17:52:35.160316 INFO::Fitting model to feature number 12, Butyricicoccus
## 2026-05-05 17:52:35.248451 INFO::Fitting model to feature number 13, Clostridioides
## 2026-05-05 17:52:35.326871 INFO::Fitting model to feature number 14, Clostridium_sensu_stricto_1
## 2026-05-05 17:52:35.404704 INFO::Fitting model to feature number 15, Collinsella
## 2026-05-05 17:52:35.480236 INFO::Fitting model to feature number 16, Dorea
## 2026-05-05 17:52:35.564382 INFO::Fitting model to feature number 17, Eggerthella
## 2026-05-05 17:52:35.646042 INFO::Fitting model to feature number 18, Enterococcus
## 2026-05-05 17:52:35.724708 INFO::Fitting model to feature number 19, Erysipelatoclostridium
## 2026-05-05 17:52:35.804194 INFO::Fitting model to feature number 20, Faecalibacterium
## 2026-05-05 17:52:35.882118 INFO::Fitting model to feature number 21, Flavonifractor
## 2026-05-05 17:52:35.96788 INFO::Fitting model to feature number 22, Fusicatenibacter
## 2026-05-05 17:52:36.050284 INFO::Fitting model to feature number 23, Haemophilus
## 2026-05-05 17:52:36.156808 INFO::Fitting model to feature number 24, Intestinibacter
## 2026-05-05 17:52:36.280406 INFO::Fitting model to feature number 25, Lachnoclostridium
## 2026-05-05 17:52:36.432317 INFO::Fitting model to feature number 26, Lachnospira
## 2026-05-05 17:52:36.609682 INFO::Fitting model to feature number 27, Lactobacillus
## 2026-05-05 17:52:36.714148 INFO::Fitting model to feature number 28, Megasphaera
## 2026-05-05 17:52:36.857658 INFO::Fitting model to feature number 29, Parabacteroides
## 2026-05-05 17:52:36.991987 INFO::Fitting model to feature number 30, Roseburia
## 2026-05-05 17:52:37.073992 INFO::Fitting model to feature number 31, Senegalimassilia
## 2026-05-05 17:52:37.160615 INFO::Fitting model to feature number 32, Staphylococcus
## 2026-05-05 17:52:37.24266 INFO::Fitting model to feature number 33, Streptococcus
## 2026-05-05 17:52:37.327361 INFO::Fitting model to feature number 34, Subdoligranulum
## 2026-05-05 17:52:37.41295 INFO::Fitting model to feature number 35, Sutterella
## 2026-05-05 17:52:37.495268 INFO::Fitting model to feature number 36, Tyzzerella_4
## 2026-05-05 17:52:37.579607 INFO::Fitting model to feature number 37, uncultured
## 2026-05-05 17:52:37.657975 INFO::Fitting model to feature number 38, Veillonella
## 2026-05-05 17:52:37.750165 INFO::Fitting model to feature number 39, Other
## 2026-05-05 17:52:37.865276 INFO::Counting total values for each feature
## 2026-05-05 17:52:37.897367 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-05 17:52:37.985167 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-05 17:52:38.040219 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-05 17:52:38.089347 WARNING::Deleting existing residuals file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_60000/fits/residuals.rds
## 2026-05-05 17:52:38.095699 INFO::Writing residuals to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_60000/fits/residuals.rds
## 2026-05-05 17:52:38.111452 WARNING::Deleting existing fitted file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_60000/fits/fitted.rds
## 2026-05-05 17:52:38.116103 INFO::Writing fitted values to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_60000/fits/fitted.rds
## 2026-05-05 17:52:38.128854 WARNING::Deleting existing ranef file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_60000/fits/ranef.rds
## 2026-05-05 17:52:38.133415 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-05 17:52:38.140587 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-05 17:52:38.154884 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-05 17:52:38.16205 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-05 17:52:38.297255 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-05 17:52:38.305274 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-05 17:52:38.309103 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-05 17:52:38.315156 INFO::Creating scatter plot for continuous data, Timepoint vs Staphylococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:38.671266 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:39.20659 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:39.741362 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:40.423513 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:41.019655 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:41.487067 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:42.030363 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:42.38495 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:42.736803 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:43.045905 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:43.396774 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:43.784563 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:44.12892 INFO::Creating scatter plot for continuous data, Timepoint vs Other
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:44.466872 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:44.814447 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:45.167763 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:45.552291 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:45.929962 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:46.288678 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:46.630585 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:46.985591 INFO::Creating scatter plot for continuous data, Timepoint vs Haemophilus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:47.521448 INFO::Creating scatter plot for continuous data, Timepoint vs Flavonifractor
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:47.893823 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-05 17:52:54.036658 INFO::Plotting data for metadata number 2, SeqDepth
## 2026-05-05 17:52:54.045283 INFO::Creating scatter plot for continuous data, SeqDepth vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:54.457412 INFO::Creating scatter plot for continuous data, SeqDepth vs Subdoligranulum
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:54.828217 INFO::Creating scatter plot for continuous data, SeqDepth vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:55.234948 INFO::Creating scatter plot for continuous data, SeqDepth vs Butyricicoccus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:52:55.610421 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-05 17:52:57.868201 INFO::Plotting data for metadata number 3, ASQtime_interaction
## 2026-05-05 17:52:57.874942 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-05 17:52:58.85812 INFO::Plotting data for metadata number 4, ASQ_slope
## 2026-05-05 17:52:58.865026 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-05 17:52:59.682683 INFO::Plotting data for metadata number 5, GA_weeks
## 2026-05-05 17:52:59.689663 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-05 17:53:00.592351 INFO::Plotting data for metadata number 6, BW_infant
## 2026-05-05 17:53:00.599608 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-05 17:53:11.499025 INFO::Writing function arguments to log file
## 2026-05-05 17:53:11.547928 INFO::Verifying options selected are valid
## 2026-05-05 17:53:11.551567 INFO::Determining format of input files
## 2026-05-05 17:53:11.557224 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-05 17:53:11.57523 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-05 17:53:11.578501 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-05 17:53:11.581774 INFO::Filter data based on min abundance and min prevalence
## 2026-05-05 17:53:11.584832 INFO::Total samples in data: 322
## 2026-05-05 17:53:11.587797 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-05 17:53:11.592226 INFO::Total filtered features: 0
## 2026-05-05 17:53:11.595773 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-05 17:53:11.601358 INFO::Total filtered features with variance filtering: 0
## 2026-05-05 17:53:11.604221 INFO::Filtered feature names from variance filtering:
## 2026-05-05 17:53:11.607187 INFO::Running selected normalization method: NONE
## 2026-05-05 17:53:11.610459 INFO::Applying z-score to standardize continuous metadata
## 2026-05-05 17:53:11.625256 INFO::Running selected transform method: NONE
## 2026-05-05 17:53:11.629267 INFO::Running selected analysis method: LM
## 2026-05-05 17:53:11.635973 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-05 17:53:11.731379 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## 2026-05-05 17:53:11.81779 INFO::Fitting model to feature number 3, Eubacterium_hallii_group
## boundary (singular) fit: see help('isSingular')
## 2026-05-05 17:53:11.89949 INFO::Fitting model to feature number 4, Ruminococcus_gnavus_group
## 2026-05-05 17:53:11.987672 INFO::Fitting model to feature number 5, Ruminococcus_torques_group
## 2026-05-05 17:53:12.079226 INFO::Fitting model to feature number 6, Actinomyces
## 2026-05-05 17:53:12.161989 INFO::Fitting model to feature number 7, Akkermansia
## 2026-05-05 17:53:12.273134 INFO::Fitting model to feature number 8, Anaerostipes
## 2026-05-05 17:53:12.424714 INFO::Fitting model to feature number 9, Bacteroides
## 2026-05-05 17:53:12.51931 INFO::Fitting model to feature number 10, Bifidobacterium
## 2026-05-05 17:53:12.595919 INFO::Fitting model to feature number 11, Blautia
## 2026-05-05 17:53:12.671977 INFO::Fitting model to feature number 12, Butyricicoccus
## 2026-05-05 17:53:12.75055 INFO::Fitting model to feature number 13, Clostridioides
## 2026-05-05 17:53:12.835684 INFO::Fitting model to feature number 14, Clostridium_sensu_stricto_1
## 2026-05-05 17:53:12.914567 INFO::Fitting model to feature number 15, Collinsella
## 2026-05-05 17:53:12.99217 INFO::Fitting model to feature number 16, Dorea
## 2026-05-05 17:53:13.06956 INFO::Fitting model to feature number 17, Eggerthella
## 2026-05-05 17:53:13.149903 INFO::Fitting model to feature number 18, Enterococcus
## 2026-05-05 17:53:13.230307 INFO::Fitting model to feature number 19, Erysipelatoclostridium
## 2026-05-05 17:53:13.312232 INFO::Fitting model to feature number 20, Faecalibacterium
## 2026-05-05 17:53:13.393754 INFO::Fitting model to feature number 21, Flavonifractor
## 2026-05-05 17:53:13.473578 INFO::Fitting model to feature number 22, Fusicatenibacter
## 2026-05-05 17:53:13.54844 INFO::Fitting model to feature number 23, Haemophilus
## 2026-05-05 17:53:13.629906 INFO::Fitting model to feature number 24, Intestinibacter
## 2026-05-05 17:53:13.702593 INFO::Fitting model to feature number 25, Lachnoclostridium
## 2026-05-05 17:53:13.787636 INFO::Fitting model to feature number 26, Lachnospira
## 2026-05-05 17:53:13.909485 INFO::Fitting model to feature number 27, Lactobacillus
## 2026-05-05 17:53:14.002759 INFO::Fitting model to feature number 28, Megasphaera
## 2026-05-05 17:53:14.095284 INFO::Fitting model to feature number 29, Parabacteroides
## 2026-05-05 17:53:14.220358 INFO::Fitting model to feature number 30, Roseburia
## 2026-05-05 17:53:14.344175 INFO::Fitting model to feature number 31, Senegalimassilia
## 2026-05-05 17:53:14.423187 INFO::Fitting model to feature number 32, Staphylococcus
## 2026-05-05 17:53:14.499279 INFO::Fitting model to feature number 33, Streptococcus
## 2026-05-05 17:53:14.574409 INFO::Fitting model to feature number 34, Subdoligranulum
## 2026-05-05 17:53:14.686063 INFO::Fitting model to feature number 35, Sutterella
## 2026-05-05 17:53:14.830941 INFO::Fitting model to feature number 36, Tyzzerella_4
## 2026-05-05 17:53:14.947164 INFO::Fitting model to feature number 37, uncultured
## 2026-05-05 17:53:15.052261 INFO::Fitting model to feature number 38, Veillonella
## 2026-05-05 17:53:15.14106 INFO::Fitting model to feature number 39, Other
## 2026-05-05 17:53:15.242332 INFO::Counting total values for each feature
## 2026-05-05 17:53:15.261363 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-05 17:53:15.307358 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-05 17:53:15.352478 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-05 17:53:15.396993 WARNING::Deleting existing residuals file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_70000/fits/residuals.rds
## 2026-05-05 17:53:15.402209 INFO::Writing residuals to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_70000/fits/residuals.rds
## 2026-05-05 17:53:15.416955 WARNING::Deleting existing fitted file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_70000/fits/fitted.rds
## 2026-05-05 17:53:15.422881 INFO::Writing fitted values to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_70000/fits/fitted.rds
## 2026-05-05 17:53:15.438613 WARNING::Deleting existing ranef file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_70000/fits/ranef.rds
## 2026-05-05 17:53:15.445469 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-05 17:53:15.453514 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-05 17:53:15.47 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-05 17:53:15.47895 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-05 17:53:15.601024 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-05 17:53:15.608749 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-05 17:53:15.611538 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-05 17:53:15.617607 INFO::Creating scatter plot for continuous data, Timepoint vs Staphylococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:15.932263 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:16.383482 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:16.736219 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:17.107997 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:17.452067 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:17.803568 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:18.24829 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:18.726697 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:19.099243 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:19.428084 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:19.840424 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:20.365607 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:20.760239 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:21.114169 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:21.484617 INFO::Creating scatter plot for continuous data, Timepoint vs Other
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:21.85042 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:22.214488 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:22.637175 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:22.939311 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:23.290442 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:23.710282 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:24.121541 INFO::Creating scatter plot for continuous data, Timepoint vs Haemophilus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:24.531767 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-05 17:53:29.454854 INFO::Plotting data for metadata number 2, SeqDepth
## 2026-05-05 17:53:29.461835 INFO::Creating scatter plot for continuous data, SeqDepth vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:29.883867 INFO::Creating scatter plot for continuous data, SeqDepth vs Subdoligranulum
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:30.33625 INFO::Creating scatter plot for continuous data, SeqDepth vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:30.738997 INFO::Creating scatter plot for continuous data, SeqDepth vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:31.302654 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-05 17:53:34.016529 INFO::Plotting data for metadata number 3, ASQtime_interaction
## 2026-05-05 17:53:34.024514 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:34.382295 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-05 17:53:35.661727 INFO::Plotting data for metadata number 4, ASQ_slope
## 2026-05-05 17:53:35.670081 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-05 17:53:36.62097 INFO::Plotting data for metadata number 5, BW_infant
## 2026-05-05 17:53:36.630324 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-05 17:53:37.962988 INFO::Plotting data for metadata number 6, GA_weeks
## 2026-05-05 17:53:37.971435 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-05 17:53:50.532779 INFO::Writing function arguments to log file
## 2026-05-05 17:53:50.581751 INFO::Verifying options selected are valid
## 2026-05-05 17:53:50.585862 INFO::Determining format of input files
## 2026-05-05 17:53:50.592462 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-05 17:53:50.614644 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-05 17:53:50.618558 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-05 17:53:50.623829 INFO::Filter data based on min abundance and min prevalence
## 2026-05-05 17:53:50.627356 INFO::Total samples in data: 308
## 2026-05-05 17:53:50.631385 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-05 17:53:50.637694 INFO::Total filtered features: 0
## 2026-05-05 17:53:50.64112 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-05 17:53:50.648234 INFO::Total filtered features with variance filtering: 0
## 2026-05-05 17:53:50.651341 INFO::Filtered feature names from variance filtering:
## 2026-05-05 17:53:50.655394 INFO::Running selected normalization method: NONE
## 2026-05-05 17:53:50.65949 INFO::Applying z-score to standardize continuous metadata
## 2026-05-05 17:53:50.674735 INFO::Running selected transform method: NONE
## 2026-05-05 17:53:50.678144 INFO::Running selected analysis method: LM
## 2026-05-05 17:53:50.683692 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-05 17:53:50.794066 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## 2026-05-05 17:53:50.891978 INFO::Fitting model to feature number 3, Eubacterium_hallii_group
## boundary (singular) fit: see help('isSingular')
## 2026-05-05 17:53:50.999405 INFO::Fitting model to feature number 4, Ruminococcus_gnavus_group
## 2026-05-05 17:53:51.09323 INFO::Fitting model to feature number 5, Ruminococcus_torques_group
## 2026-05-05 17:53:51.192841 INFO::Fitting model to feature number 6, Actinomyces
## 2026-05-05 17:53:51.290405 INFO::Fitting model to feature number 7, Akkermansia
## 2026-05-05 17:53:51.394906 INFO::Fitting model to feature number 8, Anaerostipes
## 2026-05-05 17:53:51.503613 INFO::Fitting model to feature number 9, Bacteroides
## 2026-05-05 17:53:51.729461 INFO::Fitting model to feature number 10, Bifidobacterium
## 2026-05-05 17:53:51.840528 INFO::Fitting model to feature number 11, Blautia
## 2026-05-05 17:53:51.938094 INFO::Fitting model to feature number 12, Butyricicoccus
## 2026-05-05 17:53:52.041658 INFO::Fitting model to feature number 13, Clostridioides
## 2026-05-05 17:53:52.137813 INFO::Fitting model to feature number 14, Clostridium_sensu_stricto_1
## 2026-05-05 17:53:52.232834 INFO::Fitting model to feature number 15, Collinsella
## 2026-05-05 17:53:52.340695 INFO::Fitting model to feature number 16, Dorea
## 2026-05-05 17:53:52.43555 INFO::Fitting model to feature number 17, Eggerthella
## 2026-05-05 17:53:52.537726 INFO::Fitting model to feature number 18, Enterococcus
## 2026-05-05 17:53:52.632456 INFO::Fitting model to feature number 19, Erysipelatoclostridium
## 2026-05-05 17:53:52.763767 INFO::Fitting model to feature number 20, Faecalibacterium
## 2026-05-05 17:53:52.890071 INFO::Fitting model to feature number 21, Flavonifractor
## 2026-05-05 17:53:52.991785 INFO::Fitting model to feature number 22, Fusicatenibacter
## 2026-05-05 17:53:53.106585 INFO::Fitting model to feature number 23, Haemophilus
## 2026-05-05 17:53:53.203354 INFO::Fitting model to feature number 24, Intestinibacter
## 2026-05-05 17:53:53.360025 INFO::Fitting model to feature number 25, Lachnoclostridium
## 2026-05-05 17:53:53.52927 INFO::Fitting model to feature number 26, Lachnospira
## 2026-05-05 17:53:53.698852 INFO::Fitting model to feature number 27, Lactobacillus
## 2026-05-05 17:53:53.832313 INFO::Fitting model to feature number 28, Megasphaera
## 2026-05-05 17:53:53.98757 INFO::Fitting model to feature number 29, Parabacteroides
## 2026-05-05 17:53:54.08906 INFO::Fitting model to feature number 30, Roseburia
## 2026-05-05 17:53:54.260792 INFO::Fitting model to feature number 31, Senegalimassilia
## 2026-05-05 17:53:54.392554 INFO::Fitting model to feature number 32, Streptococcus
## 2026-05-05 17:53:54.482356 INFO::Fitting model to feature number 33, Subdoligranulum
## 2026-05-05 17:53:54.576129 INFO::Fitting model to feature number 34, Sutterella
## 2026-05-05 17:53:54.663436 INFO::Fitting model to feature number 35, Tyzzerella_4
## 2026-05-05 17:53:54.754011 INFO::Fitting model to feature number 36, uncultured
## 2026-05-05 17:53:54.847618 INFO::Fitting model to feature number 37, Veillonella
## 2026-05-05 17:53:54.937251 INFO::Fitting model to feature number 38, Other
## 2026-05-05 17:53:55.047629 INFO::Counting total values for each feature
## 2026-05-05 17:53:55.06666 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-05 17:53:55.113445 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-05 17:53:55.163073 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-05 17:53:55.213086 WARNING::Deleting existing residuals file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_80000/fits/residuals.rds
## 2026-05-05 17:53:55.218613 INFO::Writing residuals to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_80000/fits/residuals.rds
## 2026-05-05 17:53:55.232434 WARNING::Deleting existing fitted file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_80000/fits/fitted.rds
## 2026-05-05 17:53:55.237962 INFO::Writing fitted values to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_80000/fits/fitted.rds
## 2026-05-05 17:53:55.254985 WARNING::Deleting existing ranef file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_80000/fits/ranef.rds
## 2026-05-05 17:53:55.261391 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-05 17:53:55.270607 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-05 17:53:55.286042 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-05 17:53:55.295001 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-05 17:53:55.440169 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-05 17:53:55.449127 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-05 17:53:55.453762 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-05 17:53:55.460956 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:55.792002 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:56.236083 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:56.698746 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:57.139055 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:57.574822 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:57.907316 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:58.292704 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:58.657704 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:59.190368 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:59.588137 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:53:59.958191 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:00.340389 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:00.705669 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:01.096175 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:01.419659 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:01.804356 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:02.143809 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:02.508408 INFO::Creating scatter plot for continuous data, Timepoint vs Flavonifractor
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:02.844797 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:03.183892 INFO::Creating scatter plot for continuous data, Timepoint vs Haemophilus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:03.540544 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:03.913569 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-05 17:54:09.226173 INFO::Plotting data for metadata number 2, SeqDepth
## 2026-05-05 17:54:09.232839 INFO::Creating scatter plot for continuous data, SeqDepth vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:09.57845 INFO::Creating scatter plot for continuous data, SeqDepth vs Subdoligranulum
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:10.261239 INFO::Creating scatter plot for continuous data, SeqDepth vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:10.725264 INFO::Creating scatter plot for continuous data, SeqDepth vs Akkermansia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:11.11232 INFO::Creating scatter plot for continuous data, SeqDepth vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:11.546786 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-05 17:54:14.681541 INFO::Plotting data for metadata number 3, ASQtime_interaction
## 2026-05-05 17:54:14.692184 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:26.427957 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-05 17:54:28.772371 INFO::Plotting data for metadata number 4, ASQ_slope
## 2026-05-05 17:54:28.784043 INFO::Creating scatter plot for continuous data, ASQ_slope vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:29.557469 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-05 17:54:32.326384 INFO::Plotting data for metadata number 5, BW_infant
## 2026-05-05 17:54:32.340239 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-05 17:54:34.030031 INFO::Plotting data for metadata number 6, GA_weeks
## 2026-05-05 17:54:34.102981 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-05 17:54:47.370284 INFO::Writing function arguments to log file
## 2026-05-05 17:54:47.426955 INFO::Verifying options selected are valid
## 2026-05-05 17:54:47.431884 INFO::Determining format of input files
## 2026-05-05 17:54:47.439122 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-05 17:54:47.466801 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-05 17:54:47.471995 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-05 17:54:47.476942 INFO::Filter data based on min abundance and min prevalence
## 2026-05-05 17:54:47.481798 INFO::Total samples in data: 299
## 2026-05-05 17:54:47.486368 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-05 17:54:47.493086 INFO::Total filtered features: 0
## 2026-05-05 17:54:47.496933 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-05 17:54:47.505947 INFO::Total filtered features with variance filtering: 0
## 2026-05-05 17:54:47.510205 INFO::Filtered feature names from variance filtering:
## 2026-05-05 17:54:47.515208 INFO::Running selected normalization method: NONE
## 2026-05-05 17:54:47.520013 INFO::Applying z-score to standardize continuous metadata
## 2026-05-05 17:54:47.536489 INFO::Running selected transform method: NONE
## 2026-05-05 17:54:47.540172 INFO::Running selected analysis method: LM
## 2026-05-05 17:54:47.546576 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-05 17:54:47.707702 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## 2026-05-05 17:54:47.799834 INFO::Fitting model to feature number 3, Eubacterium_hallii_group
## boundary (singular) fit: see help('isSingular')
## 2026-05-05 17:54:47.891778 INFO::Fitting model to feature number 4, Ruminococcus_gnavus_group
## 2026-05-05 17:54:47.982241 INFO::Fitting model to feature number 5, Ruminococcus_torques_group
## 2026-05-05 17:54:48.066491 INFO::Fitting model to feature number 6, Actinomyces
## 2026-05-05 17:54:48.168432 INFO::Fitting model to feature number 7, Akkermansia
## 2026-05-05 17:54:48.282442 INFO::Fitting model to feature number 8, Anaerostipes
## 2026-05-05 17:54:48.380853 INFO::Fitting model to feature number 9, Bacteroides
## 2026-05-05 17:54:48.480549 INFO::Fitting model to feature number 10, Bifidobacterium
## 2026-05-05 17:54:48.591579 INFO::Fitting model to feature number 11, Blautia
## 2026-05-05 17:54:48.69593 INFO::Fitting model to feature number 12, Butyricicoccus
## 2026-05-05 17:54:48.796145 INFO::Fitting model to feature number 13, Clostridioides
## 2026-05-05 17:54:48.930368 INFO::Fitting model to feature number 14, Clostridium_sensu_stricto_1
## 2026-05-05 17:54:49.020097 INFO::Fitting model to feature number 15, Collinsella
## 2026-05-05 17:54:49.103909 INFO::Fitting model to feature number 16, Dorea
## 2026-05-05 17:54:49.195445 INFO::Fitting model to feature number 17, Eggerthella
## 2026-05-05 17:54:49.275572 INFO::Fitting model to feature number 18, Enterococcus
## 2026-05-05 17:54:49.347684 INFO::Fitting model to feature number 19, Erysipelatoclostridium
## 2026-05-05 17:54:49.435335 INFO::Fitting model to feature number 20, Faecalibacterium
## 2026-05-05 17:54:49.526896 INFO::Fitting model to feature number 21, Flavonifractor
## 2026-05-05 17:54:49.624481 INFO::Fitting model to feature number 22, Fusicatenibacter
## 2026-05-05 17:54:49.730057 INFO::Fitting model to feature number 23, Haemophilus
## 2026-05-05 17:54:49.831715 INFO::Fitting model to feature number 24, Intestinibacter
## 2026-05-05 17:54:49.930167 INFO::Fitting model to feature number 25, Lachnoclostridium
## 2026-05-05 17:54:50.025169 INFO::Fitting model to feature number 26, Lachnospira
## 2026-05-05 17:54:50.152839 INFO::Fitting model to feature number 27, Lactobacillus
## 2026-05-05 17:54:50.296182 INFO::Fitting model to feature number 28, Megasphaera
## 2026-05-05 17:54:50.384805 INFO::Fitting model to feature number 29, Parabacteroides
## 2026-05-05 17:54:50.481377 INFO::Fitting model to feature number 30, Roseburia
## 2026-05-05 17:54:50.567437 INFO::Fitting model to feature number 31, Senegalimassilia
## 2026-05-05 17:54:50.655245 INFO::Fitting model to feature number 32, Streptococcus
## 2026-05-05 17:54:50.769083 INFO::Fitting model to feature number 33, Subdoligranulum
## 2026-05-05 17:54:50.856742 INFO::Fitting model to feature number 34, Sutterella
## 2026-05-05 17:54:50.942289 INFO::Fitting model to feature number 35, Tyzzerella_4
## 2026-05-05 17:54:51.033843 INFO::Fitting model to feature number 36, uncultured
## 2026-05-05 17:54:51.120379 INFO::Fitting model to feature number 37, Veillonella
## 2026-05-05 17:54:51.25476 INFO::Fitting model to feature number 38, Other
## 2026-05-05 17:54:51.399345 INFO::Counting total values for each feature
## 2026-05-05 17:54:51.417784 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-05 17:54:51.467283 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-05 17:54:51.511576 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-05 17:54:51.560958 WARNING::Deleting existing residuals file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_90000/fits/residuals.rds
## 2026-05-05 17:54:51.567331 INFO::Writing residuals to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_90000/fits/residuals.rds
## 2026-05-05 17:54:51.582207 WARNING::Deleting existing fitted file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_90000/fits/fitted.rds
## 2026-05-05 17:54:51.588718 INFO::Writing fitted values to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_90000/fits/fitted.rds
## 2026-05-05 17:54:51.603794 WARNING::Deleting existing ranef file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_90000/fits/ranef.rds
## 2026-05-05 17:54:51.60917 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-05 17:54:51.616752 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-05 17:54:51.630389 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-05 17:54:51.638364 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-05 17:54:51.795034 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-05 17:54:51.806034 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-05 17:54:51.810428 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-05 17:54:51.818519 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:52.261382 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:52.732174 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:53.127204 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:53.656053 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:54.168119 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:54.617108 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:54.991234 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:55.327911 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:55.736123 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:56.150755 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:56.513587 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:56.881207 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:57.247701 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:57.649904 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:58.070955 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:58.406216 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:58.729702 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:59.175094 INFO::Creating scatter plot for continuous data, Timepoint vs Flavonifractor
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:54:59.642088 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:00.059393 INFO::Creating scatter plot for continuous data, Timepoint vs Haemophilus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:00.439439 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-05 17:55:05.156275 INFO::Plotting data for metadata number 2, SeqDepth
## 2026-05-05 17:55:05.191059 INFO::Creating scatter plot for continuous data, SeqDepth vs Subdoligranulum
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:05.502362 INFO::Creating scatter plot for continuous data, SeqDepth vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:05.917396 INFO::Creating scatter plot for continuous data, SeqDepth vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:06.379013 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-05 17:55:08.614817 INFO::Plotting data for metadata number 3, ASQtime_interaction
## 2026-05-05 17:55:08.62293 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:08.927952 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-05 17:55:10.229094 INFO::Plotting data for metadata number 4, ASQ_slope
## 2026-05-05 17:55:10.242815 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-05 17:55:11.235458 INFO::Plotting data for metadata number 5, BW_infant
## 2026-05-05 17:55:11.242064 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-05 17:55:12.069595 INFO::Plotting data for metadata number 6, GA_weeks
## 2026-05-05 17:55:12.077111 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-05 17:55:23.383291 INFO::Writing function arguments to log file
## 2026-05-05 17:55:23.434305 INFO::Verifying options selected are valid
## 2026-05-05 17:55:23.438263 INFO::Determining format of input files
## 2026-05-05 17:55:23.444342 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-05 17:55:23.468532 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-05 17:55:23.472519 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-05 17:55:23.47684 INFO::Filter data based on min abundance and min prevalence
## 2026-05-05 17:55:23.4803 INFO::Total samples in data: 285
## 2026-05-05 17:55:23.484203 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-05 17:55:23.490095 INFO::Total filtered features: 0
## 2026-05-05 17:55:23.494261 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-05 17:55:23.500879 INFO::Total filtered features with variance filtering: 0
## 2026-05-05 17:55:23.504564 INFO::Filtered feature names from variance filtering:
## 2026-05-05 17:55:23.508361 INFO::Running selected normalization method: NONE
## 2026-05-05 17:55:23.512465 INFO::Applying z-score to standardize continuous metadata
## 2026-05-05 17:55:23.528238 INFO::Running selected transform method: NONE
## 2026-05-05 17:55:23.532111 INFO::Running selected analysis method: LM
## 2026-05-05 17:55:23.537228 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-05 17:55:23.6505 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## boundary (singular) fit: see help('isSingular')
## 2026-05-05 17:55:23.74695 INFO::Fitting model to feature number 3, Ruminococcus_gnavus_group
## 2026-05-05 17:55:23.848493 INFO::Fitting model to feature number 4, Ruminococcus_torques_group
## 2026-05-05 17:55:23.983414 INFO::Fitting model to feature number 5, Actinomyces
## 2026-05-05 17:55:24.102687 INFO::Fitting model to feature number 6, Akkermansia
## 2026-05-05 17:55:24.198098 INFO::Fitting model to feature number 7, Anaerostipes
## 2026-05-05 17:55:24.294412 INFO::Fitting model to feature number 8, Bacteroides
## 2026-05-05 17:55:24.387506 INFO::Fitting model to feature number 9, Bifidobacterium
## 2026-05-05 17:55:24.522766 INFO::Fitting model to feature number 10, Blautia
## 2026-05-05 17:55:24.709514 INFO::Fitting model to feature number 11, Butyricicoccus
## 2026-05-05 17:55:24.798251 INFO::Fitting model to feature number 12, Clostridioides
## 2026-05-05 17:55:24.915276 INFO::Fitting model to feature number 13, Clostridium_sensu_stricto_1
## 2026-05-05 17:55:25.017839 INFO::Fitting model to feature number 14, Collinsella
## 2026-05-05 17:55:25.125825 INFO::Fitting model to feature number 15, Dorea
## 2026-05-05 17:55:25.231933 INFO::Fitting model to feature number 16, Eggerthella
## 2026-05-05 17:55:25.329965 INFO::Fitting model to feature number 17, Enterococcus
## 2026-05-05 17:55:25.429766 INFO::Fitting model to feature number 18, Erysipelatoclostridium
## 2026-05-05 17:55:25.52692 INFO::Fitting model to feature number 19, Faecalibacterium
## 2026-05-05 17:55:25.633224 INFO::Fitting model to feature number 20, Flavonifractor
## 2026-05-05 17:55:25.736375 INFO::Fitting model to feature number 21, Fusicatenibacter
## 2026-05-05 17:55:25.839841 INFO::Fitting model to feature number 22, Haemophilus
## 2026-05-05 17:55:25.953333 INFO::Fitting model to feature number 23, Intestinibacter
## 2026-05-05 17:55:26.041632 INFO::Fitting model to feature number 24, Lachnoclostridium
## 2026-05-05 17:55:26.131906 INFO::Fitting model to feature number 25, Lachnospira
## 2026-05-05 17:55:26.222029 INFO::Fitting model to feature number 26, Lachnospiraceae_UCG.004
## 2026-05-05 17:55:26.315631 INFO::Fitting model to feature number 27, Lactobacillus
## 2026-05-05 17:55:26.482239 INFO::Fitting model to feature number 28, Megasphaera
## 2026-05-05 17:55:26.586031 INFO::Fitting model to feature number 29, Parabacteroides
## 2026-05-05 17:55:26.713322 INFO::Fitting model to feature number 30, Roseburia
## 2026-05-05 17:55:26.873857 INFO::Fitting model to feature number 31, Senegalimassilia
## 2026-05-05 17:55:27.062458 INFO::Fitting model to feature number 32, Staphylococcus
## 2026-05-05 17:55:27.145136 INFO::Fitting model to feature number 33, Streptococcus
## 2026-05-05 17:55:27.225073 INFO::Fitting model to feature number 34, Subdoligranulum
## 2026-05-05 17:55:27.300761 INFO::Fitting model to feature number 35, Sutterella
## 2026-05-05 17:55:27.382232 INFO::Fitting model to feature number 36, Tyzzerella_4
## 2026-05-05 17:55:27.466383 INFO::Fitting model to feature number 37, uncultured
## 2026-05-05 17:55:27.552213 INFO::Fitting model to feature number 38, Veillonella
## 2026-05-05 17:55:27.630553 INFO::Fitting model to feature number 39, Other
## 2026-05-05 17:55:27.727747 INFO::Counting total values for each feature
## 2026-05-05 17:55:27.745831 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-05 17:55:27.787266 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-05 17:55:27.82992 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-05 17:55:27.879311 WARNING::Deleting existing residuals file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_100000/fits/residuals.rds
## 2026-05-05 17:55:27.884961 INFO::Writing residuals to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_100000/fits/residuals.rds
## 2026-05-05 17:55:27.900799 WARNING::Deleting existing fitted file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_100000/fits/fitted.rds
## 2026-05-05 17:55:27.907567 INFO::Writing fitted values to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_100000/fits/fitted.rds
## 2026-05-05 17:55:27.921793 WARNING::Deleting existing ranef file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_100000/fits/ranef.rds
## 2026-05-05 17:55:27.927554 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-05 17:55:27.935204 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-05 17:55:27.950524 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-05 17:55:27.957726 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-05 17:55:28.075543 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-05 17:55:28.084363 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-05 17:55:28.086991 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-05 17:55:28.093097 INFO::Creating scatter plot for continuous data, Timepoint vs Staphylococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:28.357738 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:28.774908 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:29.215019 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:29.567957 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:29.919159 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:30.343952 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:30.71756 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:31.015672 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:31.360021 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:31.662727 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:32.019308 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:32.385967 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:32.741625 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:33.034109 INFO::Creating scatter plot for continuous data, Timepoint vs Other
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:33.364857 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:33.718123 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:34.093307 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:34.506329 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:34.806948 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:35.167734 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:35.540803 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-05 17:55:40.050502 INFO::Plotting data for metadata number 2, SeqDepth
## 2026-05-05 17:55:40.056747 INFO::Creating scatter plot for continuous data, SeqDepth vs Subdoligranulum
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:40.488193 INFO::Creating scatter plot for continuous data, SeqDepth vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:40.856929 INFO::Creating scatter plot for continuous data, SeqDepth vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:41.290795 INFO::Creating scatter plot for continuous data, SeqDepth vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:41.686968 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-05 17:55:44.673297 INFO::Plotting data for metadata number 3, ASQtime_interaction
## 2026-05-05 17:55:44.689385 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:55:45.323051 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-05 17:55:47.426847 INFO::Plotting data for metadata number 4, ASQ_slope
## 2026-05-05 17:55:47.43559 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-05 17:55:48.516507 INFO::Plotting data for metadata number 5, BW_infant
## 2026-05-05 17:55:48.527167 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-05 17:56:10.931334 INFO::Writing function arguments to log file
## 2026-05-05 17:56:10.986997 INFO::Verifying options selected are valid
## 2026-05-05 17:56:10.991465 INFO::Determining format of input files
## 2026-05-05 17:56:10.998179 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-05 17:56:11.023509 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-05 17:56:11.028772 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-05 17:56:11.032673 INFO::Filter data based on min abundance and min prevalence
## 2026-05-05 17:56:11.036875 INFO::Total samples in data: 271
## 2026-05-05 17:56:11.041499 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-05 17:56:11.048579 INFO::Total filtered features: 0
## 2026-05-05 17:56:11.052994 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-05 17:56:11.067262 INFO::Total filtered features with variance filtering: 0
## 2026-05-05 17:56:11.070564 INFO::Filtered feature names from variance filtering:
## 2026-05-05 17:56:11.074043 INFO::Running selected normalization method: NONE
## 2026-05-05 17:56:11.078149 INFO::Applying z-score to standardize continuous metadata
## 2026-05-05 17:56:11.11367 INFO::Running selected transform method: NONE
## 2026-05-05 17:56:11.118045 INFO::Running selected analysis method: LM
## 2026-05-05 17:56:11.128306 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-05 17:56:11.2853 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## boundary (singular) fit: see help('isSingular')
## 2026-05-05 17:56:11.375292 INFO::Fitting model to feature number 3, Ruminococcus_gnavus_group
## 2026-05-05 17:56:11.461548 INFO::Fitting model to feature number 4, Ruminococcus_torques_group
## 2026-05-05 17:56:11.547544 INFO::Fitting model to feature number 5, Actinomyces
## 2026-05-05 17:56:11.64159 INFO::Fitting model to feature number 6, Akkermansia
## 2026-05-05 17:56:11.731372 INFO::Fitting model to feature number 7, Anaerostipes
## 2026-05-05 17:56:11.824306 INFO::Fitting model to feature number 8, Bacteroides
## 2026-05-05 17:56:11.922434 INFO::Fitting model to feature number 9, Bifidobacterium
## 2026-05-05 17:56:12.006626 INFO::Fitting model to feature number 10, Blautia
## 2026-05-05 17:56:12.097394 INFO::Fitting model to feature number 11, Butyricicoccus
## 2026-05-05 17:56:12.181234 INFO::Fitting model to feature number 12, Clostridioides
## 2026-05-05 17:56:12.272314 INFO::Fitting model to feature number 13, Clostridium_sensu_stricto_1
## 2026-05-05 17:56:12.368763 INFO::Fitting model to feature number 14, Collinsella
## 2026-05-05 17:56:12.451808 INFO::Fitting model to feature number 15, Dorea
## 2026-05-05 17:56:12.571836 INFO::Fitting model to feature number 16, Eggerthella
## 2026-05-05 17:56:12.822785 INFO::Fitting model to feature number 17, Enterococcus
## 2026-05-05 17:56:12.964608 INFO::Fitting model to feature number 18, Erysipelatoclostridium
## 2026-05-05 17:56:13.057404 INFO::Fitting model to feature number 19, Faecalibacterium
## 2026-05-05 17:56:13.131829 INFO::Fitting model to feature number 20, Flavonifractor
## 2026-05-05 17:56:13.205492 INFO::Fitting model to feature number 21, Fusicatenibacter
## 2026-05-05 17:56:13.283209 INFO::Fitting model to feature number 22, Haemophilus
## 2026-05-05 17:56:13.357072 INFO::Fitting model to feature number 23, Intestinibacter
## 2026-05-05 17:56:13.429942 INFO::Fitting model to feature number 24, Lachnoclostridium
## 2026-05-05 17:56:13.510117 INFO::Fitting model to feature number 25, Lachnospira
## 2026-05-05 17:56:13.584492 INFO::Fitting model to feature number 26, Lachnospiraceae_UCG.004
## 2026-05-05 17:56:13.659811 INFO::Fitting model to feature number 27, Lactobacillus
## 2026-05-05 17:56:13.734581 INFO::Fitting model to feature number 28, Megasphaera
## 2026-05-05 17:56:13.814788 INFO::Fitting model to feature number 29, Parabacteroides
## 2026-05-05 17:56:13.896956 INFO::Fitting model to feature number 30, Roseburia
## boundary (singular) fit: see help('isSingular')
## 2026-05-05 17:56:13.973637 INFO::Fitting model to feature number 31, Senegalimassilia
## 2026-05-05 17:56:14.047722 INFO::Fitting model to feature number 32, Staphylococcus
## 2026-05-05 17:56:14.128138 INFO::Fitting model to feature number 33, Streptococcus
## 2026-05-05 17:56:14.205761 INFO::Fitting model to feature number 34, Subdoligranulum
## 2026-05-05 17:56:14.278047 INFO::Fitting model to feature number 35, Sutterella
## 2026-05-05 17:56:14.356593 INFO::Fitting model to feature number 36, Tyzzerella_4
## 2026-05-05 17:56:14.43629 INFO::Fitting model to feature number 37, uncultured
## 2026-05-05 17:56:14.526609 INFO::Fitting model to feature number 38, Veillonella
## 2026-05-05 17:56:14.599299 INFO::Fitting model to feature number 39, Other
## 2026-05-05 17:56:14.69185 INFO::Counting total values for each feature
## 2026-05-05 17:56:14.707639 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-05 17:56:14.747536 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-05 17:56:14.789503 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-05 17:56:14.829473 WARNING::Deleting existing residuals file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_110000/fits/residuals.rds
## 2026-05-05 17:56:14.836468 INFO::Writing residuals to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_110000/fits/residuals.rds
## 2026-05-05 17:56:14.850541 WARNING::Deleting existing fitted file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_110000/fits/fitted.rds
## 2026-05-05 17:56:14.855213 INFO::Writing fitted values to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_110000/fits/fitted.rds
## 2026-05-05 17:56:14.868502 WARNING::Deleting existing ranef file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_110000/fits/ranef.rds
## 2026-05-05 17:56:14.873978 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-05 17:56:14.882263 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-05 17:56:14.895917 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-05 17:56:14.903723 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-05 17:56:15.040595 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-05 17:56:15.048927 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-05 17:56:15.052156 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-05 17:56:15.05926 INFO::Creating scatter plot for continuous data, Timepoint vs Staphylococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:15.373804 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:15.770614 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:16.184865 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:16.497525 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:16.873918 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:17.221883 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:17.578064 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:17.919908 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:18.275505 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:18.645894 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:18.994816 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:19.331057 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:19.658711 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:19.989456 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:20.32278 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:20.649373 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:21.019079 INFO::Creating scatter plot for continuous data, Timepoint vs Other
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:21.594178 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:21.980813 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:22.565268 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:22.947637 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-05 17:56:28.332993 INFO::Plotting data for metadata number 2, SeqDepth
## 2026-05-05 17:56:28.342263 INFO::Creating scatter plot for continuous data, SeqDepth vs Subdoligranulum
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:28.759975 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-05 17:56:29.864323 INFO::Plotting data for metadata number 3, ASQtime_interaction
## 2026-05-05 17:56:29.871104 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:30.320427 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-05 17:56:31.471597 INFO::Plotting data for metadata number 4, BW_infant
## 2026-05-05 17:56:31.479715 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-05 17:56:32.340129 INFO::Plotting data for metadata number 5, ASQ_slope
## 2026-05-05 17:56:32.347738 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-05 17:56:43.776613 INFO::Writing function arguments to log file
## 2026-05-05 17:56:43.827461 INFO::Verifying options selected are valid
## 2026-05-05 17:56:43.831395 INFO::Determining format of input files
## 2026-05-05 17:56:43.837745 INFO::Input format is data samples as columns and metadata samples as rows
## 2026-05-05 17:56:43.863369 INFO::Formula for random effects: expr ~ (1 | Deelnemerscode_rem)
## 2026-05-05 17:56:43.867412 INFO::Formula for fixed effects: expr ~  ASQtime_interaction + ASQ_slope + Timepoint + Gender + BW_infant + GA_weeks + SeqDepth
## 2026-05-05 17:56:43.872582 INFO::Filter data based on min abundance and min prevalence
## 2026-05-05 17:56:43.876076 INFO::Total samples in data: 258
## 2026-05-05 17:56:43.880079 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
## 2026-05-05 17:56:43.886418 INFO::Total filtered features: 0
## 2026-05-05 17:56:43.889963 INFO::Filtered feature names from abundance and prevalence filtering:
## 2026-05-05 17:56:43.898595 INFO::Total filtered features with variance filtering: 0
## 2026-05-05 17:56:43.902456 INFO::Filtered feature names from variance filtering:
## 2026-05-05 17:56:43.907379 INFO::Running selected normalization method: NONE
## 2026-05-05 17:56:43.911742 INFO::Applying z-score to standardize continuous metadata
## 2026-05-05 17:56:43.929592 INFO::Running selected transform method: NONE
## 2026-05-05 17:56:43.933129 INFO::Running selected analysis method: LM
## 2026-05-05 17:56:43.938918 INFO::Fitting model to feature number 1, Clostridium_innocuum_group
## 2026-05-05 17:56:44.063038 INFO::Fitting model to feature number 2, Eubacterium_eligens_group
## boundary (singular) fit: see help('isSingular')
## 2026-05-05 17:56:44.282486 INFO::Fitting model to feature number 3, Ruminococcus_gnavus_group
## 2026-05-05 17:56:44.454298 INFO::Fitting model to feature number 4, Ruminococcus_torques_group
## 2026-05-05 17:56:44.645147 INFO::Fitting model to feature number 5, Actinomyces
## 2026-05-05 17:56:44.741517 INFO::Fitting model to feature number 6, Akkermansia
## 2026-05-05 17:56:44.838993 INFO::Fitting model to feature number 7, Anaerostipes
## 2026-05-05 17:56:44.933534 INFO::Fitting model to feature number 8, Bacteroides
## 2026-05-05 17:56:45.05071 INFO::Fitting model to feature number 9, Bifidobacterium
## 2026-05-05 17:56:45.157223 INFO::Fitting model to feature number 10, Blautia
## 2026-05-05 17:56:45.29486 INFO::Fitting model to feature number 11, Butyricicoccus
## 2026-05-05 17:56:45.505129 INFO::Fitting model to feature number 12, Clostridioides
## 2026-05-05 17:56:45.663041 INFO::Fitting model to feature number 13, Clostridium_sensu_stricto_1
## 2026-05-05 17:56:45.824205 INFO::Fitting model to feature number 14, Collinsella
## 2026-05-05 17:56:45.964465 INFO::Fitting model to feature number 15, Dorea
## 2026-05-05 17:56:46.11552 INFO::Fitting model to feature number 16, Eggerthella
## 2026-05-05 17:56:46.233434 INFO::Fitting model to feature number 17, Enterococcus
## 2026-05-05 17:56:46.342151 INFO::Fitting model to feature number 18, Erysipelatoclostridium
## 2026-05-05 17:56:46.450973 INFO::Fitting model to feature number 19, Faecalibacterium
## 2026-05-05 17:56:46.546986 INFO::Fitting model to feature number 20, Flavonifractor
## 2026-05-05 17:56:46.688412 INFO::Fitting model to feature number 21, Fusicatenibacter
## 2026-05-05 17:56:46.85879 INFO::Fitting model to feature number 22, Haemophilus
## 2026-05-05 17:56:46.961428 INFO::Fitting model to feature number 23, Intestinibacter
## 2026-05-05 17:56:47.097494 INFO::Fitting model to feature number 24, Lachnoclostridium
## 2026-05-05 17:56:47.205978 INFO::Fitting model to feature number 25, Lachnospira
## 2026-05-05 17:56:47.30949 INFO::Fitting model to feature number 26, Lachnospiraceae_UCG.004
## 2026-05-05 17:56:47.40925 INFO::Fitting model to feature number 27, Lactobacillus
## 2026-05-05 17:56:47.545442 INFO::Fitting model to feature number 28, Megasphaera
## 2026-05-05 17:56:47.647434 INFO::Fitting model to feature number 29, Parabacteroides
## 2026-05-05 17:56:47.755807 INFO::Fitting model to feature number 30, Roseburia
## boundary (singular) fit: see help('isSingular')
## 2026-05-05 17:56:47.864065 INFO::Fitting model to feature number 31, Senegalimassilia
## 2026-05-05 17:56:47.974974 INFO::Fitting model to feature number 32, Staphylococcus
## 2026-05-05 17:56:48.090137 INFO::Fitting model to feature number 33, Streptococcus
## 2026-05-05 17:56:48.2098 INFO::Fitting model to feature number 34, Subdoligranulum
## 2026-05-05 17:56:48.333056 INFO::Fitting model to feature number 35, Sutterella
## 2026-05-05 17:56:48.45443 INFO::Fitting model to feature number 36, Tyzzerella_4
## 2026-05-05 17:56:48.545052 INFO::Fitting model to feature number 37, uncultured
## 2026-05-05 17:56:48.631441 INFO::Fitting model to feature number 38, Veillonella
## 2026-05-05 17:56:48.719459 INFO::Fitting model to feature number 39, Other
## 2026-05-05 17:56:48.820478 INFO::Counting total values for each feature
## 2026-05-05 17:56:48.84052 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-05 17:56:48.886576 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-05 17:56:48.932532 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-05 17:56:48.9827 WARNING::Deleting existing residuals file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_120000/fits/residuals.rds
## 2026-05-05 17:56:48.988834 INFO::Writing residuals to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_120000/fits/residuals.rds
## 2026-05-05 17:56:49.0049 WARNING::Deleting existing fitted file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_120000/fits/fitted.rds
## 2026-05-05 17:56:49.010661 INFO::Writing fitted values to file C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_120000/fits/fitted.rds
## 2026-05-05 17:56:49.026319 WARNING::Deleting existing ranef file: C:/Users/user/OneDrive/Documents/Mirjam/Research/scripts/PRIDE/asq8_mia_rarefy_120000/fits/ranef.rds
## 2026-05-05 17:56:49.033321 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-05 17:56:49.043293 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-05 17:56:49.063461 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-05 17:56:49.073302 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-05 17:56:49.268793 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-05 17:56:49.279656 INFO::Plotting associations from most to least significant, grouped by metadata
## 2026-05-05 17:56:49.284352 INFO::Plotting data for metadata number 1, Timepoint
## 2026-05-05 17:56:49.293251 INFO::Creating scatter plot for continuous data, Timepoint vs Staphylococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:49.700952 INFO::Creating scatter plot for continuous data, Timepoint vs Faecalibacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:50.259572 INFO::Creating scatter plot for continuous data, Timepoint vs Actinomyces
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:50.645695 INFO::Creating scatter plot for continuous data, Timepoint vs Anaerostipes
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:51.202808 INFO::Creating scatter plot for continuous data, Timepoint vs Blautia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:51.684434 INFO::Creating scatter plot for continuous data, Timepoint vs Senegalimassilia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:52.026939 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridioides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:52.593132 INFO::Creating scatter plot for continuous data, Timepoint vs Eggerthella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:53.064543 INFO::Creating scatter plot for continuous data, Timepoint vs Lactobacillus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:53.504352 INFO::Creating scatter plot for continuous data, Timepoint vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:54.03153 INFO::Creating scatter plot for continuous data, Timepoint vs Roseburia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:54.547782 INFO::Creating scatter plot for continuous data, Timepoint vs Lachnospira
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:54.944231 INFO::Creating scatter plot for continuous data, Timepoint vs Parabacteroides
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:55.429742 INFO::Creating scatter plot for continuous data, Timepoint vs Enterococcus
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:55.799303 INFO::Creating scatter plot for continuous data, Timepoint vs Intestinibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:56.219058 INFO::Creating scatter plot for continuous data, Timepoint vs Collinsella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:56.689435 INFO::Creating scatter plot for continuous data, Timepoint vs Fusicatenibacter
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:57.106167 INFO::Creating scatter plot for continuous data, Timepoint vs Other
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:57.518107 INFO::Creating scatter plot for continuous data, Timepoint vs Megasphaera
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:57.86788 INFO::Creating scatter plot for continuous data, Timepoint vs Ruminococcus_gnavus_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:58.211447 INFO::Creating scatter plot for continuous data, Timepoint vs Dorea
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:58.528245 INFO::Creating scatter plot for continuous data, Timepoint vs Clostridium_innocuum_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:58.860298 INFO::Creating scatter plot for continuous data, Timepoint vs Eubacterium_eligens_group
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:59.262369 INFO::Creating scatter plot for continuous data, Timepoint vs Flavonifractor
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:56:59.650957 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-05 17:57:03.648605 INFO::Plotting data for metadata number 2, SeqDepth
## 2026-05-05 17:57:03.655636 INFO::Creating scatter plot for continuous data, SeqDepth vs Veillonella
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:57:03.928983 INFO::Creating scatter plot for continuous data, SeqDepth vs Subdoligranulum
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:57:04.319628 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-05 17:57:05.725694 INFO::Plotting data for metadata number 3, ASQtime_interaction
## 2026-05-05 17:57:05.732809 INFO::Creating scatter plot for continuous data, ASQtime_interaction vs Akkermansia
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:57:06.030624 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-05 17:57:07.180207 INFO::Plotting data for metadata number 4, BW_infant
## 2026-05-05 17:57:07.187579 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-05 17:57:08.074772 INFO::Plotting data for metadata number 5, ASQ_slope
## 2026-05-05 17:57:08.081523 INFO::Creating scatter plot for continuous data, ASQ_slope vs Bifidobacterium
## `geom_smooth()` using formula = 'y ~ x'
## 2026-05-05 17:57:08.414633 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