Open mmcguffi opened 4 years ago
I think we never had an origin-spanning feature plotted circularly before (in the preprint figure, there are no origin-spanning annotations but the Graphic Record itself is rotated with graphic_record.rotate()
which is why some features appear to be cross-origin).
That seems fixable (by amending the way the angles of the arrow are computed here) but I am under the water this week and possibly the next, so if you find a fix, I'll happily merge it.
I took a look at the CircularGraphicRecord.py, but I believe the coordinates that are passed to CircularGraphicRecord from GraphicRecord are already incorrect, thus the error lies within GraphicRecord (GR sends CGR [0, len(sequence)] instead of [1034, 6], or something). These are then translated into [90.0 -270.0] in polar coordinates.
I see you have this function already: https://github.com/Edinburgh-Genome-Foundry/DnaFeaturesViewer/blob/12ddaa56738e104094b1f2cc27e204d7cc333c42/dna_features_viewer/GraphicRecord/GraphicRecord.py#L166
There is a lot to follow in this code (hence I haven't cracked this yet), but I don't think this function is implemented?
Hello, I have found that when I try to render a circular graphic record that has a feature that spans the "origin", it is instead incorrectly rendered as looping around the entire DNA segment. I see that this does not happen in your bioRxiv preprint, so maybe I am missing something obvious?
This is the raw text from the .gbk for the incorrect feature in question in the picture above: