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

Diff of /FigKernelScripts/FFB2_run_tests.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2, Tue Jun 8 18:26:04 2010 UTC revision 1.3, Mon Feb 14 22:44:07 2011 UTC
# Line 14  Line 14 
14  use FIG;  use FIG;
15  use FIG_Config;  use FIG_Config;
16    
17  @ARGV == 1 or die "Usage: $0 figfam-dir\n";  use Getopt::Long;
18    
19    my @kmers;
20    my $ordered = 0;
21    
22    my $rc = GetOptions("kmers=i" => \@kmers,
23                        "ordered" => \$ordered);
24    
25    ($rc && @ARGV == 1) or die "Usage: $0  [-ordered] [-kmers k1 -kmers k2 ...] figfam-dir\n";
26    
27  my $ffdir = shift;  my $ffdir = shift;
28    
29  my @tests;  my @tests;
30    
31  my $seq_hit_threshold = 2;  my $seq_hit_threshold = 2;
32  my $score_threshold = 4;  my $score_threshold = 2;
33  my $thresh = "--seqHitThreshold $seq_hit_threshold --scoreThreshold $score_threshold";  my $thresh = "--scoreThreshold $score_threshold";
34    #my $thresh = "--seqHitThreshold $seq_hit_threshold --scoreThreshold $score_threshold";
35    $thresh .= " --orderConstraint" if $ordered;
36    
37  for my $file (</vol/figfam-prod/test_genomes/*.peg.fasta>)  for my $file (</vol/figfam-prod/test_genomes/*.peg.fasta>)
38  {  {
# Line 37  Line 47 
47  #  #
48  # Find the set of kmers we have.  # Find the set of kmers we have.
49  #  #
50    if (@kmers == 0)
51    {
52  opendir(D, "$ffdir/Merged") or die "cannot opendir $ffdir/Merged: $!";  opendir(D, "$ffdir/Merged") or die "cannot opendir $ffdir/Merged: $!";
53  my @kmers = sort { $a->[0] <=> $b->[0] } grep { $_->[0] =~ /^\d+/ && -f $_->[1] } map { [$_, "$ffdir/Merged/$_/table.binary" ] } readdir(D);      @kmers = sort { $a <=> $b } grep { /^\d+$/ } readdir(D);
54        closedir(D);
55    }
56    
57    my @kmers = sort { $a->[0] <=> $b->[0] } grep { $_->[0] =~ /^\d+/ && -f $_->[1] } map { [$_, "$ffdir/Merged/$_/table.binary" ] } @kmers;
58  @kmers > 0 or die "No kmers found in $ffdir/Merged\n";  @kmers > 0 or die "No kmers found in $ffdir/Merged\n";
59    
60  print "testing kmers " . join(" ", map { $_->[0] } @kmers) . "\n";  print "testing kmers " . join(" ", map { $_->[0] } @kmers) . "\n";

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3