|
NAMEBio::Graphics::Pictogram - generate SVG output of Pictogram display for consensus motifsSYNOPSISuse Bio::Graphics::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::Graphics::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 included use Bio::Matrix::PSM::IO; my $picto = Bio::Graphics::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; DESCRIPTIONA 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 FEEDBACKMailing ListsUser 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.bioperl-l@bioperl.org - General discussion http://bioperl.org/wiki/Mailing_lists - About the mailing lists Reporting BugsReport 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:http://bugzilla.open-bio.org/ AUTHOR - Shawn HoonEmail shawnh@fugu-sg.orgAPPENDIXThe rest of the documentation details each of the object methods. Internal methods are usually preceded with a "_".newTitle : new Usage : my $picto = Bio::Graphics::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 Object Returns : L<Bio::Graphics::Pictogram> make_svgTitle : make_svg Usage : $picto->make_svg(); Function: make the SVG object Returns : L<SVG> Arguments: A fasta file or array ref of L<Bio::Seq> objects or a L<Bio::Matrix::PSM::SiteMatrixI> fontsizeTitle : fontsize Usage : $picto->fontsize(); Function: get/set for fontsize Returns : int Arguments: int colorTitle : color Usage : $picto->color(); Function: get/set for color Returns : a hash reference Arguments: a hash reference svg_objTitle : svg_obj Usage : $picto->svg_obj(); Function: get/set for svg_obj Returns : L<SVG> Arguments: L<SVG> plot_bitsTitle : plot_bits Usage : $picto->plot_bits(); Function: get/set for plot_bits to indicate whether to plot information content at each base position Returns :1/0 Arguments: 1/0 normalizeTitle : normalize Usage : $picto->normalize($newval) Function: get/set to make all columns the same height. default is to scale height with information content. Returns : value of normalize (a scalar) Args : on set, new value (a scalar or undef, optional) backgroundTitle : background Usage : $picto->background(); Function: get/set for hash reference of nucleodtide bgd frequencies Returns : hash reference Arguments: hash reference pwmTitle : pwm Usage : $picto->pwm(); Function: get/set for pwm Returns : int Arguments: int
Visit the GSP FreeBSD Man Page Interface. |