I am using Gviz to view ChIP-seq coverage from either BAM files or bigWig files. I would like to group the data by a factor variable (as described on page 21 of the Gviz user guide). However, grouping only seems to work if I pass in a matrix of data values. It doesn't work when I pass in a list of DataTracks created from bigWig files, or AlignmentTracks created from BAM files.
Is there a quick way to create the necessary data matrix from the DataTrack or AlignmentTracks? Similar Gviz: plotting mean values of biological replicates suggest creating a GRanges object of the viewable region and using SummarizeOverlaps to create a count matrix which I would then have to normalise.