FOI-Bioinformatics / flextaxd

FlexTaxD (Flexible Taxonomy Databases) - Create, add, merge different taxonomy sources (QIIME, GTDB, NCBI and more) and create metagenomic databases (kraken2, ganon and more )
GNU General Public License v3.0
65 stars 8 forks source link

Error message when no gneomes are found #36

Closed SilasK closed 3 years ago

SilasK commented 3 years ago

This error message should say that flextaxd didn't found any genomes and cannot create the DB.

2021-02-17 18:02:37,639 create_databases [INFO ]  Genome annotations with no matching source: 1699
2021-02-17 18:02:37,674 create_databases [INFO ]  Loading module: CreateKrakenDatabase
2021-02-17 18:02:38,896 DatabaseConnection [DEBUG]  Connecting to human_species/flextaxd/flextaxd.ftd
2021-02-17 18:02:38,901 DatabaseConnection [INFO ]  human_species/flextaxd/flextaxd.ftd opened successfully.
2021-02-17 18:02:38,902 DatabaseConnection [DEBUG]  cursor created.
2021-02-17 18:02:38,902 DatabaseConnection [DEBUG]  Load DatabaseFunctions
2021-02-17 18:02:38,908 DatabaseConnection [DEBUG]  SELECT id,name FROM nodes
2021-02-17 18:02:38,915 CreateKrakenDatabase [INFO ]  /srv/beegfs/scratch/users/k/kiesers/Subspecies/Poppunk/human_species
2021-02-17 18:02:38,916 create_databases [INFO ]  --- process finished in 2 minutes 31.115368843078613 seconds---

Traceback (most recent call last):
  File "/home/kiesers/scratch/Atlas/databases/conda_envs/d80bdd19/bin/flextaxd-create", line 10, in <module>
    sys.exit(main())
  File "/home/kiesers/scratch/Atlas/databases/conda_envs/d80bdd19/lib/python3.8/site-packages/flextaxd/create_databases.py", line 225, in main
    classifierDB.create_library_from_files()
  File "/home/kiesers/scratch/Atlas/databases/conda_envs/d80bdd19/lib/python3.8/site-packages/flextaxd/modules/CreateKrakenDatabase.py", line 203, in create_library_from_files
    self.genome_names_split = self._split(self.genome_names,self.processes)
AttributeError: 'CreateKrakenDatabase' object has no attribute 'genome_names'
davve2 commented 3 years ago

Dear SilasK, thanks for pointing this out,

I´m aware I have not done extensive bugtesting on all types of issues and this problem should definetly get a proper error message. At the moment however this is low priority as I have a busy schedule. I do hope to get some time next month.