Skip to content

AttributeError when parsing taxdump #270

Description

@callumjethomas

Problem description

I am getting an AttributeError message when trying to create a BlobDir, it appears there is an issue at the taxdump parsing stage.

Command used:

blobtools create --fasta USA_hap1.fa.gz \
> --meta USA_hap1.yaml \
> --taxid 343691  \
> --taxdump ncbi_dbs/taxdump \
> ./USA_ros3979_hap1

Error message

Loading sequences from USA_hap1.fa.gz
 - processing ScPul3w_1801;HRSCAF=1960: : 1801it [02:16, 13.23it/s]
Parsing taxdump
Traceback (most recent call last):
  File "/rds/user/hpc-work/miniforge3/envs/btk/bin/blobtools", line 8, in <module>
    sys.exit(cli())
  File "/rds/user/hpc-work/miniforge3/envs/btk/lib/python3.9/site-packages/blobtools/blobtools.py", line 105, in cli
    sys.exit(subcommand())
  File "/rds/user/hpc-work/miniforge3/envs/btk/lib/python3.9/site-packages/blobtools/lib/add.py", line 203, in cli
    main(args)
  File "/rds/user/hpc-work/miniforge3/envs/btk/lib/python3.9/site-packages/blobtools/lib/add.py", line 191, in main
    taxid.add(args["--taxid"], taxdump, meta)
  File "/rds/user/hpc-work/miniforge3/envs/btk/lib/python3.9/site-packages/blobtools/lib/taxid.py", line 13, in add
    meta.taxon.update({'taxid': taxid})
AttributeError: 'str' object has no attribute 'update'

Install information

  • taxdump downloaded from ftp://ftp.ncbi.nih.gov/pub/taxonomy/new_taxdump
  • blobtoolkit v4.4.5
  • python v3.9.23 (hc30ae73_0_cpython)
  • Rocky Linux 8.10 (Green Obsidian)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions