schneebergerlab / plotsr

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

zoom problem with unequal chromosome lengths? #75

Closed KewinOgink closed 6 months ago

KewinOgink commented 6 months ago

Hello, I couldn't find this issue on the issue list, but if I missed it apologies.

I have a small public QTL of ~150kb that I want to align to an entire chromosome, which works well.

plotsr \
            --sr $plotsr_dir/$sample.out \
            --genomes ${plotsr_dir}/${sample}.genomes.txt \
            --tracks ${plotsr_dir}/${sample}_w${track_window_size}.track \
            -S 0.4 -o R7 -W 10 -H 2 -f 6 -s ${min_sv_size} --cfg ../tmp/wga/plotsr/base.cfg \
            -o $plotsr_dir/plot_out.png

image

However, when I then want to zoom in on a small region, it seems the --reg does give me what I expect.

        plotsr \
            --sr $plotsr_dir/${sample}.out \
            --genomes ${plotsr_dir}/${sample}.genomes.txt \
            --tracks ${plotsr_dir}/${sample}_w${track_window_size}.track \
            --reg "query_genome:ChrX:60053558-60176336" \
            -S 0.4 -o R7 -W 10 -H 2 -f 6 -s ${min_sv_size} --cfg ../tmp/wga/plotsr/base.cfg \
            -o $plotsr_dir/plot_out.png    

image

What I expected is to see something like this, which I recreated a bit cumbersome by reducing my query genome and syri output by 60Mb and then showing the query region 1-500kb image Actually another unexpected behaviour is that I get the same when using the region 1-1Mb

Any idea what I'm missing?

thanks!

mnshgl0110 commented 6 months ago

Hi @KewinOgink , your solution is indeed the current best strategy. In the second figure, the problem arises because the regions of interest are too far apart (based on the coordinates). In the static 2D visualisation we could only have one coordinate system, so there is not other better solutions available.