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

Issue running any filter command #207

Open
aglendening opened this issue Feb 29, 2024 · 1 comment
Open

Issue running any filter command #207

aglendening opened this issue Feb 29, 2024 · 1 comment

Comments

@aglendening
Copy link

Hi!

I've been having an issue running any configuration of filter beyond --help. The error seems similar to #161 despite the bug fix. Running on blobtoolkit version 4.3.5, python 3.9. I've attempted reinstalling w/ miniconda and running w/ Docker (converted to singularity), but get the same error regardless.

Error message:

[+]        Subsampling FASTA: ████████████████████████████████████████       7/7
Traceback (most recent call last):
  File "/home/FCAM/aglendening/.conda/envs/btk2/bin/blobtools", line 8, in <module>
    sys.exit(cli())
  File "/home/FCAM/aglendening/.conda/envs/btk2/lib/python3.9/site-packages/blobtools/blobtools.py", line 105, in cli
    sys.exit(subcommand())
  File "/home/FCAM/aglendening/.conda/envs/btk2/lib/python3.9/site-packages/blobtools/lib/filter.py", line 463, in cli
    main(args)
  File "/home/FCAM/aglendening/.conda/envs/btk2/lib/python3.9/site-packages/blobtools/lib/filter.py", line 414, in main
    section["title"]: section["module"].summarise(
  File "/home/FCAM/aglendening/.conda/envs/btk2/lib/python3.9/site-packages/blobtools/lib/cov.py", line 233, in summarise
    if library in kwargs["meta"].reads:
AttributeError: reads

Command:

blobtools filter \
--invert \
--param length--Min=1000 \
--param bestsumorder_phylum--Keys=no-hit \
--fasta /path/to/curated.fasta \
--cov /path/to/coverage.bam \
--taxdump ./taxdump \
--summary STDOUT \
BlobDir

BlobDir was built using:

blobtools create \
--fasta /path/to/curated.fasta \
--cov /path/to/coverage.bam \
--hits /path/to/blast/ncbi.blastn.out \
--hits-cols 1=qseqid,2=staxids,3=bitscore,5=sseqid,10=qstart,11=qend,14=evalue \
--busco /path/to/run_arthropoda_odb10/full_table.tsv \
--busco /path/to/run_insecta_odb10/full_table.tsv \
--busco /path/to/run_hemiptera_odb10/full_table.tsv \
--taxdump ./taxdump \
--threads 5 \
--create \
BlobDir

I can provide any additional context if useful, and would really appreciate any insight into this issue I've been fighting the past couple of weeks.

@rjchallis
Copy link
Contributor

I think the error here is happening because the code is assuming the metadata will have a reads section. This shouldn't be required so that's a bug I'll need to fix. In the mean time you should be able to get this to work by adding an empty reads section to the meta.json file in the BlobDir, e.g.:

{
    "reads": {}
    ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants