cobra icon indicating copy to clipboard operation
cobra copied to clipboard

KeyError

Open Syutenjyo opened this issue 5 months ago • 2 comments

Hello, When I try to run cobra, I just get error message like this

(cobra) wk@t:~/res/20240905_cobra$ cobra-meta -f /home/wk/res/test/SPAdes/contigs.fasta -q /home/wk/res/20240905_cobra/metaSpades_contigs_top5.tsv -a metaspades -mink 21 -maxk 121 -m /home/wk/res/test/mapping/test_sorted.bam -c /home/wk/res/20240905_cobra/metaSPAdes_CoverM.txt -t 12
Traceback (most recent call last):
  File "/home/wk/miniconda3/envs/cobra/bin/cobra-meta", line 10, in <module> 
    sys.exit(main())
  File "/home/wk/miniconda3/envs/cobra/lib/python3.8/site-packages/cobra.py", line 877, in main
    if header2len[line.reference_name] > 1000:
    KeyError: 'NC_073204.1'

"NC_073204.1" is in my reference fasta file and have recorded in contig coverage file also. image

I'm not sure what's wrong with it.

Syutenjyo avatar Sep 05 '24 04:09 Syutenjyo