Hello, Dear developers!
I encountered a little problem when using anpan.When I was following the example on the anpan website(biobakery/anpan), I found that the sample files in the extdata folder of anpan do not seem to support the execution of the sample scripts.
library(anpan)
anpan_batch(bug_dir = "/path/to/functional_profiles/",
meta_file = "/path/to/metadata.tsv",
out_dir = "/path/to/output",
annotation_file = "/path/to/annotation.tsv", #optional, used for plots
filtering_method = "kmeans",
model_type = "fastglm",
covariates = c("age", "gender"),
outcome = "crc",
plot_ext = "pdf",
save_filter_stats = TRUE)
Then, I consolidated my own data into the sample file format.For example, the annotation abundance table of all sample gene families is split into individual small files according to different species.As shown in the figure:
And my metadata:

And modify the script as follows:
anpan_batch(bug_dir = mybug_dir/,
meta_file = mymeta_file,
out_dir = myout_dir/,
# annotation_file = "/path/to/annotation.tsv", #optional, used for plots
filtering_method = "none",
model_type = "fastglm",
covariates = c("treatment", "part","diarrhea_score","ADG","cardiac_index","liver_index","lung_index","kidney_index"),
outcome = "diarrhea_score",
plot_ext = "pdf",
save_filter_stats = TRUE)
But it just return:
was skipped because no samples passed the filter criteria
Error in `dplyr::relocate()`:
3635 ! Can't select columns that don't exist.
3636 ✖ Column `bug_name` doesn't exist.
Due to the lack of correct and usable examples, I am very confused. Is it because there is something wrong with my data format or is it because my parameter settings are incorrect?
I’m very sorry to disturb you. I hope you can take the time to reply to my question.
Thank you very much!
Best wishes!
