samplot icon indicating copy to clipboard operation
samplot copied to clipboard

Incorrect x-axis genomic coordinates in --zoom mode

Open ManavalanG opened this issue 3 years ago • 2 comments

When used with --zoom option, samplot's genome coordinates in the x-axis are incorrect. The plot itself appears to be correct and the only problem appears to be with the x-axis coordinates not lining up.

This is demonstrated here using an example deletion call chr1:58343207-58343542 using test dataset from this repo "test/data/hg19_chr1_58343117_58343622_deletion.bam". Note that in the zoom mode, start and stop coordinates do not line up with SV call itself, unlike in normal samplot mode (ie. without --zoom) and IGV.

Normal mode: image

Zoom mode: image

IGV view: image

Script:

#!/usr/bin/env bash

BAM="test/data/hg19_chr1_58343117_58343622_deletion.bam"    # from samplot repo
CHROM=chr1
START=$(( 58343117+90 ))
END=$(( 58343622-80 ))

ZOOM=" --zoom 100"
OUTFILE="data/${START}-${END}_zoom.png"
# ZOOM=" "
# OUTFILE="data/${START}-${END}.png"

samplot plot \
    -c $CHROM -s $START -e $END \
    --title "CallRegion:${START}-${END}" \
    -b $BAM \
    -o $OUTFILE \
    $ZOOM \
    -t DEL 

I tested this using samplot versions 1.1.0 and 1.3.0, but this bug has been present since --zoom feature was introduced.

ManavalanG avatar Aug 31 '22 19:08 ManavalanG

Any plans for a fix for this? This is a major issue, limiting the utility of this tool.

Thank you!

Justin

jlac avatar Nov 29 '22 04:11 jlac

yes, we are looking at this along with a couple of other issues and hope to have a new release soon.

mchowdh200 avatar Nov 29 '22 19:11 mchowdh200