gmod / bio-graphics Goto Github PK
View Code? Open in Web Editor NEWGenerate GD images of biological sequences and annotations
Home Page: http://search.cpan.org/dist/Bio-Graphics
Generate GD images of biological sequences and annotations
Home Page: http://search.cpan.org/dist/Bio-Graphics
Author Name: Nathan S. (Nathan S.)
Original Redmine Issue: 2365, https://redmine.open-bio.org/issues/2365
Original Date: 2007-09-13
Original Assignee: Lincoln Stein
It would be nice to be able to make the background of the image transparent if required.
About a year ago, someone posted the following problem: possible bug in regex for dsn.
Shortly: GBrowse allows regular expressions in data source name configurations as described in Using Pipes in the GBrowse.conf Data Source Name
Today I run into the same problem. I traced it back to the FeatureFile module of this project and fixed it.
Originally from @tnabtaf:
Several GBrowse glyphs were developed for the hapmap project. So far, these have not been made available in the BioGraphics sourceforge repository. Get them copied over.
The glyphs show
- allele frequencies in multiple populations as
- Pie Charts
- Histograms (
allele_column_multi.pm
)- Linkage disequilibrium
Lincoln reportedly gave permission to add the pie chart and allele_column-multi glyphs to Bio::Graphics. Would also need to add glyph help metadata.
The latest GBrowse version (2.54) throws a track rendering error at 5kb or greater zoom level:
rendering error track: Can't locate object method "height" via package "gdTinyFont" (perhaps you forgot to load "gdTinyFont"?) at /usr/local/share/perl/5.8.8/Bio/Graphics/Panel.pm line 641. at /usr/local/lib/perl/5.8.8/Bio/Graphics/Browser2/Render.pm line 3678.
There is a post in the GBrowse mailing list already: [Gmod-gbrowse] Error on data tracks
I could track down the error to the new Bio-Graphics GDWrapper.pm
file. I assume it in function string_height
or _match_font
.
Hence, it is related to the new ttf support.
New Perl versions (2015) do not include CGI as core package. Probably CGI should be added to Build.pl.
And just in case someone is collecting installs issues, in order to have installed Bio::Graphics in a Mac OSX 10.10 .5 with homebrew and perlbrew I needed to install several things beforehand due to not well managed dependencies in other modules that are dependencies of Bio::Graphics
-- summary of programs and modules needed to have installed before cpanm Bio::Graphics
-- homebrew installs
-- gd
-- berkeley-db
-- cpanm
-- SVG # needed for GD::SVG
-- LWP::UserAgent # needed for Bio::Root::Version
-- BerkeleyDB
-- CGI # not longer in perl core modules
I am getting this error in Gbrowse when displaying a wiggle track that is drawing coverage from a BAM file:
"Not an ARRAY reference in ... Bio/Grahics/Glyph/wiggle_xyplot.pm line 107
Using the version of wiggle_xyplot.pm a16bc95
The DISCLAIMER.txt
file specifies the distribution licence. However, mixed on it is a request to acknowledge CSHL in publications as "scientifically appropriate" which I guess means a reference to a specific paper? Maybe just an acknowledge section on the publication?
Independent of what "scientifically appropriate" means, is this request part of the licence? And if so, is such request compatible with the GPL? (note that the perl licence is artistic or GPL+1). If not, could it be removed? And since DISCLAIMER.txt
is actually the licence file, maybe renamed COPYING
or LICENSE
The problem is described in a few posts, i.e. Why AA seq in CDS track is incorrect and even reproducible with the GMOD-Cloud VM as mentioned here: Re: Why AA seq in CDS track is incorrect?.
It looks like a caching problem.
Since version 2.33 or more precisely, commit e73ebc6, $glyph->parent_feature() is undefined for subfeatures like exons. Hence background coloring (and other stuff) does not work anymore.
using GBrowse and perl v5.24.1 in apaches errorlog appears this line:
Possible precedence issue with control flow operator at /usr/share/perl5/Bio/Graphics/Glyph/smoothing.pm line 31
possible solution: https://perlmaven.com/possible-precedence-issue-with-control-flow-operator
The gene glyph currently doesn't support the -implied_utrs option. This would be a nice feature to have, as implied UTRs are part of the GFF3 specification, and are used in the GFFs generated by NCBI's gene annotation pipeline.
This issue has been discussed before:
I recently upgraded our development GBrowse from 2.45 to 2.52, and
Bio::Graphics from 2.26 to 2.31. Since then, a track using the
heat_map glyph displays a pink background with black text containing a
subset of the following message that gets output to the httpd
error_log:
rendering error track: Can't locate object method
"record_label_positions" via package "Bio::Graphics::Glyph::heat_map"
at /opt/gbrowse/current/lib/perl5/site_perl/5.12.4/amd64-freebsd/Bio/Graphics/Browser2/RenderPanels.pm
line 1895. at /opt/gbrowse/current/lib/perl5/site_perl/5.12.4/amd64-freebsd/Bio/Graphics/Browser2/Render.pm
line 3658.
The record_label_positions() subroutine is defined in Bio::Graphics::Glyph::generic and Bio::Graphics::Glyph::xyplot; however, Bio::Graphics::Glyph::heat_map imports only Bio::Graphics::Glyph::minmax, which in turn imports only Bio::Graphics::Glyph.
I'm guessing that a "record_label_positions" subroutine should be defined in Bio::Graphics::Glyph::heat_map, as Bio::Graphics::Glyph::xyplot and Bio::Graphics::Glyph::wiggle_density define there own---and I was able to work around this issue by copying the record_label_positions subroutine from xyplot.pm to heat_map.pm; i.e.:
--- Bio/Graphics/Glyph/heat_map.pm.orig 2012-10-19 19:54:23.000000000 +0000
+++ Bio/Graphics/Glyph/heat_map.pm 2012-10-30 16:48:13.143565576 +0000
@@ -95,6 +95,17 @@
}
}
+# 2012-10-30: work around the
+# Can't locate object method "record_label_positions" via
+# package "Bio::Graphics::Glyph::heat_map"
+# error uncovered after the upgrade from GBrowse 2.45 -> 2.52
+sub record_label_positions {
+ my $self = shift;
+ my $rlp = $self->option('record_label_positions');
+ return $rlp if defined $rlp;
+ return -1;
+}
+
sub draw {
my $self = shift;
Author Name: Nathan S. (Nathan S.)
Original Redmine Issue: 2343, https://redmine.open-bio.org/issues/2343
Original Date: 2007-08-14
Original Assignee: Lincoln Stein
I’ve been working with Bio::Map::* modules recently. I have generated a map which represents the position of genes in cM and I’d like to be able to generate am image of the map using Bio::Graphic::* modules. Obviously, these positions are not integer based and thus, not compatible with Bio::Graphic::* modules.
How much work would be involved in adding support for this? On a similar note (because I came across it in another thread)…..could there be support for negative values (if it doesn’t exist)?
Cheers
Nath
s. I might take this up myself, if I can be given some pointers as to where to start.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.