NAME
Bio::Draw::Pictogram - generate SVG output of Pictogram display for consensus motifs
SYNOPSIS
use Bio::Draw::Pictogram;use Bio::SeqIO;my $sio = Bio::SeqIO->new(-file=>$ARGV[0],-format=>'fasta');my @seq;while(my $seq = $sio->next_seq){push @seq, $seq;}my $picto = Bio::Draw::Pictogram->new(-width=>"800",-height=>"500",-fontsize=>"60",-plot_bits=>1,-background=>{'A'=>0.25,'C'=>0.18,'T'=>0.32,'G'=>0.25},-color=>{'A'=>'red','G'=>'blue','C'=>'green','T'=>'magenta'});my $svg = $picto->make_svg(\@seq);print $svg->xmlify."\n";#Support for Bio::Matrix::PSM::SiteMatrix now includeduse Bio::Matrix::PSM::IO;my $picto = Bio::Draw::Pictogram->new(-width=>"800",-height=>"500",-fontsize=>"60",-plot_bits=>1,-background=>{'A'=>0.25,'C'=>0.18,'T'=>0.32,'G'=>0.25},-color=>{'A'=>'red','G'=>'blue','C'=>'green','T'=>'magenta'});my $psm = $psmIO->next_psm;my $svg = $picto->make_svg($psm);print $svg->xmlify;
DESCRIPTION
A module for generating SVG output of Pictogram display for consensus motifs. This method of representation was describe by Burge and colleagues: (Burge, C.B.,Tuschl, T., Sharp, P.A. in The RNA world II, 525-560, CSHL press, 1999)
This is a simple module that takes in an array of sequences (assuming equal lengths) and calculates relative base frequencies where the height of each letter reflects the frequency of each nucleotide at a given position. It can also plot the information content at each position scaled by the background frequencies of each nucleotide.
It requires the SVG-2.26 or later module by Ronan Oger available at http://www.cpan.org
Recommended viewing of the SVG is the plugin available at Adobe: http://www.adobe.com/svg
FEEDBACK
Mailing Lists
User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated.
[email protected] - General discussionhttp://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support
Please direct usage questions or support issues to the mailing list:
rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.
Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web:
https://github.com/bioperl/bioperl-live/issues
AUTHOR - Shawn Hoon
Email [email protected]
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a "_".
new
Title : newUsage : my $picto = Bio::Draw::Pictogram->new(-width=>"800",-height=>"500",-fontsize=>"60",-plot_bits=>1,-background=>{'A'=>0.25,'C'=>0.18,'T'=>0.32,'G'=>0.25},-color=>{'A'=>'red','G'=>'blue','C'=>'green','T'=>'magenta'});Function: Constructor for Pictogram ObjectReturns : L<Bio::Draw::Pictogram>
make_svg
Title : make_svgUsage : $picto->make_svg();Function: make the SVG objectReturns : L<SVG>Arguments: A fasta file or array ref of L<Bio::Seq> objects or a L<Bio::Matrix::PSM::SiteMatrixI>
fontsize
Title : fontsizeUsage : $picto->fontsize();Function: get/set for fontsizeReturns : intArguments: int
color
Title : colorUsage : $picto->color();Function: get/set for colorReturns : a hash referenceArguments: a hash reference
svg_obj
Title : svg_objUsage : $picto->svg_obj();Function: get/set for svg_objReturns : L<SVG>Arguments: L<SVG>
plot_bits
Title : plot_bitsUsage : $picto->plot_bits();Function: get/set for plot_bits to indicate whether to plotinformation content at each base positionReturns :1/0Arguments: 1/0
normalize
Title : normalizeUsage : $picto->normalize($newval)Function: get/set to make all columns the same height.default is to scale height with informationcontent.Returns : value of normalize (a scalar)Args : on set, new value (a scalar or undef, optional)
background
Title : backgroundUsage : $picto->background();Function: get/set for hash reference of nucleodtide bgd frequenciesReturns : hash referenceArguments: hash reference
pwm
Title : pwmUsage : $picto->pwm();Function: get/set for pwmReturns : intArguments: int