The way how Gviz handles colouring for AlignmentsTrack is a bit special. It recycles colours specified in the fill.reads along the length of unique read ids (uid column). On top of it, if you plot reads as arrows, it also sorts the reads before plotting according to the strand.
Maybe this piece of code does what you want. It is similar to what you suggested but still retain all plotting functionalities for the AlignmentsTrack class. I tested it on few regions (even with gapped reads) and it seems to work.
what exactly do you want to achieve? Do you want to plot individual reads (coloured by the read strand) or coverage (histogram) for both strands separately?
I have some Digenome-seq data and want to plot potential cut sites that should have reads stacked on opposite strands (so individual reads colored by read strand). My code works if there's only a few hundred reads that all fit in the plot.
That works great, thanks. I just had to add
options(ucscChromosomeNames=FALSE)