Hi all,
I’ve ran into an issue while running maaslin3 and haven’t been able to solve it using other people’s experience. I’d appreciate if I can get some help on this
this is the error I’m getting:
Error in [.data.frame
(metadata, , i) : undefined columns selected
I have replaced any special characters in the column and row names.
here is my code:
taxa_table ← read.table(“t_taxa.txt”,
header = TRUE,
sep = “\t”,
stringsAsFactors = FALSE)
taxa_table$SampleID ← gsub(“-”, “_”, taxa_table$SampleID)
metadata ← read.table(“howlermeta.txt”,
header = TRUE,
sep = “\t”,
stringsAsFactors = FALSE)
metadata$SampleID ← gsub(“-”, “_”, metadata$SampleID)
metadata$Individual ←
factor(metadata$Individual, levels = c(“Dos” , “Hugo”, “Isa”, “Jupiler”, “Melanie”, “Maia”, “Uno”))
metadata$Sex ←
factor(metadata$Sex, levels = c(“Male”,“Female”))
metadata$Season ←
factor(metadata$Season, levels = c( “Dry”, “Intermediate”, “Rain” ))
metadata$Age ←
factor(metadata$Age)
colnames(taxa_table) ← gsub(“\.”, “_”, colnames(taxa_table))
set.seed(1)
fit_out ← maaslin3(input_data = taxa_table ,
input_metadata = metadata,
output = ‘hmp2_output’,
formula = '~ Season + Sex ',
fixed_effects = “Dry”,
normalization = ‘TSS’,
transform = ‘LOG’,
augment = TRUE,
standardize = TRUE,
max_significance = 0.1,
median_comparison_abundance = TRUE,
median_comparison_prevalence = FALSE,
max_pngs = 250,
cores = 1)