cdanielmachado / carveme

CarveMe: genome-scale metabolic model reconstruction
Other
149 stars 51 forks source link

update BiGG version and keep synchronized with eggnog-mapper #21

Closed cdanielmachado closed 3 years ago

cdanielmachado commented 6 years ago

CarveMe is still using BiGG version 1.3. This should be updated to the latest version of BiGG.

Also, this will require updating the bigg annotations in the eggnog-mapper: https://github.com/cdanielmachado/eggnog-mapper/tree/bigg

thh32 commented 6 years ago

I have just tried using the eggnog-mapper, however none of the three inputs produced seem to be accepted as such;

$ carve --egg eggnogmappings.emapper.annotations 
Traceback (most recent call last):
  File "/usr/local/bin/carve", line 343, in <module>
    hard=args.hard
  File "/usr/local/bin/carve", line 108, in main
    annotations = load_eggnog_data(inputfile)
  File "/usr/local/lib/python2.7/dist-packages/carveme/reconstruction/eggnog.py", line 37, in load_eggnog_data
    data = split_and_expand(data, 'BiGG_gene', ',')
  File "/usr/local/lib/python2.7/dist-packages/carveme/reconstruction/eggnog.py", line 5, in split_and_expand
    split_col = df[col].str.split(sep).apply(pd.Series, 1).stack()
  File "/home/thomashitch/.local/lib/python2.7/site-packages/pandas/core/generic.py", line 4372, in __getattr__
    return object.__getattribute__(self, name)
  File "/home/thomashitch/.local/lib/python2.7/site-packages/pandas/core/accessor.py", line 133, in __get__
    accessor_obj = self._accessor(obj)
  File "/home/thomashitch/.local/lib/python2.7/site-packages/pandas/core/strings.py", line 1895, in __init__
    self._validate(data)
  File "/home/thomashitch/.local/lib/python2.7/site-packages/pandas/core/strings.py", line 1917, in _validate
    raise AttributeError("Can only use .str accessor with string "
AttributeError: Can only use .str accessor with string values, which use np.object_ dtype in pandas

$ carve --egg eggnogmappings.emapper.hmm_hits 
Traceback (most recent call last):
  File "/usr/local/bin/carve", line 343, in <module>
    hard=args.hard
  File "/usr/local/bin/carve", line 108, in main
    annotations = load_eggnog_data(inputfile)
  File "/usr/local/lib/python2.7/dist-packages/carveme/reconstruction/eggnog.py", line 37, in load_eggnog_data
    data = split_and_expand(data, 'BiGG_gene', ',')
  File "/usr/local/lib/python2.7/dist-packages/carveme/reconstruction/eggnog.py", line 5, in split_and_expand
    split_col = df[col].str.split(sep).apply(pd.Series, 1).stack()
  File "/home/thomashitch/.local/lib/python2.7/site-packages/pandas/core/generic.py", line 4372, in __getattr__
    return object.__getattribute__(self, name)
  File "/home/thomashitch/.local/lib/python2.7/site-packages/pandas/core/accessor.py", line 133, in __get__
    accessor_obj = self._accessor(obj)
  File "/home/thomashitch/.local/lib/python2.7/site-packages/pandas/core/strings.py", line 1895, in __init__
    self._validate(data)
  File "/home/thomashitch/.local/lib/python2.7/site-packages/pandas/core/strings.py", line 1917, in _validate
    raise AttributeError("Can only use .str accessor with string "
AttributeError: Can only use .str accessor with string values, which use np.object_ dtype in pandas

$ carve --egg eggnogmappings.emapper.seed_orthologs 
Traceback (most recent call last):
  File "/usr/local/bin/carve", line 343, in <module>
    hard=args.hard
  File "/usr/local/bin/carve", line 108, in main
    annotations = load_eggnog_data(inputfile)
  File "/usr/local/lib/python2.7/dist-packages/carveme/reconstruction/eggnog.py", line 37, in load_eggnog_data
    data = split_and_expand(data, 'BiGG_gene', ',')
  File "/usr/local/lib/python2.7/dist-packages/carveme/reconstruction/eggnog.py", line 5, in split_and_expand
    split_col = df[col].str.split(sep).apply(pd.Series, 1).stack()
  File "/home/thomashitch/.local/lib/python2.7/site-packages/pandas/core/generic.py", line 4372, in __getattr__
    return object.__getattribute__(self, name)
  File "/home/thomashitch/.local/lib/python2.7/site-packages/pandas/core/accessor.py", line 133, in __get__
    accessor_obj = self._accessor(obj)
  File "/home/thomashitch/.local/lib/python2.7/site-packages/pandas/core/strings.py", line 1895, in __init__
    self._validate(data)
  File "/home/thomashitch/.local/lib/python2.7/site-packages/pandas/core/strings.py", line 1917, in _validate
    raise AttributeError("Can only use .str accessor with string "
AttributeError: Can only use .str accessor with string values, which use np.object_ dtype in pandas

Any idea what is going wrong?

cdanielmachado commented 6 years ago

Did you follow these instructions? https://carveme.readthedocs.io/en/latest/advanced.html#eggnog-mapper

thh32 commented 6 years ago

The link in the instructions is broken so I used the version linked above.

One issue could be that the download_eggnog_data.py script failed to download the hmm files so I had to manually go and download the files.

cdanielmachado commented 6 years ago

Unfortunately eggnog mapper and carveme are not synchronized, so it is possible that the older eggnog version is not working properly. I will try to look into this as soon as possible. In the meantime I would suggest you just use diamond as the default, unless you really must use eggnog. By the way, the file to use is the annotations file.

thh32 commented 6 years ago

Thanks for the advice, good luck trying to sort it out.

arianccbasile commented 5 years ago

The link in the instructions is broken so I used the version linked above.

One issue could be that the download_eggnog_data.py script failed to download the hmm files so I had to manually go and download the files.

Sorry @thh32 I am having the same problem, I can download no database (no bact,euk,viruses nor arch). How did u do?