[Biopython] meddling with GeneDiagram
A M Torres, Hugo
mnemonico at posthocergopropterhoc.net
Thu Mar 8 02:26:39 UTC 2012
On Wed, Mar 7, 2012 at 5:29 PM, Peter Cock <p.j.a.cock at googlemail.com>wrote:
> Did you mean to go off the list?
No! My mistake. I meant reply to all. Been a little too distracted today.
I will replay to all now.
>
>
> On Wednesday, March 7, 2012, A M Torres, Hugo <
> mnemonico at posthocergopropterhoc.net> wrote:
> > Hi Peter
> >
> >> Somewhat related is cropping of features only partly in view, and a
> >> general 'jaggy' feature for showing truncation in some why. Leighton
> >> and I did discuss the later and there is an implementation on a branch
> >> which didn't make it into Biopython 1.59 but could be in the next
> release.
> >> At its simplest this is a sigil with a jagged edge at both ends, useful
> >> for marking things like NNNNN regions in scaffolds/supercontigs, or
> >> even perhaps repeat regions.
> >
> > Neat. Thats exactly what I am needing, a third kind of sigil to represent
> > fuzzy ends. Glad to know it will be available.
> >
> >>
> >> Dealing with the left and right ends of
> >> sigils generically would be more powerful though, and more complex.
> >> That would be required for your example - arrow head at one end, so
> >> kind of truncation marker at the other.
> >
> > Yea that would work exactly as I'd expect. One sigil for each end,
> > the shaft and the arrowhead.
>
> It would have a lot of uses :)
>
>
> > Then we could automatically test whether or not to replace the
> > user chosen sigil with the 'fuzzy' one:
> >
> > if not isinstance(gene.location.end, ExactPosition):
> > if gene.strand == -1:
> > shaft_sigil = 'FUZZY'
> > else:
> > arrowhead_sigil = 'FUZZY'
> >>
> >> We've also talked about other wish list ideas like exons and links,
> >> frame aware placement, frame less placement, etc. All these kinds
> >> of things only make sense a "high zoom" or if drawing small genomes
> >> like viruses - while original GenomeDiagram targeted entire bacteria
> >> ("low zoom", or "zoomed out") where you only needed and wanted
> >> a simple box for each gene.
> >
> > I see. Sounds like pretty interesting stuff. Maybe I could help out
> > but I will need some tutoring. Never worked on a an open source
> > collaborative project before. Is the next-release code hosted on
> > someplace like github?
>
> Yes, it is on GitHub - have a look at the links on our wiki pages.
> https://github.com/biopython/biopython
Alright, great. I have forked myself a copy.
> If I could learn how to get and use the code without interfering
> with my working installation of biopython (maybe using something
> like virtualenv?)
I've never used virtualenv, but I hear good things about it.
>
> Are you on Windows, Mac or Linux?
>
Debian testing (tends to be very up-to-date)
> > I would gladly contribute some work. Let me know if I can be of hand.
>
> I don't want to put you off, but the GenomeDiagram code is
> pretty complex... And right now probably only two people
> can really be said to understand it (Leighton and myself).
>
No problem. I might try and have a look. I will try to use the virtualenv
thing
to experiment without breaking the system's biopython.
I'll try first to contribute some small code changes just to get the hang
of it.
Then if you guys decide some of the changes are worthwhile you can
incorporate them in the main project.
This should be fun.
> There are also two semi-duplicated areas of code, for
> drawing linear and circular diagrams. In general, drawing
> signals on circular diagrams is a LOT harder to implement.
>
> Right now the most important thing is actually the documentation,
> something I managed to do a bit more of recently:
> http://news.open-bio.org/news/2012/03/cross-links-in-genomediagram/
>
> It is the graph functions that need doing next - perhaps by
> adapting Leighton's old documentation from before GD
> was integrated into Biopython. I mean bar charts, line
> graphs and heat maps.
>
> Peter
--
--
.''`. Hugo A. M. Torres
: :' :
`. `' “Talk is cheap,
`- show me the code. ” -- L. Torvalds.
More information about the Biopython
mailing list