I would like to keep the track heights in my Gviz
plot the same between differing datasets, which I can do nicely with the sizes
argument of plotTracks
.
However, I would also like to control the height of items within a StackedTrack
(actually, a BiomartGeneRegionTrack
) so that the track can be fixed height, but the items do not become too tall (within the track of fixed height) if there are only a few items.
In other words, I would like the item in this plot (edited to remove extraneous "sizes" argument not germain to this example):
library(Gviz) geneAll <- BiomartGeneRegionTrack(genome = "danRer10", symbol="Fzd7a", max.height=1) plotTracks(geneAll)
To shrink so that it is similar to the height of the items in this plot:
geneAll <- BiomartGeneRegionTrack(genome = "danRer10", symbol="Fzd3a", max.height=1) plotTracks(geneAll)
(but without shrinking the height of the entire track). I tried using the max.height
parameter, but that does not work, and from the docs it seems that this parameter is only for AlignmentTrack
. As documented, min.height
does control the height of feather/arrows within the introns in my BiomartGeneRegionTrack
.
Is this possible?
If not, an alternative would be to create a spacer track that I adjust in height based on the number of rows in the BiomartGeneRegionTrack
. In that case, is their a way to tell how many rows of items will be in the track after it is squished so I can scale my spacer accordingly? If not, I can simply estimate based on the number of unique transcripts in the BiomartGeneRegionTrack
.
Thank you!
-Eric