sndg-arg / sndgbiodb

0 stars 0 forks source link

Error when trying to load Genome #1

Open rafaelstjf opened 11 months ago

rafaelstjf commented 11 months ago

Error in load_gbk.py script when trying to load the genome LC789759 Klebsiella pneumoniae.

Traceback (most recent call last):
  File "/home/rafa_br/Documents/GitHub/targetpathogenweb/manage.py", line 22, in <module>
    main()
  File "/home/rafa_br/Documents/GitHub/targetpathogenweb/manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "/home/rafa_br/miniconda3/envs/tpv2/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/home/rafa_br/miniconda3/envs/tpv2/lib/python3.10/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/rafa_br/miniconda3/envs/tpv2/lib/python3.10/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/rafa_br/miniconda3/envs/tpv2/lib/python3.10/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
  File "/home/rafa_br/Documents/GitHub/sndgbiodb/bioseq/management/commands/load_gbk.py", line 75, in handle
    tio.complete_tax(taxon)
  File "/home/rafa_br/Documents/GitHub/sndgbiodb/bioseq/io/TaxIO.py", line 57, in complete_tax
    self.save(taxdto, parent)
  File "/home/rafa_br/Documents/GitHub/sndgbiodb/bioseq/io/TaxIO.py", line 75, in save
    taxon = Taxon(ncbi_taxon_id=int(taxdto["taxId"]),
  File "/home/rafa_br/miniconda3/envs/tpv2/lib/python3.10/site-packages/django/db/models/base.py", line 543, in __init__
    _setattr(self, field.name, rel_obj)
  File "/home/rafa_br/miniconda3/envs/tpv2/lib/python3.10/site-packages/django/db/models/fields/related_descriptors.py", line 266, in __set__
    raise ValueError(
ValueError: Cannot assign "True": "Taxon.parent_taxon" must be a "Taxon" instance.
rafaelstjf commented 11 months ago

Another similar error occurs when trying to load the genome NC_001477 Dengue virus 1.

Traceback (most recent call last):
  File "/home/rafa_br/Documents/GitHub/targetpathogenweb/manage.py", line 22, in <module>
    main()
  File "/home/rafa_br/Documents/GitHub/targetpathogenweb/manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "/home/rafa_br/miniconda3/envs/tpv2/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/home/rafa_br/miniconda3/envs/tpv2/lib/python3.10/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/rafa_br/miniconda3/envs/tpv2/lib/python3.10/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/rafa_br/miniconda3/envs/tpv2/lib/python3.10/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
  File "/home/rafa_br/Documents/GitHub/sndgbiodb/bioseq/management/commands/load_gbk.py", line 93, in handle
    io.process_record_list(gbio.record_list(), gbio.total)
  File "/home/rafa_br/Documents/GitHub/sndgbiodb/bioseq/io/BioIO.py", line 204, in process_record_list
    self.process_seqrecord(seqrecord)
  File "/home/rafa_br/Documents/GitHub/sndgbiodb/bioseq/io/BioIO.py", line 192, in process_seqrecord
    bulk_save(seqrecord.features, action=lambda f: self.process_feature(be, f), stderr=self.stderr)
  File "/home/rafa_br/Documents/GitHub/sndgbiodb/bioseq/io/BioIO.py", line 43, in bulk_save
    action(x)
  File "/home/rafa_br/Documents/GitHub/sndgbiodb/bioseq/io/BioIO.py", line 192, in <lambda>
    bulk_save(seqrecord.features, action=lambda f: self.process_feature(be, f), stderr=self.stderr)
  File "/home/rafa_br/Documents/GitHub/sndgbiodb/bioseq/io/BioIO.py", line 118, in process_feature
    self.bioentry_from_feature(be, feature, sf)
  File "/home/rafa_br/Documents/GitHub/sndgbiodb/bioseq/io/BioIO.py", line 126, in bioentry_from_feature
    0] if SeqfeatureQualifierValue.GeneValue in feature.qualifiers else feature.qualifiers["locus_tag"][0]
KeyError: 'locus_tag'