josiahseaman / FluentDNA

FluentDNA allows you to browse sequence data of any size using a zooming visualization similar to Google Maps. You can use FluentDNA as a standalone program or as a python module for your own bioinformatics projects.
65 stars 7 forks source link

Annotation Outlines have opacity side effects #59

Closed josiahseaman closed 5 years ago

josiahseaman commented 6 years ago

image

OutlinedAnnotation.blend_pixel() tries to keep any opacity the way that it is. The combination of exon white highlighting plus shadow has some strange effects when they overlap. To prevent this, redraw the nucleotide pixels again to copy over anything below them. We could also allocate a second image layer the size of the whole image, but that would create a memory management issue.

josiahseaman commented 6 years ago

image

Solution: Genes don't shadow themselves because their points are included in the shadow calculation. Put all of the annotation points into a single set. Compute all shadows in one big computation then paint them all at the same time. This will keep shadows outside of annotations and so they won't have a change to side effect the exon highlights either.

josiahseaman commented 6 years ago

image

One gene containing a second gene in better handled separately. That means there's a conflict in design between making nearby genes look nice without losing genes that are entirely within introns.

josiahseaman commented 6 years ago

image Names of small genes are getting truncated. Allow txt.width to be larger than right - left.

josiahseaman commented 5 years ago

This issue is mostly ameliorated by c0ca609bf2bf17ffbbfb35657e42d9ea1cedfbcd by using multiple instances of markup canvas and applying them one at a time.