Skip to content
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

Help needed using sample dada Math.factor ‘round’ not meaningful for factors #107

Open
jrhaulung opened this issue Jun 3, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@jrhaulung
Copy link

Dear Dr. Chen:
When trying to follow the tutorial (If an error occurs with ggpicrust2, please use the following workflow)
using sample data download from google link

metadata <- read_delim("/Downloads/metadata.txt", delim = "\t", escape_double = FALSE, trim_ws = TRUE)
kegg_abundance <- ko2kegg_abundance("/Downloads/ko_abundance.tsv")
daa_results_df <- pathway_daa(abundance = kegg_abundance, metadata = metadata, group = "Environment", daa_method = "ALDEx2", select = NULL, reference = NULL)

got an error as follow

Sample names extracted.
Identifying matching columns in metadata...
Matching columns identified: sample_name . This is important for ensuring data consistency.
Using all columns in abundance.
Converting abundance to a matrix...
Reordering metadata...
Converting metadata to a matrix and data frame...
Extracting group information...
Running ALDEx2 with two groups. Performing t-test...
Error in Math.factor(c(1L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, :
‘round’ not meaningful for factors

Please help, Thanks.

@jrhaulung jrhaulung added the bug Something isn't working label Jun 3, 2024
@cafferychen777
Copy link
Owner

Dear jrhaulung,

Thank you for reaching out regarding the error you encountered while following the tutorial for ggpicrust2. I understand the frustration of running into issues during the analysis process.

Based on the error message you provided, it appears that the issue is related to the ALDEx2 package, specifically the 'round' function not being compatible with factors. This problem has been reported by several users, as seen in the previous GitHub issues #67 and #102.

To resolve this issue, I recommend the following workaround:

  1. Remove the currently installed version of ALDEx2 using the command:
    remove.packages("ALDEx2")

  2. Install an older version of ALDEx2 (v.1.28) from the Bioconductor archive using the command:
    install.packages("https://mghp.osn.xsede.org/bir190004-bucket01/archive.bioconductor.org/packages/3.15/bioc/src/contrib/Archive/ALDEx2/ALDEx2_1.28.0.tar.gz", repos = NULL, type="source")

After installing ALDEx2 v.1.28, please re-run the analysis using the provided code. This should resolve the 'round' not meaningful for factors error.

If you continue to face issues or have any further questions, please don't hesitate to reach out. I'll be happy to assist you further.

Best regards,
Chen YANG

@jrhaulung
Copy link
Author

Thank you for your quick reply!

The error occurs with ALDEx2_1.34.0 but also with ALDEx2_1.28.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants