I would like to plot aligned reads from a bam
file over a specific region. Everything works fine with the following command:
alTrack <- AlignmentsTrack(my.bam.file, isPaired=TRUE) snp.pos <- 308632 plotTracks(alTrack, chromosome="chr1", from=snp.pos-200, to=snp.pos+100)
But shortening the region (by increasing from
) results in an error:
plotTracks(alTrack, chromosome="chr1", from=snp.pos-100, to=snp.pos+100) Error in data.frame(x1 = start(pairGaps) - 1, y1 = gy, x2 = end(pairGaps) + : arguments imply differing number of rows: 0, 1
How can I fix this?
Looks a lot like a bug, but hard to say where it is happening without further details. If you could wrap this into a smaller reproducible example together with the necessary data to test I will take a closer look.
Thanks,
Florian
Thanks, I will try to do this next week.
I just sent you an email with a minimal reproducible example in attachment, thanks!