[Bio] / FigKernelScripts / fasta_for_hypo.pl Repository:
ViewVC logotype

Annotation of /FigKernelScripts/fasta_for_hypo.pl

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : efrank 1.1 # -*- perl -*-
2 :     use FIG;
3 :    
4 :     # usage: fasta_for_hypo Assignments < fasta > unassigned.fasta
5 :    
6 :     ($assignments = shift @ARGV)
7 :     || die "usage: fasta_for_hypo Assignments < fasta > unassigned.fasta";
8 :    
9 :     foreach $_ (`cat $assignments`)
10 :     {
11 :     if (($_ =~ /^(\S+)\t(\S[^\t]+\S)/) && ($id = $1) && ($func = $2) && (! &FIG::hypo($func)))
12 :     {
13 :     $assigned{$id} = 1;
14 :     }
15 :     }
16 :    
17 :     $/ = "\n>";
18 :     while (defined($_ = <STDIN>))
19 :     {
20 :     chomp;
21 :     if ($_ =~ /^>?(\S+)([^\n]*\n)(.*)/s)
22 :     {
23 :     $id = $1;
24 :     $comment = $2;
25 :     $seq = $3;
26 :     $seq =~ s/\s//g;
27 :     if ((! $assigned{$id}) || &FIG::hypo($assigned{$id}))
28 :     {
29 :     print ">$id\n$seq\n";
30 :     }
31 :     }
32 :     }
33 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3