Question: Gviz off-by-one with STAR BAM
gravatar for bernt.popp
2.7 years ago by
bernt.popp0 wrote:

Dear Gviz guys,


Unfortunately I am getting a weird off-by-one error when trying to plot coverage and reads from a STAR alignet BAM file. This error is only present in Gvit and not in IGV:

My command:


achrom <- "chr16"
afrom <- 23649261
ato <- 23649301
mutpos <- 23649285
altrack1 <- AlignmentsTrack(bamfile1, isPaired = FALSE,
    col.mates = "darkgrey", fill = "#E41A1C", type = c("pileup"), 
    name = sample, stackHeight = 0.8, min.height = 4, max.height = 8)

bmt <- BiomartGeneRegionTrack(genome = "hg19", chromosome = achrom, 
    start = afrom, end = ato, filter = list(with_ox_refseq_mrna = TRUE), 
    stacking = "dense")
axisTrack <- GenomeAxisTrack(labelPos = "below")
ht <- HighlightTrack(trackList = list(bmt), start = mutpos, width = 1, 
    chromosome = achrom, fill = "#000000", inBackground = TRUE)

    from = afrom, to = ato, chromosome = achrom, sizes=c(5,1,1,1), 
    fontcolor = fcol)


Any ideas?

Thanks for your great support btw!

Best, Bernt

coverage gviz bam star off-by-one • 598 views
ADD COMMENTlink modified 2.7 years ago by Martin Morgan ♦♦ 24k • written 2.7 years ago by bernt.popp0


the BAM subset for that region with samtools:

The index:

The error is reproducable on my system with this BAM.

Best, Bernt

ADD REPLYlink modified 2.7 years ago • written 2.7 years ago by bernt.popp0
Answer: Gviz off-by-one with STAR BAM
gravatar for
2.7 years ago by

Hi Bernt,

looks like a 0 vs 1 offset issue. I am a bit surprised that this did not occur earlier. Have to check whether something changed in the core tools that we are using for reading the BAM files. Is there a chance that you could upload the section from bamfile1 shown in you example to that drop box location? Would be easiest for me to fix if I had that.


ADD COMMENTlink written 2.7 years ago by florian.hahne@novartis.com1.6k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 122 users visited in the last hour