GenomeInfoDb offers an idiomatic way to do this. I unilaterally defaulted it to UCSC as it is the most used (at least within the BioC world). Much/all of the heavy lifting should be pushed back onto the server, but people will probably want to use the resulting objects on the client end. This will ease that.
This does not address the issue of what reference / genome() a sequence has been aligned to. I'm aware that people leave this information out of their BAM files sometimes, too. Some people don't wear seatbelts, either.
GenomeInfoDb offers an idiomatic way to do this. I unilaterally defaulted it to UCSC as it is the most used (at least within the BioC world). Much/all of the heavy lifting should be pushed back onto the server, but people will probably want to use the resulting objects on the client end. This will ease that.
This does not address the issue of what reference / genome() a sequence has been aligned to. I'm aware that people leave this information out of their BAM files sometimes, too. Some people don't wear seatbelts, either.