Russel88 / CRISPRCasTyper

CCTyper: Automatic detection and subtyping of CRISPR-Cas operons
https://typer.crispr.dk
MIT License
89 stars 16 forks source link

Error in BLASTing for CRISPR near cas operons #27

Closed linzhl1 closed 2 years ago

linzhl1 commented 2 years ago

Hi, I fed the software with metagenomic datasets but an error was raised as follows:

[2022-06-25 15:58:22] INFO: BLASTing for CRISPR near cas operons Traceback (most recent call last): File "/data/linzhl/anaconda3/envs/cctyper/bin/cctyper", line 95, in repmatch.run() File "/data/linzhl/anaconda3/envs/cctyper/lib/python3.8/site-packages/cctyper/blast.py", line 37, in run self.write_gff() File "/data/linzhl/anaconda3/envs/cctyper/lib/python3.8/site-packages/cctyper/blast.py", line 369, in write_gff all_seqs[::2] = cr.repeats ValueError: attempt to assign sequence of size 36 to extended slice of size 35

This problem only came up in one dataset. Do you know what might be causing this?

linzhl1 commented 2 years ago

I have extracted the sequence which caused the problem and ran it with the command: cctyper q.fa test --prodigal meta -t 4 Here is the result. test-DX2.zip

jdwinkler-lanzatech commented 2 years ago

I am also having a similar problem. Any workarounds available?

Russel88 commented 2 years ago

Thank you for reporting, and providing a sequence which causes the bug. A workaround for now shuold be to use the --skip_blast argument. I will look into fixing the bug ASAP.

Russel88 commented 2 years ago

Hi both

The bug is now fixed. The new fixed version (1.6.4) is published on pip and can be upgraded like this: python -m pip install cctyper --upgrade It will be available on conda later today.