Error with marker specification
mylena-s opened this issue · 3 comments
Hello! Thank you for developing this software. It works smoothly...
I installed plotsr with conda.
I am having some trouble to plot markers.
here is the example of my markers.bed file (tab separated):
#chr start end genome_id tags
Chr4 30600000 30700000 Acit mt:v;mc:black;ms:3;tt:amhrY;tp:0.02;ts:8;tf:Arial;tc:black
but when I run it with:
plotsr --sr A_B.out --sr B_C.out --genomes genomes.txt -o out.pdf --markers markers.bed
I get the following error:
ValueError: Selected font arial at marker position Chr4:30600000-30700000 is not available. Check plotsr_available_font_names.txt for list of available system markers
I tried to remove the tags column but then I get the following error:
Traceback (most recent call last):
File "/home/mylena/miniconda3/envs/syri/bin/plotsr", line 6, in
main(sys.argv[1:])
File "/home/mylena/miniconda3/envs/syri/lib/python3.9/site-packages/plotsr/scripts/plotsr.py", line 334, in main
plotsr(args)
File "/home/mylena/miniconda3/envs/syri/lib/python3.9/site-packages/plotsr/scripts/plotsr.py", line 272, in plotsr
ax = drawmarkers(ax, B, V, chrlengths, indents, chrs, chrgrps, S, cfg, ITX, minl=minl, maxl=maxl)
File "/home/mylena/miniconda3/envs/syri/lib/python3.9/site-packages/plotsr/scripts/func.py", line 1715, in drawmarkers
ax.text(m.start, indent-offset+m.tp, m.tt, color=m.tc, fontsize=m.ts, fontfamily=m.tf, ha='center', va='bottom')
TypeError: unsupported operand type(s) for +: 'float' and 'str'
Thank you in advance
Hi @mylena-s. As the first error says font type Arial
is not available on the computer/server you are using to run plotsr. Please replace Arial
in the markers.bed file to your font of choice from the list of fonts available in plotsr_available_font_names.txt
.
The second issue is a bug popping up only when the tags are not provided. Using the tp
would bypass this bug.
Thank you for the prompt response!
I was able to solve the bug with the tp tag advise.
But I was not able to find the plotsr_available_font_names.txt file in the conda enviroment. Where could I find it?
Thank you again
It should be in the directory in which you run plotsr.