Bio::G...mbrane(3pm)

πŸ“¦
version 2.40 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

🌸 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 form A.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 are blue, yellow, red, green, pink or white. 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. Use 7-9 with 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