schneebergerlab / plotsr

Tool to plot synteny and structural rearrangements between genomes
MIT License
288 stars 28 forks source link

list index out of range #79

Closed zhangyixing3 closed 5 months ago

zhangyixing3 commented 5 months ago

Dear, sir. I want to draw homologous region. The file 'A_Bsyri.out' is a BED file that I have converted, But I encounter an error. how to solve this question ?

$ ~/biosoft/plotsr/bin/plotsr --sr A_Bsyri.out    --genomes fig  -o test.png
2024-06-13 15:52:05,161 - Plotsr - INFO - Starting
Traceback (most recent call last):
  File "/share/home/stu_zhangyixing/biosoft/plotsr/bin/plotsr", line 6, in <module>
    main(sys.argv[1:])
  File "/share/home/stu_zhangyixing/miniconda3/lib/python3.10/site-packages/plotsr-1.1.5-py3.10.egg/plotsr/scripts/plotsr.py", line 336, in main
  File "/share/home/stu_zhangyixing/miniconda3/lib/python3.10/site-packages/plotsr-1.1.5-py3.10.egg/plotsr/scripts/plotsr.py", line 127, in plotsr
  File "/share/home/stu_zhangyixing/miniconda3/lib/python3.10/site-packages/plotsr-1.1.5-py3.10.egg/plotsr/scripts/func.py", line 451, in readsyriout
IndexError: list index out of range

$ head A_Bsyri.out
ZG_Chr01A   1439227 1461433 ZG_Chr01B   2114792 2137086 SYN -
ZG_Chr01A   2870831 2873492 ZG_Chr01B   3867774 3871133 SYN -
ZG_Chr01A   3511994 3525979 ZG_Chr01B   4880604 4953060 SYN -
ZG_Chr01A   3561743 3573008 ZG_Chr01B   5108121 5120156 SYN -
ZG_Chr01A   4271012 4279340 ZG_Chr01B   5963498 5983539 SYN -
ZG_Chr01A   5348427 5371493 ZG_Chr01B   7768006 7790190 SYN -
ZG_Chr01A   5589053 5592123 ZG_Chr01B   8214114 8217431 SYN -
ZG_Chr01A   5592927 5602955 ZG_Chr01B   8218262 8228836 SYN -
ZG_Chr01A   5629848 5674289 ZG_Chr01B   8283617 8324951 SYN -
ZG_Chr01A   5724574 5737409 ZG_Chr01B   8328029 8341534 SYN -

$ cat fig 
##ft    =   File type (fa:fasta/cl:chromosome_length, default = fa. cl files are fasters)
##lc    =   line colour
##lw    =   line width
#file   name    tags
A.ZG    A   ft:cl;lw:1.5
B.ZG    B   ft:cl;lw:1.5
mnshgl0110 commented 5 months ago

For BEDPE file, use --bp (not --sr).

zhangyixing3 commented 5 months ago

Thanks, I will give it a try