Question: error when plotting aligned reads depending on the length of the displayed region
0
gravatar for TimothéeFlutre
2.4 years ago by
France
TimothéeFlutre70 wrote:

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?

ADD COMMENTlink modified 2.4 years ago by hesham.gibriel0 • written 2.4 years ago by TimothéeFlutre70

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

ADD REPLYlink written 2.4 years ago by florian.hahne@novartis.com1.6k

Thanks, I will try to do this next week.

ADD REPLYlink written 2.4 years ago by TimothéeFlutre70

I just sent you an email with a minimal reproducible example in attachment, thanks!

ADD REPLYlink written 2.3 years ago by TimothéeFlutre70
Answer: error when plotting aligned reads depending on the length of the displayed regio
0
gravatar for hesham.gibriel
2.4 years ago by
hesham.gibriel0 wrote:

I had the same problem too. Your reads are paired end, that's why when you plot a region that might only show one mate but not the other you get this kind of error. If you try to specify the location of the other mate, e.g. add 1500 bp upstream and downstream, you will not get this error.

ADD COMMENTlink written 2.4 years ago by hesham.gibriel0

You're right, thanks. As I need to zoom in on a short sequence, I will also send an example data set to F. Hahne.

ADD REPLYlink written 2.3 years ago by TimothéeFlutre70
Please log in to add an answer.

Help
Access

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