Question:
So I have this bar chart I made using:Here is reproducible data as requested!

Answer:
The short answer here is “no”, you can’t have grouped legends within ggplot natively.However, the long answer is “yes, but it isn’t easy”. It requires creating a bunch of plots (one per genome) and harvesting their legends, then stitching them back onto the main plot:

Anyway, it’s good to know that grouped legends are at least possible in ggplot, so thanks for the OP.
If you have better answer, please add a comment about this, thank you!