Heatmap question with hclust2

i’m trying to build a heatmp using my taxonomy result with metaphlan3 hclust2.
but i trapped in some question ,as follow:

how can i resolve this ?
thank you very much

Could you check which matplotlib version you are using? The error could be due to the usage of an older version.

i’m checking the package what you mentioned.if the Incompatible version is due to this eroor,how to resolve this problem,can you give me some suggestion?

And i have a question about the python version .
i installed the metaphlan3 with conda environment in python 3.6,however,the hclust2 and graphlan both need python 2.7.So,can i istalled the python 2.7 with same conda enviroment.it mean that i installed two version of python at the same time in theorhetical environment of metaphlan3

You should really avoid doing so, MetaPhlAn 3 requires Python 3.7, not 3.6. Also, having GraPhlAn and hclust2 in the same environment is not recommended, you should have both in separate environments.

The error you get when running hclust2 is due to the fact that the attribute is present starting from version >2, you have installed version 1.1.1, version required by graphlan.

I’d suggest you to delete the environment, create two separate ones and install the software. Conda will automatically install the latest compatible packages.

Thanks for your reply.
I’ll try to solve my problem with your recommendation.

i followed your recommendation.
But i also trapped in another problem…

Can you post the output of conda list from the activated environment and upload the txt file with the profiles?

i have created one environment and installed the hclust2 separately.

package list

Once again trouble you, so sorry :worried: :worried: :worried: :worried:

Can you upload the full txt file so I can test locally the command you used? Also, it seems you are still using an old matplotlib version, if I install hclust in a new environment, it’s installing matplotlib conda-forge/linux-64::matplotlib-2.2.5-1

1_merged_abundance_table_species.txt (3.7 KB)

I was not able to reproduce the same error you get, can you try update the matplotlib library using this command conda install -c conda-forge matplotlib ?

I have resolved it just followed your recommendation.
To install the package of matplotlib that version=2.2.5 in a new environment!
I don’t know how to express my appreciation for you, because my English is not good so that my word is confused you.
Just thanks for your help once again.
And I wish you and your family good health and your research work smoothly in this troubled year.

1 Like

The metaphlan could get the Quantitative species spectrum in the first step,which is standardization of table of OTU.
So ,how can l get the Unstandardized OTU table?
Do I need to use other software,or do i use metaphlan directly to complete this work?

MetaPhlAn produces a table with relative abundances per each species, not species counts.
You can obtain counts per each marker using the option -t marker_counts