[Bioperl-l] statistics of sequences

S.Paul s.paul at surrey.ac.uk
Tue Apr 20 19:36:31 EDT 2004


Hi Everybody:

I am pretty new to bioperl and am trying to find the statistics of the polarity of amino acids in the protein sequence eg. how many are polar, hydrophobic etc.  I tried using the SeqStats to calculate the mol wt  and the number of A and C but cannot calculate the number of hydrophobic acids present.  I am enclosing the portion of the code.  I would appreciate if anybody can offer any suggestions in this regard.  

*****************************************************************************************************************************
my $seq_stats = Bio::Tools::SeqStats->new($seq);
my $weight = $seq_stats->get_mol_wt();
#note $weight is an array
print " the weight is ", $$weight[0], "\n";
my $monomer_ref = $seq_stats->count_monomers();
print "Number of A\'s in sequence is $$monomer_ref{'A'} \n";
print "Number of C\'s in sequence is $$monomer_ref{'C'} \n";
print "Number of T\'s in sequence is $$monomer_ref{'T'} \n";
print "Number of G\'s in sequence is $$monomer_ref{'G'} \n";


print "\-----------------------------------------------\n";
my $oddcode_obj = Bio::Tools::OddCodes->new(-seq =>$seq);
#returns the reference

my $output1 = $oddcode_obj->charge();
my $output2 = $oddcode_obj->structural();
my $output3 = $oddcode_obj->chemical();
my $output4 = $oddcode_obj->functional();

my $output5= $oddcode_obj->hydrophobic();

#displays 
my $new_coding1 =$$output1;
print "\nthe charge of the sequence is $new_coding1";

print "\-----------------------------------------------\n";

my $new_coding2 =$$output2;
print "\nthe structural sequence $new_coding2";
print "\-----------------------------------------------\n";
my $new_coding3 =$$output3;
print "\n the chemical structure is : $new_coding3";
print "\-----------------------------------------------\n";
my $new_coding4 =$$output4;
print "\n the functional nature of the protein: $new_coding4";
print "\-----------------------------------------------\n";

  my $new_coding5 =$$output5;
print "\n the hydrophobic nature of the protein: $new_coding5";

**********************************************************************************************************************

Thanks

Sujoy Paul
Sujoy Paul, PRISE Centre, UniS, s.paul at surrey.ac.uk


More information about the Bioperl-l mailing list