How to get a representive sequence after filiter feature table to perform Picrust2

Dear all, I want to get a representive sequence after filiter feature table,but I dont know how to do. Beacuse I want to get the otu and sequence to perform Picrust2 analysis.
First, I filtered my feature table

qiime taxa filter-table
–i-table table-dada2-3.qza
–i-taxonomy taxonomy.qza
–p-include k__Bacteria
–o-filtered-table Bacetria_dada2_table.qza \

then export the file

qiime tools export
–input-path /share/disk0/user/maj/YuZhang/micro_plastic_2020/16s/Analysis/Bacteria/Bacetria_dada2_table.qza
–output-path /share/disk0/user/maj/YuZhang/micro_plastic_2020/16s/Analysis/Bacteria/Export
#change file name :Bacetria-feature-table.biom
biom convert -i /Export/Bacetria-feature-table.biom
-o /Export/Bacetria-feature-table.txt
–to-tsv
qiime tools export
–input-path rep-seq-dada2-3.qza
–output-path /Export \

perform picrust2

picrust2_pipeline.py -s Export/rep-seq-dada2-3.fasta -i Export/Bacetria-feature-table.txt -o picrust2_result -p 40

but in trouble
image

the rep sequence come from

qiime dada2 denoise-paired
–i-demultiplexed-seqs demux.qza
–p-trim-left-f 0
–p-trim-left-r 0
–p-trunc-len-f 200
–p-trunc-len-r 200
–p-n-threads 40
–o-representative-sequences rep-seq-dada2-3.qza
–o-table table-dada2-3.qza
–o-denoising-stats stats-dada2-3.qza

So, s there anybody who can help me?

Hi @YuZhang ,
If I understand correctly, you are looking to get a matching rep-seqs.qza file of a table that you filtered. Correct?
If so, you can use the filter-seqs action which allows you to filter your rep-seq-dada2-3.qza to retain only reads found in your new filtered Bacetria_dada2_table.qza table.

Thanks! Yes,this is one of my question.I will try the way you tell me.Then my second question, is it a correct way to get the file which the Picrust2 need?

Hi @YuZhang,
Yes, as per the PICRUSt2 tutorial, you need only a matching OTU/ASV table (either in .biom or .tsv format) and a rep-seqs file (FASTA format). So it looks like you have everything you need. Have you tried running this with the additional filtering step I mentioned above to ensure the 2 files have perfect overlap on feature IDs? Maybe the error is inaccurate in its suggesting the lack of ANY overlap but rather more about lack of a perfect overlap?
Btw, in case you didn’t know, there is also a q2-picrust2 which would allow you to just use PICRUSt2 within the QIIME 2 environment.

Yes,I know there is a PICRUSt2,but it need a specific version. I dont want to re install it.
Then, I tried the method you suggested, but it didnt work , and I’m still confronted with the same warning.

[/quote]
True! And fair enough.

Ok, so at this point I think the problem is with something else upstream. The error is suggesting that the table you are using and corresponding rep-seqs file have different features. Is it possible you accidentally are providing the wrong input files? (maybe a file has been overwritten or is pointing to the wrong directory?).
Let’s start by manually check those. You can visualize your filtered table and rep-seqs files and look for matching feature-ids between them. The expectation is that there should be perfect overlap. Can you share those visualizations artifacts with us? You can DM them if you prefer not sharing publicly.

Thanks for your attention. I manually check it, and there was a overlab.

Sorry, I dont know how to share it

Hi @YuZhang ,
Do you get the same issue if you don’t convert your biom table to tsv? PICRUST2 can work with the biom directly, and I wonder if something is happening during your conversion step ?Other than that I’m afraid I’m running out of ideas to suggest here without actually having access to the data.
Maybe @gmdouglas has some suggestions here?

btw, You can just upload .qzv files right on the forum as you did with the image.

Hey @YuZhang,

I’m the PICRUSt2 developer - I’m not sure what the problem is, but the table must not be read in properly by the tool or there are special characters that are hidden by eye that are making the ids be different. I would be happy to take a look at your files if you want to upload them here. You could also email them to me directly here if that’s easier:
gmail_screenshot

1 Like

Thanks sir,I have already solved this problem. I used the .biom file instead the .txt file (biom file transformend).

1 Like

Thanks sir, I used the .biom file instead the .txt file (biom file transformend), then it worked!. Can you tell me how to use the pirust2 output for downstream analysis?Is there a tutorial?

1 Like

Hi @YuZhang ,
Glad you figured it out. Sounds like the problem was somewhere in your conversion of the biom file to tsv.
As for the tutorial, yes there is both a stand-alone PICRUSt2 and a qiime2 version tutorial. You can find both of these in the link I mentioned earlier: