# Biplot with shortened taxa label?

**URL:** https://forum.qiime2.org/t/biplot-with-shortened-taxa-label/30206
**Category:** User Support
**Tags:** pcoa, biplot
**Created:** [May 14, 2024, 2:47pm UTC](https://forum.qiime2.org/t/biplot-with-shortened-taxa-label/30206 "2024-05-14T14:47:47Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![DrL](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/d/5f8ce5/32.png) [@DrL](https://forum.qiime2.org/u/DrL)
#### Post date: [May 14, 2024, 2:47pm UTC](https://forum.qiime2.org/t/biplot-with-shortened-taxa-label/30206/1 "2024-05-14T14:47:47Z")

</div>

Hi, I've created a biplot for my data with taxonomic labels as opposed to feature IDs (emperor plot image attached).

 ![biplot collapsed](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/2/228bff37fc5f4b99c36d864877828d9bfb1d823d.png)

However, as you can see, the labels obscure a large portion if the plot. Is it possible to collapse labels to the lowest level? For instance this can be done for da-barplots using --p-level-delimiter, but as far as I can see this isn't an option when producing the biplot .qzv.

I'm using qiime version v.2023.7.0  
Commands:

qiime taxa collapse   
--i-table sex\_adult\_24000\_rarefied\_table.qza   
--i-taxonomy taxonomy-Combined\_16S-SILVA.qza   
--p-level 6   
--o-collapsed-table sex\_adult\_collapsed\_24000\_rarefied\_table.qza

qiime feature-table relative-frequency   
--i-table sex\_adult\_collapsed\_24000\_rarefied\_table.qza   
--o-relative-frequency-table sex\_adult\_relative\_collapsed\_24000\_rarefied\_table.qza

qiime diversity pcoa-biplot   
--i-pcoa sex-adult-bray-curtis-pcoa-results.qza   
--i-features sex\_adult\_relative\_collapsed\_24000\_rarefied\_table.qza   
--o-biplot sex\_adult\_\_bray-curtis\_biplot.qza

qiime emperor biplot   
--i-biplot sex\_adult\_\_bray-curtis\_biplot.qza   
--m-sample-metadata-file "16S\_Metadata10\_sex\_adult.txt"   
--o-visualization sex\_adult\_\_bray-curtis\_biplot.qzv

Any help is much appreciated!

---

<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: [May 14, 2024, 8:28pm UTC](https://forum.qiime2.org/t/biplot-with-shortened-taxa-label/30206/5 "2024-05-14T20:28:46Z")

</div>

Hi @DrL,

I'd suggest the following:

1. Read through the tutorial on [qiime rescript edit-taxonomy ...](https://forum.qiime2.org/t/processing-filtering-and-evaluating-the-silva-database-and-other-reference-sequence-data-with-rescript/15494#heading--sixteenth-header). This should give you a few ideas on how you can edit / truncate your taxonomy to make them more amenable to figure generation.

2. Use this modified taxonomy file as the input to the `qiime taxa collapse ...` command. Keep in mind you may need to alter `--p-level` to match the length of your new taxonomy strings.

3. Follow the rest of your commands as you already have them.

Let us know if this works! 🙂

---

<div class="post-metadata">

### Author: ![DrL](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/d/5f8ce5/32.png) [@DrL](https://forum.qiime2.org/u/DrL)
#### Post date: [May 14, 2024, 11:52pm UTC](https://forum.qiime2.org/t/biplot-with-shortened-taxa-label/30206/6 "2024-05-14T23:52:04Z")

</div>

Hi @SoilRotifer,

Thank you very much for your response - I was in the process of trying out your suggestion, however something seems to have gone wrong with the rescript installation - my environment is eternally caching:

> QIIME is caching your current deployment for improved performance. This may take a few moments and should only happen once per deployment.
> 
> > Traceback (most recent call last):  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/lib/python3.8/site-packages/q2cli/util.py", line 266, in get\_plugin\_manager  
> > return qiime2.sdk.PluginManager.reuse\_existing()  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/lib/python3.8/site-packages/qiime2/sdk/plugin\_manager.py", line 58, in reuse\_existing  
> > raise UninitializedPluginManagerError  
> > qiime2.sdk.plugin\_manager.UninitializedPluginManagerError
> > 
> > During handling of the above exception, another exception occurred:
> > 
> > Traceback (most recent call last):  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/bin/qiime", line 11, in   
> > sys.exit(qiime())  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/lib/python3.8/site-packages/click/core.py", line 1157, in **call**  
> > return self.main(\*args, \*\*kwargs)  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/lib/python3.8/site-packages/click/core.py", line 1077, in main  
> > with self.make\_context(prog\_name, args, \*\*extra) as ctx:  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/lib/python3.8/site-packages/click/core.py", line 943, in make\_context  
> > self.parse\_args(ctx, args)  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/lib/python3.8/site-packages/q2cli/click/command.py", line 43, in parse\_args  
> > return super().parse\_args(ctx, args)  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/lib/python3.8/site-packages/click/core.py", line 1641, in parse\_args  
> > echo(ctx.get\_help(), color=ctx.color)  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/lib/python3.8/site-packages/click/core.py", line 704, in get\_help  
> > return self.command.get\_help(self)  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/lib/python3.8/site-packages/click/core.py", line 1325, in get\_help  
> > self.format\_help(ctx, formatter)  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/lib/python3.8/site-packages/click/core.py", line 1358, in format\_help  
> > self.format\_options(ctx, formatter)  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/lib/python3.8/site-packages/q2cli/click/command.py", line 157, in format\_options  
> > for subcommand in self.list\_commands(ctx):  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/lib/python3.8/site-packages/q2cli/commands.py", line 92, in list\_commands  
> > plugins = sorted(self.\_plugin\_lookup)  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/lib/python3.8/site-packages/q2cli/commands.py", line 76, in \_plugin\_lookup  
> > import q2cli.core.cache  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/lib/python3.8/site-packages/q2cli/core/cache.py", line 285, in   
> > CACHE = DeploymentCache()  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/lib/python3.8/site-packages/q2cli/core/cache.py", line 61, in **init**  
> > self.\_state = self.\_get\_cached\_state(refresh=refresh)  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/lib/python3.8/site-packages/q2cli/core/cache.py", line 107, in \_get\_cached\_state  
> > self.\_cache\_current\_state(current\_requirements)  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/lib/python3.8/site-packages/q2cli/core/cache.py", line 205, in \_cache\_current\_state  
> > state = self.\_get\_current\_state()  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/lib/python3.8/site-packages/q2cli/core/cache.py", line 253, in \_get\_current\_state  
> > plugin\_manager = q2cli.util.get\_plugin\_manager()  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/lib/python3.8/site-packages/q2cli/util.py", line 278, in get\_plugin\_manager  
> > return qiime2.sdk.PluginManager()  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/lib/python3.8/site-packages/qiime2/sdk/plugin\_manager.py", line 67, in **new**  
> > self.\_init(add\_plugins=add\_plugins)  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/lib/python3.8/site-packages/qiime2/sdk/plugin\_manager.py", line 105, in \_init  
> > plugin = entry\_point.load()  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/lib/python3.8/site-packages/pkg\_resources/ **init**.py", line 2518, in load  
> > return self.resolve()  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/lib/python3.8/site-packages/pkg\_resources/ **init**.py", line 2524, in resolve  
> > module = **import** (self.module\_name, fromlist=[' **name**'], level=0)  
> > File "/shared/team/conda/danielrlewis.streptomyces/qiime2/lib/python3.8/site-packages/rescript/plugin\_setup.py", line 11, in   
> > from q2\_types.genome\_data import GenomeData, Loci, Proteins  
> > ModuleNotFoundError: No module named 'q2\_types.genome\_data'

I ran these commands to install:

> conda install -c conda-forge -c bioconda -c qiime2   
> -c [https://packages.qiime2.org/qiime2/2023.7/shotgun/released/](https://packages.qiime2.org/qiime2/2023.7/shotgun/released/)  
> -c defaults xmltodict 'q2-types-genomics\>2023.5' ncbi-datasets-pylib

> pip install git+https://github.com/bokulich-lab/RESCRIPt.git
> 
> qiime dev refresh-cache

I'm using qiime v.2023.7 and conda v.23.1.0

Do you have any idea A) what I did wrong on the initial install? B) How I can get the qiime environment functioning again?

Best wishes,  
Dan

---

<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: [May 15, 2024, 1:01am UTC](https://forum.qiime2.org/t/biplot-with-shortened-taxa-label/30206/7 "2024-05-15T01:01:11Z")

</div>

> [@DrL](#):
>
> Do you have any idea A) what I did wrong on the initial install? B) How I can get the qiime environment functioning again?

I'd simply install the latest version of QIIME 2 (2024.2) as it comes with RESCRIPt installed.

Otherwise try [these instructions](https://github.com/bokulich-lab/RESCRIPt/blob/master/install-prior-versions.md#install-within-the-qiime-2-releases-20232---20237) for 2023.7.

---

<div class="post-metadata">

### Author: ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)
#### Post date: [June 15, 2024, 7:01am UTC](https://forum.qiime2.org/t/biplot-with-shortened-taxa-label/30206/8 "2024-06-15T07:01:33Z")

</div>

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
