Closed ymen closed 10 years ago
Excellent, thanks very much.
One tiny bug, which bit me while testing -- need to check for "bwgBlob" as well as "bwgURI" to detect a bigBed/bigWig track, otherwise bigbeds loaded from local files won't work. I'll fix this myself after merging.
In the longer run, I think there might be some merit in shifting the logic about when to use the AminoAcidGlyph into stylesheets, rather than the main code. However, that might need a few stylesheet-system improvements to get right, so let's leave it for now.
need to check for "bwgBlob" as well as "bwgURI" to detect a bigBed/bigWig track, otherwise bigbeds loaded from local files won't work. I'll fix this myself after merging.
Thanks for catching that and being so prompt to respond Thomas!
@dasmoth cc @mdrasmus
Addresses https://github.com/dasmoth/dalliance/issues/49
Summary
Show translation of genes to amino acids at high magnifications in the genome browser.
Again, please let us know your feedback or suggestions about design choices and implementation, we're most keen to work with you to make sure this PR aligns well with the overall road map of Dalliance!
Illustration
I changed the color for glyphs of type
translation
toblue
instead of the current defaultred
for better contrast with stop codons (see next point).scale
< 8) , the amino acids are not shown, but colored boxes corresponding to amino acids are drawn. Amino acids are drawn in alternating shades of color that is similar to the box color for genes to provide smooth visual transition, with Methionine shown inyellowgreen
and STOP codons shown incrimson
. If the box color for gene is one ofblue
,red
,green
orpurple
, I default to the 2 purple hues used by UCSC.scale
> 8), the translation of amino acids is shown for transcripts using 1 letter code.Of note
If an amino acid is spread over 2 exons (ie it's at the splice site and some part of the codon is at one exon, and some part at the next exon), the translation of the amino acid is not given. An appropriately colored block with no letter labeling will be drawn (e.g. below, to the left of the A amino acid).
I have not found a trivial way of fetching of non-contiguous sequence information (which may not be in the viewing range). If you have any ideas on how this can be implemented I'd love to refine this!
Testing
I did sanity check for the translation based on