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

Linking exon annotations with intron lines, and other things. #68

Open
mrmrwinter opened this issue Mar 9, 2022 · 5 comments
Open

Linking exon annotations with intron lines, and other things. #68

mrmrwinter opened this issue Mar 9, 2022 · 5 comments

Comments

@mrmrwinter
Copy link

Hi, loving the package. Really crisp plots.

There are a few questions i have.

Im hoping you know of a way to draw exons with the intron line linking them using your package?

Is there a way to make feature types locked to a given track? Ie, can i lock all transcript features to track 1, exon features to track 2, misc_features to track 3, etc?

I would also like to display a multiple sequence alignment as a ribbon in the plot. For example, i will have the alignment in a ribbon below the features view, with bases and gaps all coloured separately to show indels and regions of conservation.

I have also developed some code and a method to generate ribbons of read depth to add to the plots, if this is something yu would like added as a pull request?

Many thanks

@Zulko
Copy link
Member

Zulko commented Mar 10, 2022

Hi @mrmrwinter ,

Is there a way to make feature types locked to a given track? Ie, can i lock all transcript features to track 1, exon features to track 2, misc_features to track 3, etc?

That's not possible directly inside a same plot I believe. The way to do that would be to have vertically stacked subplots, the first one displaying only introns, the second exons, etc.

I have also developed some code and a method to generate ribbons of read depth to add to the plots, if this is something yu would like added as a pull request?

That's ultimately a decision for @veghp but my opinion is that you could make it a separate library project, which would give you more control to iterate over it in the future. (unless you need some changes/additions in the core of Dna Features Viewer to make it happen, in that case you can submit these specific changes as an MR).

Can you post schemas for the different kinds of plots you described, just to make sure we all share the same visual idea?

Thanks!

@mrmrwinter
Copy link
Author

mrmrwinter commented Mar 14, 2022

Hey Zulko,

Thanks for the fast response!
Yeah sure, separate subtracks for features is fine.
For the linking exons with intron line, i was hoping something like this:
image

For the MSA view i was hiping to create something like this:
image

Basically just some tracks to show dis/concordance between bases, plus gaps. Ive been using n R package called ggmsa, but cant find a python equivalent so far.

The idea behind this is that i can see where indels are placed with regard to features on the tracks and also read depth/GC differences.
And sure, cool. Ill get it written up as a library and then let you know.

Many thanks,

Mike

PS. Here is my plot with the read depth track in red at the bottom
PR_region
.

@Zulko
Copy link
Member

Zulko commented Mar 18, 2022

Thanks a lot for the comments and screenshots! My two cents:

  • I see the point in forcing the features to be on a same line. It wouldn't be straightforward but would be doable to force this in DNA feature viewer (e.g. features who declare a same "group" number receive the same line number when lines are attributed)
  • This being said, for plotting intron lines etc. (which would require changing both the API and the algo behind DFV) I believe there are other python libraries already and these could be leveraged here. If by change they work with matplotlib then you could have separate subplots in a same figure for DFV-handled and non-DFV-handled annotations.
  • The MSA view would also better be implemented in matplotlib directly and could do a nice package for the community.

@marco-mariotti
Copy link

marco-mariotti commented May 26, 2022

Hi @Zulko @veghp,
thanks for developing this package. I write just to strongly encourage you to develop this feature (display grouped connected exon structures, as in the image shared by mrmrwinter on Mar 14th). There's few options to do this in python and none is ideal for various reasons (reason n.1: not maintained). It's perhaps the only feature missing from DnaFeaturesViewer, but it's a major one. If it is implemented, IMHO, this package could become widely used to display complex mammalian genomic annotation; as it stands, it basically can't, and it is limited to bacteria and plasmids. It's a shame because it's very elegant representation. Just the opinion of an interested user! :)

@veghp
Copy link
Member

veghp commented May 27, 2022

Thank you very much for the feedback, it definitely helps us prioritising the tasks. As Zulko mentioned, we are happy to incorporate small changes to accommodate another package implementing this feature, but at the moment we are really tied up in other EGF projects to start working on this..

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

No branches or pull requests

4 participants