Entering edit mode
7 months ago
PetrĂ´nio
•
0
Recently, I was reading about the ggpicrust2 package, a tool for interpreting functional prediction results. However, I was unable to run the script with my data. When executing the ggpicrust2 script (usage), the program returns an error message between the combination of metadata and the abundance file. However, I already checked and the names are the same.
If anyone who already uses the package can provide an example of the metadata they use to run the ggpicrust2 package and can help me, I would be extremely grateful.
#Load Packages
library(readr)
library(ggpicrust2)
library(tibble)
library(tidyverse)
library(ggprism)
library(patchwork)
# Load necessary data: abundance data and metadata
abundance_file <- "abundance_file.tsv"
metadata <- read_delim(
"metadata.txt",
delim = "\t",
escape_double = FALSE,
trim_ws = TRUE
)
# Run ggpicrust2 with input file path
results_file_input <- ggpicrust2(file = abundance_file,
metadata = metadata,
group = "State", # For example dataset, group = "Environment"
pathway = "MetaCyc",
daa_method = "LinDA",
ko_to_kegg = FALSE,
order = "State",
p_values_bar = TRUE,
x_lab = "pathaway_name")