Metagenome prediction using ggpicrust2

90 views
Skip to first unread message

Anandi Batabyal

unread,
Mar 25, 2025, 8:50:47 AMMar 25
to picrust-users
Hello friends,

I am trying to perform metagenome prediction based on my picrust2-generated output files. Used this code:
picrust2_pipeline.py \
  -s cleaned-dna-sequences.fasta \
  -i feature-table.biom \
  -o picrust2_out_pipeline/picrust2_output \
  -p 8 
I got EC_metagenome_out, KO_metagenome_out and pathways_out output folders. 

In KO_metagenome_out and EC_metagenome out folders each, I have pred_metagenome_unstrat.tsv.gz, seqtab_norm.tsv.gz and weighted_nsti.tsv.gz files. 

In my pathways_out folder, I have path_abun_unstrat.tsv.gz file. 

I want to visualize specific pathways that are differentially enriched or depleted in my treatment versus control group. I used pred_ko_metagenome_unstrat.tsv file for functional prediction. I used kegg_abundance <- ggpicrust2::ko2kegg_abundance(filename) followed by daa_results_df <- pathway_daa(abundance = kegg_abundance, metadata = metadata, group = "XYZ", daa_method = "ALDEx2", select = NULL, p.adjust = "BH", reference = "X") followed by daa_annotated_results_df <- pathway_annotation(
  pathway = "KO",
  daa_results_df = daa_results_df,  
  ko_to_kegg = TRUE
followed by 
pathway_errorbar(
  abundance = ko_abundance,  
  daa_results_df = daa_annotated_results_df,
  Group = matching_group,  
  p_values_threshold = 0.1,
  order = "p_values",  
  select = selected_features,  
  ko_to_kegg = FALSE,
  p_value_bar = TRUE,                                            
  colors = NULL,
  x_lab = "pathway_name"
)

Is this the right approach? I am not sure what are the differences among the different files generated from picrust2 and which one I should use for visualization to achieve my desired output. The pathway_errorbar function is throwing error and I am not able to get the visualization. Is there a better way to do all this?

I am a beginner at using PICRUST2, and any help will be greatly appreciated.

Thanks,
Anandi

Robyn Wright

unread,
Mar 25, 2025, 9:03:57 AMMar 25
to picrust-users
Hi Anandi,

I can't answer questions about ggpicrust2 as that has different creators - I think they have sometimes answered questions here, but you'd be best going to their Github page with questions for them. 

If you are interested in visualising pathways then you would need to use the files in the pathways_out folder. The different folders correspond to different methods of grouping/annotating functions. There are lots of different functional databases and these all overlap to various extents. Some of these are better or worse for particular functions, and they group at different levels of resolution. The pathway prediction is performed based on the EC (Enzyme Commission) results - you can see some more information about the pathway predictions in the FAQ. The tutorial also provides more information about what exactly is happening at each step of the PICRUSt2 pipeline. 

Best wishes,
Robyn

Kajal Kumari

unread,
Mar 27, 2025, 11:18:38 AMMar 27
to picrus...@googlegroups.com

I have two raw data of fastq file ...how to make biom file and fasta file to run in picrust2


--
You received this message because you are subscribed to the Google Groups "picrust-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to picrust-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/picrust-users/28ecc394-7043-4591-ae7d-ae5093dd540cn%40googlegroups.com.

Robyn Wright

unread,
Mar 27, 2025, 12:47:20 PMMar 27
to picrust-users
Hi there, 

Before you can use PICRUSt2 you first need to process your raw data to generate representative sequences and a feature table. Then you can use PICRUSt2 to predict functions within your data. I recommend using QIIME2, which has lots of useful tutorials on their website as well as a forum.

Robyn

Kajal Kumari

unread,
Mar 27, 2025, 1:12:41 PMMar 27
to picrus...@googlegroups.com

Kajal Kumari

unread,
Mar 27, 2025, 1:12:42 PMMar 27
to picrus...@googlegroups.com

Please give commands bcz I try many times to install qiime...

Robyn Wright

unread,
Mar 27, 2025, 1:15:38 PMMar 27
to picrust-users
Hi there,

You can find comprehensive documentation and tutorials on the QIIME2 website: https://amplicon-docs.readthedocs.io/en/latest/

This includes information on how to install QIIME2: https://amplicon-docs.readthedocs.io/en/latest/how-to-guides/install.html

If you are having issues with your installation and have specific error messages that you can contact the QIIME2 team about, I recommend posting on their forum. 

Robyn

Kajal Kumari

unread,
Mar 27, 2025, 1:29:57 PMMar 27
to picrus...@googlegroups.com

Robyn Wright

unread,
Mar 27, 2025, 1:30:39 PMMar 27
to picrust-users
I already said - on their forum

Kajal Kumari

unread,
Mar 28, 2025, 1:37:08 PMMar 28
to picrus...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages