-
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
All my pathway results are NA #122
Comments
Could you please explain the reason behind the error 'Error in aldex.clr.function(reads, conds, mc.samples, denom, verbose, : rownames(reads) cannot be empty' and suggest how to modify the code to resolve it? |
Hi @weiGu-88, Thank you for reporting this issue. The error
# Check your data structure first
print(head(kegg_abundance))
print(dim(kegg_abundance))
print(head(rownames(kegg_abundance)))
# Ensure proper row names
if (is.null(rownames(kegg_abundance))) {
# If your first column contains pathway IDs
kegg_abundance <- kegg_abundance %>%
column_to_rownames("pathway") # or whatever your pathway ID column is named
}
# Make sure your abundance data is properly formatted
kegg_abundance <- as.data.frame(kegg_abundance)
# Remove any rows with all zeros
kegg_abundance <- kegg_abundance[rowSums(kegg_abundance) > 0, ]
# Ensure numeric values
kegg_abundance <- mutate_all(kegg_abundance, as.numeric)
library(tidyverse)
library(ggpicrust2)
# Load and prepare data
kegg_abundance <- ko2kegg_abundance("your_file.tsv")
# Verify data structure
stopifnot(!is.null(rownames(kegg_abundance)))
stopifnot(nrow(kegg_abundance) > 0)
# Perform pathway analysis
daa_results_df <- pathway_daa(
abundance = kegg_abundance,
metadata = metadata,
group = "group",
daa_method = "ALDEx2",
select = NULL,
reference = NULL
) Additional Troubleshooting Tips:
If you could share a small sample of your data (first few rows/columns), I can provide more specific guidance. Best regards, |
Hi,
First of all, thanks for creating this tool.I encountered the same issue as #106.Could you please provide a code modification strategy? Thank you for your response.
The text was updated successfully, but these errors were encountered: