-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error with MicrobiomeStat #100
Comments
Hi @saassli21, Thank you for reporting this issue. It appears that the error is being caused by a recent update to the ggplot2 package, rather than an issue with MicrobiomeStat. Downgrading ggplot2 to version 3.4 should resolve the problem. To downgrade:
Please let me know if downgrading ggplot2 fixes the errors you are seeing. If not, feel free to provide some more details and we can troubleshoot further. But my suspicion is that the latest ggplot2 update introduced some breaking changes that are causing conflicts. I appreciate you taking the time to report this - it helps me improve the package. Let me know if you have any other questions! |
thank you for responding what I did first is installing bioconductor envirment using this yml file :
Load required librarieslibrary(readr) Check if 'dplyr' package is installed, and install if notif (!"dplyr" %in% installed.packages()) { library(dplyr) Check if 'ggplot2' package is installed, and install if notif (!"ggplot2" %in% installed.packages()) { library(ggplot2) Check if 'MicrobiomeStat' package is installed, and install if notif (!"MicrobiomeStat" %in% installed.packages()) { library(MicrobiomeStat) Check if 'ggpicrust2' package is installed, and install if notif (!"ggpicrust2" %in% installed.packages()) { library(ggpicrust2) print("START") the output of this script ── Attaching core tidyverse packages ────────────────────────────────────────────────────────────────── tidyverse 2.0.0 ── Attaching package: ‘ggh4x’ The following object is masked from ‘package:ggplot2’:
Attaching package: ‘plotly’ The following object is masked from ‘package:ggplot2’:
The following object is masked from ‘package:stats’:
The following object is masked from ‘package:graphics’:
Loading required package: R.oo Attaching package: ‘R.oo’ The following object is masked from ‘package:R.methodsS3’:
The following objects are masked from ‘package:methods’:
The following objects are masked from ‘package:base’:
R.utils v2.12.2 (2022-11-11 22:00:03 UTC) successfully loaded. See ?R.utils for help. Attaching package: ‘R.utils’ The following object is masked from ‘package:tidyr’:
The following object is masked from ‘package:utils’:
The following objects are masked from ‘package:base’:
Error in contrib.url(repos, type) : as you can see the ggplot2 version installed is 3.5.0 not 3.4.4 :/ The versions that I'm mentioning are the ones that I'm used to using before encountering this new issue. |
@cafferychen777 , could you please help me with this !! |
Hello @saassli21, Thank you for sharing the details of your environment setup. It looks like you're using a Conda environment for your R packages. To ensure that ggplot2 version 3.4.0 is installed in your Conda environment, you can modify your environment YAML file to specify the ggplot2 version. Here's how you can do it:
This should ensure that ggplot2 version 3.4.0 is installed in your Conda environment. If you encounter any issues with this process, please let me know, and we can explore further solutions. |
Thank you very much. It does change my ggplot2 version in the conda environment. However, once I call the other packages, the ggplot2 version becomes 3.5.0. So, here is what I did: Load required librarieslibrary(tibble) Check if 'MicrobiomeStat' package is installed, and install if notif (!"MicrobiomeStat" %in% installed.packages()) { #Check if 'ggpicrust2' package is installed, and install if not library(remotes) Specify the repository URL containing the package version you wantReplace 'repo_url' with the URL of the repositoryrepo_url <- "https://cran.r-project.org/src/contrib/Archive/ggplot2/ggplot2_3.4.4.tar.gz" Install the desired package version from the specified repositoryinstall_url(repo_url) if (!requireNamespace("remotes", quietly = TRUE)) { |
**Hello,
Thank you for you interactivity in advance
I've been using the same script since December 2023, and I've tested it on my dataset. However, after changing my PC and reinstalling the various packages, I encountered an error that appears to be related to MicrobiomeStat ( not sure). It's worth noting that I'm still utilizing the same dataset as before.**
Warning message:
In MicrobiomeStat::linda(abundance, LinDA_metadata_df, formula = "~Group_group_nonsense_", :
Some features have less than 3 nonzero values!
They have virtually no statistical power. You may consider filtering them in the analysis!
We are connecting to the KEGG database to get the latest results, please wait patiently.
The following pathways are missing annotations and have been excluded: ko00072
You can use the 'pathway_annotation' function to add annotations for these pathways.
Registered S3 method overwritten by 'GGally':
method from
+.gg ggplot2
The Sample Names in order from left to right are:
SRR8351974_pass_R1.fastq.gz, SRR8351976_pass_R1.fastq.gz, SRR8351980_pass_R1.fastq.gz, SRR8351983_pass_R1.fastq.gz, SRR8351985_pass_R1.fastq.gz, SRR8351987_pass_R1.fastq.gz, SRR8351988_pass_R1.fastq.gz, SRR8351990_pass_R1.fastq.gz, SRR8351991_pass_R1.fastq.gz, SRR8351992_pass_R1.fastq.gz, SRR8351994_pass_R1.fastq.gz, SRR8351995_pass_R1.fastq.gz, SRR8351996_pass_R1.fastq.gz, SRR8351997_pass_R1.fastq.gz, SRR8351998_pass_R1.fastq.gz, SRR8351999_pass_R1.fastq.gz, SRR8352000_pass_R1.fastq.gz, SRR8352001_pass_R1.fastq.gz, SRR8352002_pass_R1.fastq.gz, SRR8352003_pass_R1.fastq.gz, SRR8352005_pass_R1.fastq.gz, SRR8352009_pass_R1.fastq.gz, SRR8352010_pass_R1.fastq.gz, SRR8352012_pass_R1.fastq.gz, SRR8352013_pass_R1.fastq.gz, SRR8352015_pass_R1.fastq.gz, SRR8352021_pass_R1.fastq.gz, SRR8352022_pass_R1.fastq.gz, SRR8352023_pass_R1.fastq.gz, SRR8352024_pass_R1.fastq.gz, SRR8352026_pass_R1.fastq.gz, SRR8352028_pass_R1.fastq.gz, SRR8352029_pass_R1.fastq.gz, SRR8352030_pass_R1.fastq.gz, SRR8352032_pass_R1.fastq.gz, SRR8352033_pass_R1.fastq.gz, SRR8352035_pass_R1.fastq.gz, SRR8352037_pass_R1.fastq.gz, SRR8352041_pass_R1.fastq.gz, SRR8352045_pass_R1.fastq.gz, SRR8352046_pass_R1.fastq.gz, SRR8352053_pass_R1.fastq.gz, SRR8352056_pass_R1.fastq.gz, SRR8352058_pass_R1.fastq.gz, SRR8352059_pass_R1.fastq.gz, SRR8352060_pass_R1.fastq.gz, SRR8352064_pass_R1.fastq.gz, SRR8352066_pass_R1.fastq.gz, SRR8352068_pass_R1.fastq.gz, SRR8352070_pass_R1.fastq.gz, SRR8352073_pass_R1.fastq.gz, SRR8352075_pass_R1.fastq.gz, SRR8352078_pass_R1.fastq.gz, SRR8352080_pass_R1.fastq.gz, SRR8352082_pass_R1.fastq.gz, SRR8352085_pass_R1.fastq.gz, SRR8352087_pass_R1.fastq.gz, SRR8352089_pass_R1.fastq.gz, SRR8352092_pass_R1.fastq.gz, SRR8352094_pass_R1.fastq.gz, SRR8352097_pass_R1.fastq.gz, SRR8352099_pass_R1.fastq.gz, SRR8352106_pass_R1.fastq.gz, SRR8352107_pass_R1.fastq.gz, SRR8352109_pass_R1.fastq.gz, SRR8352110_pass_R1.fastq.gz, SRR8352112_pass_R1.fastq.gz, SRR8352115_pass_R1.fastq.gz, SRR8352117_pass_R1.fastq.gz, SRR8352119_pass_R1.fastq.gz, SRR8352121_pass_R1.fastq.gz, SRR8352122_pass_R1.fastq.gz, SRR8351975_pass_R1.fastq.gz, SRR8351977_pass_R1.fastq.gz, SRR8351978_pass_R1.fastq.gz, SRR8351979_pass_R1.fastq.gz, SRR8351981_pass_R1.fastq.gz, SRR8351982_pass_R1.fastq.gz, SRR8351984_pass_R1.fastq.gz, SRR8351986_pass_R1.fastq.gz, SRR8351989_pass_R1.fastq.gz, SRR8351993_pass_R1.fastq.gz, SRR8352004_pass_R1.fastq.gz, SRR8352006_pass_R1.fastq.gz, SRR8352007_pass_R1.fastq.gz, SRR8352008_pass_R1.fastq.gz, SRR8352011_pass_R1.fastq.gz, SRR8352014_pass_R1.fastq.gz, SRR8352016_pass_R1.fastq.gz, SRR8352017_pass_R1.fastq.gz, SRR8352018_pass_R1.fastq.gz, SRR8352019_pass_R1.fastq.gz, SRR8352020_pass_R1.fastq.gz, SRR8352025_pass_R1.fastq.gz, SRR8352027_pass_R1.fastq.gz, SRR8352031_pass_R1.fastq.gz, SRR8352034_pass_R1.fastq.gz, SRR8352036_pass_R1.fastq.gz, SRR8352038_pass_R1.fastq.gz, SRR8352039_pass_R1.fastq.gz, SRR8352040_pass_R1.fastq.gz, SRR8352042_pass_R1.fastq.gz, SRR8352043_pass_R1.fastq.gz, SRR8352044_pass_R1.fastq.gz, SRR8352047_pass_R1.fastq.gz, SRR8352048_pass_R1.fastq.gz, SRR8352049_pass_R1.fastq.gz, SRR8352050_pass_R1.fastq.gz, SRR8352051_pass_R1.fastq.gz, SRR8352052_pass_R1.fastq.gz, SRR8352054_pass_R1.fastq.gz, SRR8352055_pass_R1.fastq.gz, SRR8352057_pass_R1.fastq.gz, SRR8352061_pass_R1.fastq.gz, SRR8352062_pass_R1.fastq.gz, SRR8352063_pass_R1.fastq.gz, SRR8352065_pass_R1.fastq.gz, SRR8352067_pass_R1.fastq.gz, SRR8352069_pass_R1.fastq.gz, SRR8352071_pass_R1.fastq.gz, SRR8352072_pass_R1.fastq.gz, SRR8352074_pass_R1.fastq.gz, SRR8352076_pass_R1.fastq.gz, SRR8352077_pass_R1.fastq.gz, SRR8352079_pass_R1.fastq.gz, SRR8352081_pass_R1.fastq.gz, SRR8352083_pass_R1.fastq.gz, SRR8352084_pass_R1.fastq.gz, SRR8352086_pass_R1.fastq.gz, SRR8352088_pass_R1.fastq.gz, SRR8352090_pass_R1.fastq.gz, SRR8352091_pass_R1.fastq.gz, SRR8352093_pass_R1.fastq.gz, SRR8352095_pass_R1.fastq.gz, SRR8352096_pass_R1.fastq.gz, SRR8352098_pass_R1.fastq.gz, SRR8352100_pass_R1.fastq.gz, SRR8352101_pass_R1.fastq.gz, SRR8352102_pass_R1.fastq.gz, SRR8352103_pass_R1.fastq.gz, SRR8352104_pass_R1.fastq.gz, SRR8352105_pass_R1.fastq.gz, SRR8352108_pass_R1.fastq.gz, SRR8352111_pass_R1.fastq.gz, SRR8352113_pass_R1.fastq.gz, SRR8352114_pass_R1.fastq.gz, SRR8352116_pass_R1.fastq.gz, SRR8352118_pass_R1.fastq.gz, SRR8352120_pass_R1.fastq.gz, SRR8352123_pass_R1.fastq.gz, SRR8352124_pass_R1.fastq.gz, SRR8352125_pass_R1.fastq.gz
The Group Levels in order from left to right are:
HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, HC, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD, PD
Error in
plot_theme()
:! The
legend.text.align
theme element is not defined in the element hierarchy.Backtrace:
▆
Execution halted
**I'm wondering you have update the MicrobiomeStat package recently ? **
I'm installing MicrobiomStat using this command : if (!"MicrobiomeStat" %in% installed.packages()) {
devtools::install_github("cafferychen777/MicrobiomeStat" , ref="MicrobiomeStat_Version_1.1.2") #version 1.1.2
}
The text was updated successfully, but these errors were encountered: