[Bio] / FortyEight / rp_make_mw_and_pi_attributes.pl Repository:
ViewVC logotype

Annotation of /FortyEight/rp_make_mw_and_pi_attributes.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (view) (download) (as text)

1 : mkubal 1.1 use Data::Dumper;
2 :     use Carp;
3 :     use FIG_Config;
4 :    
5 : mkubal 1.5 use lib '/vol/cee-2007-1108/linux-debian-x86_64/lib/perl5/site_perl/5.8.8/Bio/Tools';
6 : mkubal 1.1 use SeqStats;
7 :     use pICalculator;
8 :     use FIGV;
9 :    
10 :     my $jobdir = shift(@ARGV);
11 :     my $genome = shift(@ARGV);
12 :     my $date = localtime();
13 :    
14 : mkubal 1.2 if(! -d "$jobdir/rp/$genome/attributes"){
15 :     `mkdir $jobdir/rp/$genome/attributes`;
16 :     }
17 :    
18 : mkubal 1.1 my $fig = new FIGV("$jobdir/rp/$genome");
19 :    
20 :     open(MW,">$jobdir/rp/$genome/attributes/molecular_weight_for_$genome.txt");
21 :     open(ISO,">$jobdir/rp/$genome/attributes/isoelectric_point_for_$genome.txt");
22 :    
23 :     print MW "$genome\tmolecular_weight_computed_against_all_pegs\t$date\n";
24 :     print ISO "$genome\tisoelectric_point_computed_against_all_pegs\t$date\n";
25 :    
26 :     my @pegs = $fig->pegs_of($genome);
27 :     foreach $peg (@pegs){
28 :     my $seq = $fig->get_translation($peg);
29 :     $mw_seqobj = Bio::PrimarySeq->new(-seq=>$seq,
30 :     -alphabet=>'protein',
31 :     -id=>'test');
32 :    
33 :     $weight = Bio::Tools::SeqStats->get_mol_wt($mw_seqobj);
34 :     print MW "$peg\tmolecular_weight\t$$weight[0]\n";
35 :     #print "$peg\tmolecular_weight\t$$weight[0]\n";
36 :    
37 :     $pi_seqobj = Bio::Seq->new(-seq=>$seq,
38 :     -alphabet=>'protein',
39 :     -id=>'test');
40 :    
41 :     $calc = Bio::Tools::pICalculator->new(-places => 2);
42 :     $calc->seq($pi_seqobj);
43 :     $iep = $calc->iep;
44 :     print ISO "$peg\tisoelectric_point\t$iep\n";
45 :     #print "$peg\tisoelectric_point\t$iep\n";
46 :     }
47 :    
48 :     close(ISO);
49 :     close(MW);

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3