This was implemented for a UI in https://github.com/starlinglab/aa-explorer/pull/2 and could be pulled into this library.