Closed JesseRop closed 1 year ago
Hi @JesseRop,
I am not sure if I got your question. Would setting of ylim=c(0,2700)
in the plotTracks
call do the trick for you?
Best, Robert
Hi Robert, thank you very much for your prompt reply.
Adding ylim=c(0,2700)
in the plotTracks
call should solve it for this particular example. However, I'm making hundreds of plots across the genome and was looking for a way to automate this without knowing the coverage depth beforehand.
Hi @JesseRop,
Not in an easy way. Gviz
reads data for each track separately and plots them directly.
You would have to read-in data from all files and create a list of Track objects. In that list you can iterate over all tracks to get the coverages and calculate the optimal ylim
coordinates. (You can use Gviz:::.import.bam.alignments
to import the data.)
Dear developer,
Many thanks for the great package. It produces beautiful plots! I'm plotting several alignment tracks and would be grateful for advice on how to make the y-axis reflect the true depth and not be standardized to similar heights. As seen in the example below, the category with the lowest coverage has 300 reads while that with the highest has 2000 and yet they have the same height as the y-axis has been blown up for the lower coverage bam.
Below is my attempt at reproducing the issue using datasets provided in the package but I can't find 2 different bam files with coverage in the same region.
Kindly advice on how to scale the data tracks so that they all have the same y-axis limits to reflect the true coverage differences. Thanks!