#!/usr/bin/perl use strict; use warnings; use Bio::Graphics::DrawTransmembrane; ## Simple use - -topology is the only option that is required my @topology = (20,45,59,70,86,109,145,168,194,220); ## 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( -title => 'This is a cartoon displaying transmembrane helices.', -n_terminal=> 'out', -bold_helices=> 1, -labels=> \%labels, -text_offset=> -15, -outside_label=>'Lumen', -inside_label=>'Cytoplasm', -membrane_label=>'Membrane', -vertical_padding=> 155, -topology => \@topology, -bold_helices=> 1, ); ## Now write the image to a *.png file open(OUTPUT, ">output.png"); binmode OUTPUT; print OUTPUT $im->png; close OUTPUT;