# picrust2 input sequences

**URL:** https://forum.qiime2.org/t/picrust2-input-sequences/26161
**Category:** Other Bioinformatics Tools
**Created:** [April 19, 2023, 12:34pm UTC](https://forum.qiime2.org/t/picrust2-input-sequences/26161 "2023-04-19T12:34:44Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![MichelaRiba](https://forum.qiime2.org/user_avatar/forum.qiime2.org/michelariba/32/6461_2.png) [@MichelaRiba](https://forum.qiime2.org/u/MichelaRiba)
#### Post date: [April 19, 2023, 12:34pm UTC](https://forum.qiime2.org/t/picrust2-input-sequences/26161/1 "2023-04-19T12:34:44Z")

</div>

Good afternoon,  
I am supposed to run a picrust analysis( I specify in addition that I am doing an analysis based on OTu and not on ASV) I was wondering since I have already found one issue, if I am doing correctly:  
I am starting with a fasta file (.fasta) made by dereplicating sequences

``joined\_import\_filter\_derep:  
export HDF5\_USE\_FILE\_LOCKING='FALSE';  
$(CONDA\_ACTIVATE) Miqiime2-2021.8;  
qiime vsearch dereplicate-sequences   
--i-sequences fil\_joined.qza   
--o-dereplicated-table table.qza   
--o-dereplicated-sequences rep-seqs.qza

joined\_import\_filter\_derep\_seq\_unzip:  
unzip rep-seqs.qza -d rep-seqs``

those rep-seqs look something like this:

> 6a3eea7fb1f9e169b134fc27428e50177e2e9c5f A.join.fastq.gz\_12564

CCTACGGGTGGCAGCAGTAGGGAATCTTCCACAATGGGCGAAAGCCTGATGGAGCAACGCCGCGTGGGTGAAGAAGGTCTTCGGATCGTAAAACCCTGTTGTTAGAGAAGAAAGTGCGTGAGAGTAACTGTTCACGTTTCGACGGTATCTAACCAGAAAGCCACGGCTAACTACGTGCCAGCAGCCGCGGTAATACGTAGGTGGCAAGCGTTATCCGGATTTATTGGGCGTAAAGGGAACGCAGGCGGTCTTTTAAGTCTGATGTGAAAGCCTTCGGCTTAACCGGAGTAGTGCATTGGAAACTGGGAGACTTGAGTGCAGAAGAGGAGAGTGGAACTCCATGTGTAGCGGTGAAATGCGTAGATATATGGAAGAACACCAGTGGCGAAAGCGGCTCTCTGGTCTGTAACTGACGCTGAGGTTCGAAAGCGTGGGTAGCAAACAGGATTAGATACCCCAGTAGTC

> 24ce437aa9000774104de794963f862c598c7a42 B.fastq.gz\_7568

The point of having speces in the header makes the picrust2 going into error.  
However I am not sure if I do something like

```auto
awk '{print $1 }' FASTA_IN > FASTA_OUT

```

as suggested here:  
[picrust\_input](https://github.com/picrust/picrust2/wiki/Frequently-Asked-Questions#how-can-i-restrict-a-fasta-file-to-be-the-first-field-per-line)

is correct for me. My doubt is the following: my fasta contains data for all the samples, so if I excelude from the header the sample name, would it be useful to run a correct analysis?

I thank you very much,

Michela

---

<div class="post-metadata">

### Author: ![crusher083](https://forum.qiime2.org/user_avatar/forum.qiime2.org/crusher083/32/9597_2.png) [@crusher083](https://forum.qiime2.org/u/crusher083)
#### Post date: [April 20, 2023, 12:11pm UTC](https://forum.qiime2.org/t/picrust2-input-sequences/26161/2 "2023-04-20T12:11:12Z")

</div>

Hello,

replace spaces with underscore `_` to preserve the info. Everything that goes after a space in FASTA header is traditionally a commentary, not a header itself.

Cheers,  
V

---

<div class="post-metadata">

### Author: ![MichelaRiba](https://forum.qiime2.org/user_avatar/forum.qiime2.org/michelariba/32/6461_2.png) [@MichelaRiba](https://forum.qiime2.org/u/MichelaRiba)
#### Post date: [April 20, 2023, 12:53pm UTC](https://forum.qiime2.org/t/picrust2-input-sequences/26161/3 "2023-04-20T12:53:00Z")

</div>

Hi, do not think this could work since the sequences are not attributed to the same name as in biom file.  
Could you please tell me in more detail?

My point is: in fasta I should have the name of the sequence same way as in the biom, however since I have a multifasta with multiple samples the problem is I shoudl be able to trace back both the sequence not changing the name and the sample, right?

Thanks a lot

---

<div class="post-metadata">

### Author: ![crusher083](https://forum.qiime2.org/user_avatar/forum.qiime2.org/crusher083/32/9597_2.png) [@crusher083](https://forum.qiime2.org/u/crusher083)
#### Post date: [April 20, 2023, 5:00pm UTC](https://forum.qiime2.org/t/picrust2-input-sequences/26161/4 "2023-04-20T17:00:41Z")

</div>

You can remove comments (everything after space) at all then. Biom table preserves only hashes in actual FASTA headers, not comments.

Cheers  
V

---

<div class="post-metadata">

### Author: ![SoilRotifer](https://forum.qiime2.org/user_avatar/forum.qiime2.org/soilrotifer/32/21071_2.png) [@SoilRotifer](https://forum.qiime2.org/u/SoilRotifer)
#### Post date: [April 20, 2023, 5:04pm UTC](https://forum.qiime2.org/t/picrust2-input-sequences/26161/5 "2023-04-20T17:04:20Z")

</div>

Hi @MichelaRiba,

I just wanted to add that you can make use of [q2-picrust2](https://library.qiime2.org/plugins/q2-picrust2/13/), which has just been updated to work with `qiime2-2023.2`. The tutorial is [here](https://github.com/picrust/picrust2/wiki/q2-picrust2-Tutorial).

It does not offer as much flexibility as that native `picrust2` tool. But you can start with the plugin, then export the outputs for any other in-depth analyses.

---

<div class="post-metadata">

### Author: ![MichelaRiba](https://forum.qiime2.org/user_avatar/forum.qiime2.org/michelariba/32/6461_2.png) [@MichelaRiba](https://forum.qiime2.org/u/MichelaRiba)
#### Post date: [April 20, 2023, 6:18pm UTC](https://forum.qiime2.org/t/picrust2-input-sequences/26161/6 "2023-04-20T18:18:51Z")

</div>

thanks a lot for the suggestion!

Michela
