Bio::G...mbrane(3pm)
πΈ NAME πΈ
Bio::Graphics::DrawTransmembrane β draw a cartoon of an Alpha-helical transmembrane protein.
okay bestie, so this is the page for Bio::G...mbrane(3pm), straight out of the User Contributed Perl Documentation. and no, the truncation isn't me being lazy, that's literally how the manual name shows up. π
π SYNOPSIS π
use Bio::Graphics::DrawTransmembrane;
my @topology = (20,45,59,70,86,109,145,168,194,220);
## Simple use - -topology is the only option that is required
my $im = Bio::Graphics::DrawTransmembrane->new(
-title => 'This is a cartoon displaying transmembrane helices.',
-topology => \@topology);
## More advanced use
my %labels = (5 => '5 - Sulphation Site',
21 => '1st Helix',
47 => '40 - Mutation',
60 => 'Voltage Sensor',
72 => '72 - Mutation 2',
73 => '73 - Mutation 3',
138 => '138 - Glycosylation Site',
170 => '170 - Phosphorylation Site',
200 => 'Last Helix');
my $im = Bio::Graphics::DrawTransmembrane->new(-n_terminal=> 'out',
-topology => \@topology,
-bold_helices=> 1,
-labels=> \%labels,
-text_offset=> -15,
-outside_label=>'Lumen',
-inside_label=>'Cytoplasm',
-membrane_label=>'Membrane',
-vertical_padding=> 155);
## Parse Tmhmm data
use Bio::Tools::Tmhmm;
my $im = Bio::Graphics::DrawTransmembrane->new(
-title=>'Let\'s parse some Tmhmm output...',
-bold_helices=> 1);
open(FILE, 'tmhmm.out');
my $parser = new Bio::Tools::Tmhmm(-fh => \*FILE );
while(my $tmhmm_feat = $parser->next_result ) {
## Load features into DrawTransmembrane object
$im->add_tmhmm_feat($tmhmm_feat);
}
close FILE;
## Now write the image to a .png file
open(OUTPUT, ">output.png");
binmode OUTPUT;
print OUTPUT $im->png;
close OUTPUT;
π¦ DESCRIPTION π¦
so basically: it's a module that draws you a cartoon of an alpha-helical transmembrane protein. it runs on GD, and it lets you write the whole image out to a .png file. that's the whole vibe. π«Ά
the options are a set of tag/value pairs, and here's every single one of them, no skips, no cap:
-topologyβ Array containing transmembrane helix boundaries. This is the only option that is required. Default:none-topology_stringβ Alternative to-topology, provide a string containing the topology data in the formA.11,31;B.41,59;C.86,107;D.145,166. Default:none-n_terminalβ Location of the N-terminal of the sequence, either'in'or'out'. Default:out-titleβ Title to add to the image. Default:none-inside_labelβ Label for the inside of the membrane. Default:Cytoplasmic-outside_labelβ Label for the outside of the membrane. Default:Extracellular-membrane_labelβ Label for the membrane. Default:Plasma Membrane-colour_schemeβ Colour scheme to use. Current choices areblue,yellow,red,green,pinkorwhite. Default:blue-labelsβ Label loops and helices using data from a hash, e.g.
%labels = (138 => 'Glycosylation Site',
190 => 'Binding Site');
The hash key must be numeric, ranges are not allowed. Default: none
-bold_helicesβ Draws black boxes round helices. Default:1-bold_labelsβ Draws black boxes round labels. Default:0-text_offsetβ Shift the text labeling the loops. Use a negative value to shift it left, a positive value to shift it right. Default:0-helix_heightβ Transmembrane helix height. Default:130-helix_widthβ Transmembrane helix width. Default:50-loop_widthβ Loop width. Default:20-vertical_paddingβ Vertical padding. Default:140-horizontal_paddingβ Horizontal Padding. Default:150-membrane_offsetβ Offest between helix end and membrane. Default:6-short_loop_heightβ Height of short loops. Default:90-medium_loop_heightβ Height of medium loops. Default:120-long_loop_heightβ Height of long loops. Default:150-short_loop_limitβ Length in residues below which a loop is classed as short. Default:15-long_loop_limitβ Length in residues above which a loop is classed as long. Default:30-loop_heightsβ Explicitly set heights of each loop, e.g.
%loop_heights = (1 => 45,
2 => 220,
3 => 50,
4 => 220,
9 => 70);
The key corresponds to the loop number. Both key and value must be numeric. If you use -loop_height and there is a defined height for the current loop then other height values will be overridden. Default: none
-n_terminal_heightβ Height of N-terminal. Default:150-c_terminal_heightβ Height of C-terminal. Default:80-n_terminal_offsetβ Shift the N-terminal left by this amount. Default:0-c_terminal_offsetβ Shift the C-terminal right by this amount. Default:0-helix_labelβ Change the'S'label on each helix. Only 1 character is allowed. Default:S-show_labelsβ Display text labels. Default:on-draw_cytosolβ Show the cytosol. Default:false-draw_bilayerβ Show the membrane. Default:true-draw_loopsβ Show the loops. Default:true-draw_terminaiβ Show the terminai. Default:true-draw_helicesβ Show the helices. Default:true-dontsortβ Don't automatically sort the topology array. Default:0-ttf_fontβ Path to TTF font, e.g./usr/share/fonts/msttcorefonts/arial.ttf. Default:none-ttf_font_sizeβ Default size for TTF font. Use7-9with Arial for best results. Default:8
Height, width, padding and other numerical values can gernerally be left alone. They are useful if your labels consists of a lot of text as this may lead to them overlapping. In this case try increasing the loop_width or helix_width options. -text_offset is also very useful for avoiding overlapping. β¨
π AUTHOR π
Tim Nugent <timnugent@gmail.com> β actual icon, actual legend, thank you for your service π«‘
and that's the whole page, bestie!! π this one came to you courtesy of perl v5.30.0, dated 2019-11-25, filed under Bio::G...mbrane(3pm). go draw some helices, you got this π
π
π¦ where this page comes from
- debian bookworm: libbio-graphics-perl 2.40-6 Β· Perl
- debian trixie: libbio-graphics-perl 2.40-6 Β· Perl
- ubuntu jammy: libbio-graphics-perl 2.40-6 Β· Perl
- ubuntu noble: libbio-graphics-perl 2.40-6 Β· Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms