Open ielis opened 6 months ago
Hey @ielis,
I got started and played around with the visualization a bit and copied the image Lauren showed last time. As of now it looks like this:
This is Laurens image:
My function looks as such: draw_fig(limits, protein_limits, markers)
Where limits
is and array of tuples where tuple[0]
is the beginning of a box on the upper line and tuple[1]
is the end. protein_limits
is just a 1D array of strictly increasing numbers and the boxes on the lower line are drawn with consecutive pairs taken from this list. I figured this would be sufficient, since there don't seem to be any gaps as above. Lastly, markers
is also just a 1D array of x positions and I draw a little pin at that location, increasing the stem length and circle radius the more often the same x appears.
I would imagine that this method is a good starting point to develop the figure you have in mind. Visually everything can be customized to adhere more to your preferences. The bioinformatics logic can be added to give my drawing method the right inputs. Etc etc.
Please let me know what you think
awesome!
Hi @frehburg the picture looks indeed awesome! I'll write some prose into the notebook in this repo to make sure we are on the same page but overall I think this is fabulous!
I'll let you know when I'm done with the prose.
Thanks a lot! :)
I think all that's left of this task is having a legend for the variant effect colors! @frehburg is this something you can work on? And thank you so much for all the work you've done on the visualization!!
Todos:
tx_coordinates.get_cds_regions()
tx_coordinates.get_codon_count()
this is the length of the encoding regions (Note: # codons/ 3 = # bases), make sure to align gray and transcript exactlyprotein_meta.protein_features
(for pf in protein_meta.protein_features: pf.info.region # is the region of the feature
)pf.feature_type
pf.info.name