Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Error of visualization of picrust functional prediction results on RStudio

168 views
Skip to first unread message

Alejandro Rosas Lopez

unread,
Apr 22, 2024, 8:45:15 PM4/22/24
to picrust-users
Hi everyone.
I'm new in this magical worl. 
I've peformed a pipeline of Picrust for functional prediction, i'm analysing an intestinal microbiome of mices...  so, i made the taxonomic classification whit Qiime2 and then, exported my data to Picrust. 

At the end, i got mi " pred_metagenome_unstrat.tsv " archive and a " path_abun_unstrat_descrip.tsv ".

I tried to visualize it in RStudio with the following script: 


metadata <-
  read_delim(
    BalbC_Qiime_metadata,
    delim = "\t",
    escape_double = FALSE,
    trim_ws = TRUE
  )

metadata

group <- "Enviroment"
daa_results_list <-
  ggpicrust2(
    file = "pred_metagenome_unstrat.tsv",
    metadata = metadata,
    group = "Enviroment",
    pathway = "KO",
    daa_method = "LinDA",
    order = "pathway_class",
    ko_to_kegg = TRUE,
    x_lab = "pathway_name",
    p.adjust = "BH",
    select = NULL,
    reference = NULL
  )


But,  got this ...

Starting the ggpicrust2 analysis... Converting KO to KEGG... Loading data from file... Rows: 1813 Columns: 18 ── Column specification ──────────────────────────────────────────────────────────────────────────────── Delimiter: "\t" chr (1): function dbl (17): CH1, CH2, CH3, CM1, CM2, CM3, DH1, DH2, DM1, DM2, DM3, EH1, EH2, EH3, EM1, EM2, EM3 Use `spec()` to retrieve the full column specification for this data. Specify the column types or set `show_col_types = FALSE` to quiet this message. 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: 1.73 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.

This is my metadata file
Any idea of how i can fix it? :c 
Or may be i chose a bad method to visualize jeje 
Is there a better way to do this? Thanks!


Robyn Wright

unread,
Jul 22, 2024, 11:02:32 AM7/22/24
to picrust-users
Hi there,

Apologies for my slow reply. 

ggpicrust2 is actually made by a different team, so I'd recommend going to their Github page to find help: https://github.com/cafferychen777/ggpicrust2

Thanks,
Robyn

Reply all
Reply to author
Forward
0 new messages