schneebergerlab / plotsr

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

bug: marker and chromosome position coordinates become wrong #72

Closed KewinOgink closed 1 year ago

KewinOgink commented 1 year ago

Hey, I want to zoom into a region and then also show markers. I use your example data with

genomes

TAIR10_Filtered.chrlen  col-0   ft:cl;lw:1.5
ler.chrlen  ler ft:cl;lw:1.5

and markers

#chr    start   end genome_id   tags
Chr1    5000000 10000000    col-0   mt:_;mc:red;ms:10;tt:Marker1;tp:0.02;ts:8;tf:DejaVu Sans;tc:black
Chr1    5000000 15000000    ler mt:_;mc:black;ms:1;tt:Marker2;tp:0.02;ts:8;tf:DejaVu Sans;tc:black

then I run this, with region from 1bp to 20Mb

plotsr --sr col_lersyri.filtered.out --genomes genomes.txt -S 1 -o tmp.png -W 7 -H 4 -f 8 --markers markers.bed --reg col-0:Chr1:1-20000000

image

then I run the same but starting at 2.5Mb

plotsr --sr col_lersyri.filtered.out --genomes genomes.txt -S 1 -o tmp.png -W 7 -H 4 -f 8 --markers markers.bed --reg col-0:Chr1:2500000-20000000

and get this. image

If I ignore the thickness of marker 1, still the markers coordinates from 5-10 and 5-15Mb do not align with the coordinates on the x-axis. How do I know which is correct and is there a fix for this?

mnshgl0110 commented 1 year ago

Should be fixed by https://github.com/schneebergerlab/plotsr/commit/2b1fde0022944d641d8b31f6384e58feb72705e0

KewinOgink commented 1 year ago

awesome thanks a lot!