Ideogram not alligned with ggbio and tracks()
1
0
Entering edit mode
my4 ▴ 10
@my4-10129
Last seen 7.0 years ago

Hello,

I am using ggbio to plot a series of genomic tracks with a shared genomic x-axis.  As described in the ggbio documentation, I am using the tracks() function to align them.  I had expected that when I added an Ideogram using the Ideogram() function, that it would be aligned with this genomic axis.  However this does not appear to be the case.  So my question is, how can I add an ideogram to tracks so that it is aligned with other plots.

To make this clear I am trying to draw three plots looking like this:

IDEOGRAM

Data Track 1

Data Track 2

Both data tracks have the same x-axis (some chromosome) and are aligned well by the tracks() function.  The ideogram draws, but is clearly not aligned in the same way.  I know this as the ideogram is a different length to the data tracks, the centromeres do not line up.  I am using hg19 if that matters.

Alternatively, is there another way to draw an ideogram and align a common x-axis across multiple plots using ggplot2?

Cheers,

Matt

ggbio ggplot2 • 2.5k views
ADD COMMENT
0
Entering edit mode
@oswaldolorenzo-11449
Last seen 7.1 years ago

Try to fix the original data tracks.

fixed(IDEOGRAM) <- TRUE

fixed(Data Track 1) <- TRUE

fixed(Data Track 2) <- TRUE

 

tracks(IDEOGRAM, Data Track 1, Data Track 2)

 

Best,

 

 

 

ADD COMMENT

Login before adding your answer.

Traffic: 410 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6