Hi, I keep getting this error while trying to use Maaslin in R:
Error in FUN(newX[, i], ...) : invalid 'type' (character) of argument
I don’t quite understand what I’m doing wrong. I feel like it should work; the sample names are exactly the same for both folders, and I even ran colname == colname to check. I also tried transposing the dataframes and got the same error output.
Here is the code I ran too:
gfr <- read.table("all-samples/function/all-gfr.tsv", sep = '\t', header=TRUE)
colnames(gfr) <- c("Gene Families", "AT-2", "PS-1", "PS-2", "PS-3", "TN-1", "TN-2", "TN-3")
metadata <- read.csv("WPS-2_metagenome_mapping.csv")
colnames(metadata) <- c("Variables", "AT-2", "PS-1", "PS-2", "PS-3", "TN-1", "TN-2", "TN-3")
colnames(metadata) == colnames(gfr)
Maaslin2(input_data = gfr, input_metadata = metadata, output = "all-samples/maaslin")
Attached are images of the dataframe I’ve imported to R.
I also tried removing the first column header (Gene Families and Variables) and I got this error:
Error in `[.data.frame`(metadata, , effects_names, drop = FALSE) :
undefined columns selected
Could someone please help me define my error and what I should do instead to analyse my data? Also, is it possible to use the other HUMANN functional outputs such as path abundances?
What I’m specifically looking to get is a comparison of the gene family abundances between the different samples. What gene families/pathways are found across all samples, and if there are significant differences in the abundances of specific gene families/pathways between different samples.
Thank you and much appreciated.