-
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
ggpicrust2(): Error in metadata[, matching_columns]
:
#64
Comments
Hi @WillErickson1, Thank you for providing a detailed overview of your issue. Based on the error you encountered and the provided data structure, I suggest the following:
Please give the above suggestion a try and let me know if it resolves the issue or if you have any other questions! Best regards, |
thank you for responding so fast Run ggpicrust2 with imported data.frameabundance_data <- read_delim(abundance_file, delim = "\t", col_names = TRUE, trim_ws = TRUE) metadata_2 <- metadata_2[, -c(2, 3)] Run ggpicrust2 with input dataresults_data_input <- ggpicrust2(data = abundance_data, I have this error now : Processing pathways individually... | | 0% Annotated pathway 1 of 1. Time taken: 2.24 seconds. |============================================================================| 100% Pathway annotation completed. Returning DAA results filtered annotation data frame... |
Hi @WillErickson1, Thank you for sharing the details. I see that you've run the script to load the necessary abundance data and metadata. Following that, you have run the From the provided error:
It seems like there's an inconsistency with the data dimensions. This might be due to only one statistically significant result being found. Such a result can possibly affect the visualization, making it hard for the visualization to proceed. To troubleshoot this:
Let me know how you'd like to proceed or if there's any other way I can assist. Best regards, Chen YANG |
thanks |
Hi @WillErickson1 , The difference between
In the context of the PICRUSt2 pipeline:
I hope this clarifies the difference between the two. Let me know if you have any further questions or if there's anything else I can assist with. Best regards, Chen YANG |
Hello @WillErickson1,
Best regards, |
@cafferychen777 thank you for your time Where can I find MetaCyc abundance results in the PICRUSt2 output folder ? does it in pathways_out ?
|
Hello @WillErickson1 ,
Best regards, Chen YANG |
metadata[, matching_columns]
:metadata[, matching_columns]
:
Hello! Thank you for the opportunity to get the visual results of Picrust!
ℹ Use
Please, help me! |
I runned this script:
library(readr)
library(ggpicrust2)
library(tibble)
library(tidyverse)
library(ggprism)
library(patchwork)
Load necessary data: abundance data and metadata
abundance_file <- "pred_metagenome_unstrat.tsv"
metadata_2 <- read_delim(
"metadata.txt",
delim = "\t",
escape_double = FALSE,
trim_ws = TRUE
)
rm(metadata_2)
Run ggpicrust2 with imported data.frame
abundance_data <- read_delim(abundance_file, delim = "\t", col_names = TRUE, trim_ws = TRUE)
Run ggpicrust2 with input data
results_data_input <- ggpicrust2(data = abundance_data,
metadata = metadata,
group = "Traitement", # For example dataset, group = "Environment"
pathway = "KO",
daa_method = "LinDA",
ko_to_kegg = TRUE,
order = "pathway_class",
p_values_bar = TRUE,
x_lab = "pathway_name")
but I got this error : Starting the ggpicrust2 analysis...
Converting KO to KEGG...
Processing provided data frame...
Loading KEGG reference data. This might take a while...
Performing KO to KEGG conversion. Please be patient, this might take a while...
|============================================================================| 100%
KO to KEGG conversion completed. Time elapsed: 10.02 seconds.
Removing KEGG pathways with zero abundance across all samples...
KEGG abundance calculation completed successfully.
Performing pathway differential abundance analysis...
Sample names extracted.
Identifying matching columns in metadata...
Matching columns identified: NA . This is important for ensuring data consistency.
Using all columns in abundance.
Converting abundance to a matrix...
Reordering metadata...
Error in
metadata[, matching_columns]
:! Can't subset columns with
matching_columns
.✖ Subscript
matching_columns
can't contain missing values.✖ It has a missing value at location 1.
Run
rlang::last_trace()
to see where the error occurred.this is how my input files looks like:
metadata_2:
abundance_data
PS: I executed this example that u shared and it has worked
data(ko_abundance)
data(metadata)
results_file_input <- ggpicrust2(data = ko_abundance,
metadata = metadata,
group = "Environment",
pathway = "KO",
daa_method = "LinDA",
ko_to_kegg = TRUE,
order = "pathway_class",
p_values_bar = TRUE,
x_lab = "pathway_name")
The text was updated successfully, but these errors were encountered: