.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Bio::Align::Graphics 3pm" .TH Bio::Align::Graphics 3pm "2018-10-27" "perl v5.26.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Bio::Align::Graphics \- Graphic Rendering of Bio::Align::AlignI Objects .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Bio::Align::Graphics; \& \& #Get an AlignI object, usually by using Bio::AlignIO \& \& my $file=shift @ARGV; \& my $in=new Bio::AlignIO(\-file=>$file, \-format=>\*(Aqclustalw\*(Aq); \& my $aln=$in\->next_aln(); \& \& \& #Create a new Graphics object \& my $print_align = new Bio::Align::Graphics(align => $aln); \& \& #Draw the alignment \& $print_align\->draw(); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Bio::Align::Graphics is a module designed to create image files out of Bio::Align::AlignI objects. An alignment may be manipulated with various formatting and highlighting options. .PP An example: .PP .Vb 1 \& #!/usr/bin/perl \-w \& \& use Bio::AlignIO; \& use Bio::Align::Graphics; \& use strict; \& \& #Get an alignment file \& my $file = shift @ARGV; \& \& #Create an AlignI object using AlignIO \& my $in=new Bio::AlignIO(\-file=>$file, \-format=>\*(Aqclustalw\*(Aq); \& \& #Read the alignment \& my $aln=$in\->next_aln(); \& \& #Create some domains for highlighting \& my @domain_start = ( 25 , 50, 80 ); \& my @domain_end = ( 40 , 60 , 100 ); \& my @domain_color = ( \*(Aqred\*(Aq , \*(Aqcyan\*(Aq , \*(Aqgreen\*(Aq ); \& \& #Create Labels for the domains \& my @dml = ("CARD", "Proline Rich", "Transmembrane"); \& my @dml_start = (25, 50, 80); \& my @dml_end = (40, 60, 100); \& my @dml_color = ("lightpink", "lightblue", "lightgreen"); \& \& \& #Create individual labels \& my %labels = ( 145 => "Hep\-c target"); \& \& \& my $print_align = new Bio::Align::Graphics( align => $aln, \& pad_bottom => 5, \& domain_start => \e@domain_start, \& domain_end => \e@domain_end, \& dm_color => \e@domain_color, \& dm_labels => \e@dml, \& dm_label_start => \e@dml_start, \& dm_label_end => \e@dml_end, \& dm_label_color => \e@dml_color, \& labels => \e%labels, \& out_format => "png"); \& \& $print_align\->draw(); .Ve .SH "METHODS" .IX Header "METHODS" This section describes the class and object methods for Bio::Align::Graphics. .PP Typically you will begin by creating a Bio::Align::Graphics object, passing it an alignment object created using Bio::AlignIO. The Bio::Align::Graphics\->\fInew()\fR method has a number of configuration variables that allow you to control the appearance of the final image. .PP You will then call the \fIdraw()\fR method to output the final image. .SH "CONSTRUCTORS" .IX Header "CONSTRUCTORS" \&\fInew()\fR is the constructor for Bio::Align::Graphics: .ie n .IP "$print_align = Bio::Align::Graphics\->new(@options)" 4 .el .IP "\f(CW$print_align\fR = Bio::Align::Graphics\->new(@options)" 4 .IX Item "$print_align = Bio::Align::Graphics->new(@options)" The \fInew()\fR method creates a new graphics object. The options are a set of tag/value pairs as follows: .Sp .Vb 2 \& Option Value Default \& \-\-\-\-\-\- \-\-\-\-\- \-\-\-\-\-\-\- \& \& align Bio::AlignI object None, must be \& supplied to draw \& an alignment \& \& output Filename to print image to STDOUT \& \& out_format png, jpeg, gif, gd png \& \& font Size of font, ranging from 1 to 5 2 \& and equal to the standard GD fonts \& ranging from gdTinyFont to \& gdGiantFont \& \& x_label Draws a scale numbering alignment true \& bases along top of image, every x \& bases are numbered, where x is the \& block_size option \& \& y_label Draws sequence ids of alignment true \& along left side of image \& \& bg_color Background color of the image white \& \& font_color Color of the font used for drawing black \& the alignment characters \& \& x_label_color Color of the font used for drawing red \& the base scale characters \& \& y_label_color Color of the font used for drawing blue \& the sequence id characters \& \& p_color Colors protein bases according to false \& a coloring scheme proposed by W.R. \& Taylor(Protein Engineering, vol 10 \& no 7, 1997), only works with \& protein alignments \& \& pad_top Additional whitespace characters 5 \& between top of image and x\-label \& \& pad_bottom Additional whitespace characters 5 \& between bottom of image and \& alignment \& \& pad_left Additional whitespace characters 5 \& between left side of image and \& y\-label \& \& pad_right Additional whitespace characters 5 \& between right side of image and \& alignment \& \& x_label_space Additional whitespace characters 1 \& between x_label and alignment \& \& y_label_space Additional whitespace characters 1 \& between y_label and alignment \& \& reference Characters which are identical to false \& the reference sequence are replaced \& with the match character \& \& reference_id Sequence id of the sequence to use First sequence \& as the reference supplied in alignment \& \& match_char Character to replace identical bases . \& in aligned sequences \& \& block_size Number of bases to group together 10 \& when printing alignment, groups are \& separated by whitespace \& \& block_space Amount of character whitespace to 2 \& separate groups of bases by \& \& labels A hash containing labels to be none \& printed beneath the alignment, \& where the keys are the bases to \& print the values at \& \& dm_start An array containing start bases none \& for highlighting of segments of \& the alignment, paired with dm_end \& option \& \& dm_end An array containing end bases none \& for highlighting of segments of \& the alignment, paired with dm_start \& options \& \& dm_color An array containing colors for silver \& highlighting segments of bases \& denoted by the coordinates \& located in the dm_start and dm_end \& options \& \& dml_start An array containing start bases none \& for addition of domain labels \& underneath the alignment, paired \& with dml_end \& \& dml_end An array containing end bases none \& for addition of domain labels \& underneath the alignment, paired \& with dml_start \& \& dml_color An array containing colors for silver \& the domain labels denoted by the \& coordinates located in the \& dml_start and dml_end options \& \& dm_labels An array containing labels to be none \& printed underneath specified \& domains, each label should \& correspond with the base position \& located in the dml_start option \& \& show_nonsynonymous Boolean value to turn option false \& on or off. If 0 (or undef), option \& is off. If 1 (or non\-0), option is on. \& Only valid for nucleotide alignments. \& Output images are wider with this option on. .Ve .Sp Note that all arrays and hashes must be passed by reference. .SH "OBJECT METHODS" .IX Header "OBJECT METHODS" .ie n .IP "$draw_align\->\fIdraw()\fR;" 4 .el .IP "\f(CW$draw_align\fR\->\fIdraw()\fR;" 4 .IX Item "$draw_align->draw();" The \fIdraw()\fR method draws the image with the options that were specified with \fInew()\fR. .ie n .IP "$draw_align\->\fIwidth()\fR;" 4 .el .IP "\f(CW$draw_align\fR\->\fIwidth()\fR;" 4 .IX Item "$draw_align->width();" Get the width of the image created with \fInew()\fR, in pixels. .ie n .IP "$draw_align\->\fIheight()\fR;" 4 .el .IP "\f(CW$draw_align\fR\->\fIheight()\fR;" 4 .IX Item "$draw_align->height();" Get the height of the image created with \fInew()\fR, in pixels. .ie n .IP "$draw_align\->\fIaln_length()\fR;" 4 .el .IP "\f(CW$draw_align\fR\->\fIaln_length()\fR;" 4 .IX Item "$draw_align->aln_length();" Get the length of the alignment submitted to \fInew()\fR. .ie n .IP "$draw_align\->\fIaln_format()\fR;" 4 .el .IP "\f(CW$draw_align\fR\->\fIaln_format()\fR;" 4 .IX Item "$draw_align->aln_format();" Get the format of the alignment submitted to \fInew()\fR. .ie n .IP "$draw_align\->\fIno_sequences()\fR;" 4 .el .IP "\f(CW$draw_align\fR\->\fIno_sequences()\fR;" 4 .IX Item "$draw_align->no_sequences();" Get the number of sequences in the alignment submitted to \fInew()\fR. .SH "AUTHORS AND CONTRIBUTORS" .IX Header "AUTHORS AND CONTRIBUTORS" William McCaig, .PP Mikhail Bekarev, .PP Yo\*:zen Herna\*'ndez, .PP Weigang Qiu (Corresponding Developer), .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright (C) 2006\-2008 by William McCaig .PP This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.3 or, at your option, any later version of Perl 5 you may have available. .SH "SEE ALSO" .IX Header "SEE ALSO" Bio::Align::AlignI, Bio::AlignIO, \&\s-1GD\s0, GD::Simple