[Bioperl-l] Module to draw transmembrane protein topology
Tim Nugent
t.nugent at cs.ucl.ac.uk
Tue Feb 20 14:31:20 UTC 2007
Thanks Chris, glad it's appreciated.
Is there anything else I can do? If anyone has any requests/suggestions
please let me know too.
Best wishes,
Tim
Chris Fields wrote:
> I think this is pretty nice! We can add the code and test script to
> bugzilla and (if someone has time) try to see where it might fit in,
> though Bio::Graphics sounds like a good spot.
>
> Anyone else have ideas on where this could go?
>
> chris
>
> On Feb 19, 2007, at 11:29 AM, Tim Nugent wrote:
>
>> Hi everyone,
>>
>> I've written a perl module to display transmembrane protein topology
>> using GD. There are various options, including labels, helix/loop
>> dimensions, colour schemes etc but it only requires a string or array
>> containing the protein topology (e.g. transmembrane helix start/stop
>> points). It produces output like this:
>>
>> http://www.cs.ucl.ac.uk/staff/T.Nugent/images/blue.png
>> http://www.cs.ucl.ac.uk/staff/T.Nugent/images/yellow.png
>>
>> using the code at the bottom.
>>
>> Here is a the module:
>> http://www.cs.ucl.ac.uk/staff/T.Nugent/source/DrawTransmembrane.pm
>>
>> I've never submitted anything to Bioperl before - is this sort of
>> thing
>> likely to be of use to others? I imagine it would sit alongside
>> some of
>> the Bio::Graphics stuff.
>>
>> Best wishes,
>>
>> Tim
>>
>> #!/usr/bin/perl
>>
>> use strict;
>> use warnings;
>> use lib '/scratch0/NOT_BACKED_UP/tnugent/perl5lib'; ## path to module
>> use DrawTransmembrane;
>>
>> my @topology = (20,45,59,70,86,109,145,168,194,220);
>>
>> 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 = DrawTransmembrane->draw_transmembrane(-title => 'This is a
>> cartoon displaying transmembrane helices.',
>> -topology =>
>> \@topology,
>> -n_terminal => 'out',
>> -helix_width => 48,
>> -helix_height => 125,
>> -short_loop_limit
>> => 10,
>> -long_loop_limit =>
>> 35,
>> -loop_width => 25,
>> -colour_scheme =>
>> 'yellow',
>> -labels => \%labels,
>> -text_offset => -10);
>>
>> ## print the .png file
>> my $output = 'test.png';
>> open(OUTPUT, ">$output");
>> binmode OUTPUT;
>> print OUTPUT $im->png;
>> close OUTPUT;
>>
>> my $system = `display $output`;
>>
>> --
>> Tim Nugent (MRes)
>> Research Student
>> Bioinformatics Unit
>> Department of Computer Science
>> University College London
>> Gower Street
>> London WC1E 6BT
>> Tel: 020-7679-0410
>> t.nugent at ucl.ac.uk
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
> Christopher Fields
> Postdoctoral Researcher
> Lab of Dr. Robert Switzer
> Dept of Biochemistry
> University of Illinois Urbana-Champaign
>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
--
Tim Nugent (MRes)
Research Student
Bioinformatics Unit
Department of Computer Science
University College London
Gower Street
London WC1E 6BT
Tel: 020-7679-0410
t.nugent at ucl.ac.uk
More information about the Bioperl-l
mailing list