General FAQs
This document is a collection of frequently asked questions (FAQs) and their solutions regarding the use of the MicrobiomeStat package in R. These FAQs are based on common issues and inquiries encountered by users in the past. For additional questions or if you encounter new issues, please feel free to visit the GitHub issues section of the MicrobiomeStat repository at https://github.com/cafferychen777/MicrobiomeStat/issues, where you can post your questions and receive support from the community and the package developers.
I'm having an issue converting a phyloseq object to a MicrobiomeStat object using mStat_convert_phyloseq_to_data_obj()
mStat_convert_phyloseq_to_data_obj()
Despite installing the latest version of MicrobiomeStat from GitHub, I'm still getting the error "could not find function 'mStat_convert_phyloseq_to_data_obj'". Any suggestions?
Solution:
It appears there may have been an issue with the installation. After downloading and installing, pay attention to the version numbers. The current CRAN version is 1.1, while the GitHub version is 1.1.3. If the installation of the GitHub version is unsuccessful, this issue may arise. Ensure you have installed all necessary dependencies before attempting to install from GitHub:
Then install MicrobiomeStat: devtools::install_github("cafferychen777/MicrobiomeStat")
If issues persist, check for error messages during installation.
Accessing Bray-Curtis distances from generate_beta_ordination_pair
generate_beta_ordination_pair
I successfully plotted Bray-Curtis distance over time, but cannot access the calculated distances. Will this option be included in the future?
Solution:
The distances are accessible in the object generated by generate_beta_ordination_pair
:
We continuously improve MicrobiomeStat and appreciate suggestions for new features.
Difference between generate_beta_ordination_pair
and generate_beta_change_spaghettiplot_long
generate_beta_ordination_pair
and generate_beta_change_spaghettiplot_long
I can get BC distance data with the former but not the latter when dist.name = c("BC")
is included. Are they equivalent?
Solution:
No, the two methods differ:
generate_beta_ordination_pair
uses PC1 and PC2 from multidimensional scaling (MDS)generate_beta_change_spaghettiplot_long
calculates distances relative to original points
To get BC distances from generate_beta_change_spaghettiplot_long
:
Error with generate_beta_test_single()
generate_beta_test_single()
When running the tutorial, I got: Error in colnames<-(*tmp*, value = colnames(lhs)) : attempt to set 'colnames' on an object with less than two dimensions
. Any idea what's happening?
Solution:
This could be due to conflicts/issues with your setup. Try:
Reinstall MicrobiomeStat package
Reinstall GUniFrac package
Ensure latest versions of all dependencies
If issues persist, provide more details on your system and error messages.
Error with generate_alpha_trend_test_long
generate_alpha_trend_test_long
I get Error in vec_data() : ! 'x' must be a vector, not a <sample_data> object
when running this function. Time variable is numeric, any idea what's wrong?
Solution:
The feature.tab
, meta.dat
, and feature.ann
components may not be in expected R matrix/data.frame format. Convert them:
This should ensure the components are in the correct format. Reach out if issues persist.
Error normalizing data with GMPR method
I get Error in GMPR(otu_tab) : could not find function "GMPR"
when trying to normalize using the GMPR method. How to resolve?
Solution:
This error occurs when the required GUniFrac package is not loaded. Load it first:
Then you should be able to normalize using GMPR without the error.
Missing timepoints in generate_taxa_areaplot_long
visualization
generate_taxa_areaplot_long
visualizationI'm missing some timepoints and subject.var
values when visualizing taxa changes across timepoints. My timepoints are 0, 1, 2, 3, 5, 6, 7, 8, 10, 12, 18, 24 (not all present in each sample). Suggestions?
Solution:
Try pairing mStat_subset_data
with generate_taxa_areaplot_long
in a loop to generate plots for each subject:
Modify group.var
as needed to group data by specific variables.
Reason for feature.mt.method
option in generate_taxa_volcano_single()
feature.mt.method
option in generate_taxa_volcano_single()
The linda()
function already accounts for FDR, but generate_taxa_volcano_single()
has a feature.mt.method
option to use "none" or "fdr". Why add another FDR layer?
Solution:
FDR adjustment is crucial for high-dimensional data to control multiple testing issues, which linda()
inherently does.
The feature.mt.method
parameter allows users to choose between adjusted p-values (via FDR) or raw p-values for visualization in the volcano plot. Using raw p-values is for aesthetic reasons to improve plot clarity and interpretability.
While FDR adjustment is integral to MicrobiomeStat's statistical procedures, feature.mt.method
offers flexibility in visualization without compromising statistical rigor.
Issue with Corrupted Lazy-Load Database for MicrobiomeStat Package
Problem: When running functions from the MicrobiomeStat package, the following error is encountered:
Solution:
Restart the R session: This often resolves issues related to the lazy-load database.
Reinstall the MicrobiomeStat package: If restarting the R session does not work, try reinstalling the package using:
If these steps do not resolve the issue, please provide more detailed information for further troubleshooting.
Last updated