Error when running export2graphlan.py

Dear all,
I tried to run this code from the tutorial:
$ export2graphlan.py --skip_rows 1,2 -i merged_abundance_table.txt --tree merged_abundance.tree.txt --annotation merged_abundance.annot.txt --most_abundant 100 --abundance_threshold 1 --least_biomarkers 10 --annotations 5,6 --external_annotations 7 --min_clade_size 1

I obtained a message that I do not understand. Is there a problem with my code or files (successfully obtained following the tutorial)?

Traceback (most recent call last):
  File "/home/me/.local/bin/export2graphlan.py", line 11, in <module>
    from hclust2 import DataMatrix
  File "/home/me/.local/bin/hclust2.py", line 13, in <module>
    import pandas as pd
  File "/home/me/.local/lib/python2.7/site-packages/pandas/__init__.py", line 55, in <module>
    from ._version import get_versions
  File "/home/me/.local/lib/python2.7/site-packages/pandas/_version.py", line 9, in <module>
    import json
ImportError: /home/me/.local/lib/python2.7/site-packages/pandas/json.so: undefined symbol: Buffer_AppendShortHexUnchecked

I have made sure I was using Python 2.7 by:

$ conda create -n python2p7 python=2.7
$ conda activate python2p7

Then, I ran it again and it returned this message:

/home/me/.local/lib/python2.7/site-packages/pandas/hashtable.so: undefined symbol: pyobject_cmp
Traceback (most recent call last):
  File "/home/me/anaconda3/envs/python2p7/bin/export2graphlan.py", line 11, in <module>
    from hclust2 import DataMatrix
  File "/home/me/anaconda3/envs/python2p7/bin/hclust2.py", line 13, in <module>
    import pandas as pd
  File "/home/me/.local/lib/python2.7/site-packages/pandas/__init__.py", line 6, in <module>
    from . import hashtable, tslib, lib
ImportError: /home/me/.local/lib/python2.7/site-packages/pandas/hashtable.so: undefined symbol: pyobject_cmp

Thank you in advance.

Hey Elanu,

Sorry for the delayed response. Can you try to reinstall export2graphlan using the following instructions? First, check your version of conda using:

conda --version

If your conda version is <4.6, run:

conda install -c biobakery export2graphlan --force

Alternatively, if your conda version is >4.6, run:

conda install -c biobakery export2graphlan --force-reinstall

Let me if reinstalling export2graphlan solves your issue. Hope this helps.

Regards,
Aaron.

Dear Aaron.

Sorry for the late response. Thank you for your answer. At the end I reinstalled the Linux system, but I’m having an even earlier issue with the first plot of the Wiki’s example: the nodes appear aligned and half-overlapped (I oppened another Issue for that: Nodes appear aligned).

Seems I have no luck with graphlan yet. I’ll keep trying.

I will consider your answer regarding export2graphlan.py as soon I fix this new issue.

Thank you!

Regards,
Elena

Hi,

No problem. Thanks for getting in touch. Can you send me the command you are passing to GraPhlAn? Also, could I get a copy of the tree and annotation files? I can try to reproduce the error on my end.

Regards,
Aaron.

Hi,

Of course, the command I’m passing is this one:

graphlan.py guide.txt step_0.png --dpi 300 --size 3.5

Here you have the tree file I tried for the plot I shared in my previous reply:
guide.txt (1.9 KB)

I didn’t tried again to add the annotations because this time I’ve got stuck in the first step.

Thank you!

Regards,
Elena