Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draw variants, transcript and protein. #124

Open
10 tasks done
ielis opened this issue Dec 19, 2023 · 7 comments
Open
10 tasks done

Draw variants, transcript and protein. #124

ielis opened this issue Dec 19, 2023 · 7 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@ielis
Copy link
Member

ielis commented Dec 19, 2023

  • write about visualization.
  • Read background

Todos:

  • Title including transcript id, protein id & name
  • transcript tract: get exon lengths from tx_coordinates.get_cds_regions()
  • transcript track: add CDs region number
  • protein track: length of gray bar: tx_coordinates.get_codon_count() this is the length of the encoding regions (Note: # codons/ 3 = # bases), make sure to align gray and transcript exactly
  • protein track: each box stands for a feature protein_meta.protein_features (for pf in protein_meta.protein_features: pf.info.region # is the region of the feature)
  • protein track: feature type encoded by colors pf.feature_type
  • protein track: annotate box with feature name pf.info.name
  • add legend displaying variant effects and feature types colors
@ielis ielis added this to the Manuscript milestone Dec 19, 2023
@ielis ielis added the enhancement New feature or request label Dec 19, 2023
@frehburg frehburg self-assigned this Dec 21, 2023
@frehburg
Copy link
Collaborator

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:

image

This is Laurens image:

64DEBF77-7835-422A-A769-6B8310E59BF3

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

@pnrobinson
Copy link
Member

awesome!

@ielis
Copy link
Member Author

ielis commented Dec 26, 2023

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! :)

@lnrekerle
Copy link
Collaborator

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!!

@pnrobinson
Copy link
Member

I think this issue is closable if the CI problem in this PR is fixed!
#184

@pnrobinson
Copy link
Member

@ielis @frehburg Hi Filip, I have now used this code for 70 genes and it is beautiful!
Would it be easy to add the exon chart underneath the protein as is shown in the above example? If this is simple, let's do it, but it is not a game-stopper if not.

@frehburg
Copy link
Collaborator

Hey Peter,

Sorry for my late reply. I think that would be possible. Let's discuss this after the AMIA if that is okay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants