[Bioperl-l] isoelectric point
Heikki Lehvaslaiho
heikki@ebi.ac.uk
Tue, 19 Mar 2002 09:18:23 +0000
Harald.Weber@bioperl.org wrote:
>
> Hi, I'm a Newbie !
>
> There's a Bioperl-routine to calculate the
> molecular weight of a protein.
>
> Is there also something to calculate the isoelectric point (pI) ?
Harald,
Aaron C-code might find itself in bioperl some day, but as an exercise
I wrote a script which uses a locally installed EMBOSS iep program.
Neat and short, isn't it?
-Heikki
-------------ipoint.pl------------------
use Bio::Factory::EMBOSS;
use Bio::PrimarySeq;
use strict;
# assuming you have a bioperl sequence object
# you want to analyze, we create one in memory
my $seq = new Bio::PrimarySeq (
-id => 'testprotein',
-alphabet => 'protein',
-seq => 'gcklimps'
);
my $factory = new Bio::Factory::EMBOSS();
my $ipoint = $factory->program('iep');
my %input = (-sequencea => $seq,
-outfile => 'stdout'
);
my $out = $ipoint->run(\%input);
my ($iep) = $out =~ /Isoelectric Point = ([\d\.]+)/;
print "$iep\n";