tanghaibao / jcvi

Python library to facilitate genome assembly, annotation, and comparative genomics
BSD 2-Clause "Simplified" License
743 stars 187 forks source link

IndexError: list index out of range #465

Open xiehui1991 opened 2 years ago

xiehui1991 commented 2 years ago

When I run "python -m jcvi.graphics.synteny blocks scz_zj2.bed blocks.layout", the last step of MCScan, it got a error that "IndexError: list index out of range". The details are as follows: [18:01:36] DEBUG Load file scz_zj2.bed base.py:34 Traceback (most recent call last): File "/home/houyan/.conda/envs/jcvi/lib/python3.6/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/home/houyan/.conda/envs/jcvi/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/houyan/.conda/envs/jcvi/lib/python3.6/site-packages/jcvi/graphics/synteny.py", line 651, in main() File "/home/houyan/.conda/envs/jcvi/lib/python3.6/site-packages/jcvi/graphics/synteny.py", line 639, in main glyphcolor=opts.glyphcolor, File "/home/houyan/.conda/envs/jcvi/lib/python3.6/site-packages/jcvi/graphics/synteny.py", line 392, in init bed = Bed(bedfile) File "/home/houyan/.conda/envs/jcvi/lib/python3.6/site-packages/jcvi/formats/bed.py", line 147, in init b = BedLine(line) File "/home/houyan/.conda/envs/jcvi/lib/python3.6/site-packages/jcvi/formats/bed.py", line 50, in init self.start = int(args[1]) + 1 IndexError: list index out of range

Please help me. Thank you very much.

tanghaibao commented 2 years ago

@xiehui1991

Can you make that the bed file contains tabs instead of space to separate the columns? It should be this format:

chr    start    end    name
xiehui1991 commented 2 years ago

Thanks for your guidance.