Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when loading the database in stag classify #10

Open
AlessioMilanese opened this issue Apr 17, 2020 · 2 comments
Open

Error when loading the database in stag classify #10

AlessioMilanese opened this issue Apr 17, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@AlessioMilanese
Copy link
Member

We get the following error when loading the database:

Traceback (most recent call last):
  File "./htc", line 330, in <module>
    status = main()
  File "./htc", line 308, in main
    classify.classify(args.database, args.fasta_input, args.protein_fasta_input, args.verbose, args.threads, args.output)
  File "/Users/milanese/Dropbox/PhD/bin/htc/bin/classify.py", line 176, in classify
    hmm_file_path, use_cmalign, taxonomy, tax_function, classifiers = load_DB(database)
  File "/Users/milanese/Dropbox/PhD/bin/htc/bin/classify.py", line 74, in load_DB
    if not (isinstance(f["classifiers/"+c][0], str)): # if it is a string (else statement), then it means it was not a classifier
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "/Users/milanese/miniconda3/lib/python3.7/site-packages/h5py/_hl/group.py", line 262, in __getitem__
    oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
  File "/Users/milanese/miniconda3/lib/python3.7/site-packages/h5py/_hl/base.py", line 137, in _e
    name = name.encode('ascii')
AttributeError: 'int' object has no attribute 'encode'
@AlessioMilanese AlessioMilanese self-assigned this Apr 17, 2020
@AlessioMilanese AlessioMilanese added the bug Something isn't working label Apr 17, 2020
@AlessioMilanese
Copy link
Member Author

The error appears when loading the classifier for the node 134676 Actinoplanes sp. SE50, which is a HDF5 group instead of a dataset. And there is a dataset under with id 110.
The issue is probably related to the name of the species: 134676 Actinoplanes sp. SE50/110.
I can reproduce the error if I add a "/" to the name in the taxonomy.

@AlessioMilanese
Copy link
Member Author

For now solved in e8a433d. When loading the taxonomy, we replace / with -.

@AlessioMilanese AlessioMilanese changed the title Error when loading the database in htc classify Error when loading the database in stag classify Jan 1, 2021
AlessioMilanese added a commit that referenced this issue Apr 28, 2021
AlessioMilanese added a commit that referenced this issue Apr 28, 2021
AlessioMilanese added a commit that referenced this issue Apr 28, 2021
cschu added a commit that referenced this issue Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant