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

View of /FigKernelScripts/CSA_make_conn.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (download) (as text) (annotate)
Mon Jun 27 17:13:58 2011 UTC (8 years, 4 months ago) by overbeek
Branch: MAIN
CVS Tags: mgrast_dev_08112011, mgrast_dev_08022011, rast_rel_2014_0912, myrast_rel40, rast_rel_2014_0729, mgrast_release_3_1_2, mgrast_release_3_1_1, rast_rel_2011_0928, mgrast_version_3_2, mgrast_dev_12152011, mgrast_dev_10262011, HEAD
Changes since 1.1: +3 -0 lines
make part of myRAST distribution

use strict;
#
# This is a SAS Component
#
use Data::Dumper;
use SeedEnv;

my $usage = "usage: CSA_make_conn DirOfGenomes ComparisonDirectories";
my($inD,$outD);

(
 ($inD  = shift @ARGV) && opendir(IN,$inD) &&
 ($outD = shift @ARGV) 
)
    || die $usage;

my @genomes = sort { ($a <=> $b) or ($a cmp $b) } grep { $_ =~ /^\d+\.\d+$/ } readdir(IN);
closedir(IN);

mkdir($outD,0777) || warn "extending existing directory\n";
foreach my $g1 (@genomes)
{
    foreach my $g2 (@genomes)
    {
	if (($g1 ne $g2) && (! -s "$outD/$g1-$g2/layout.after.first.pass"))
	{
	    &run("perl CSA_get_pins.pl $inD/$g1 $inD/$g2 $outD/$g1-$g2 ../Data/TBLs/$g1/peg/tbl ../Data/TBLs/$g1/rna/tbl ../Data/Functions/$g1");
	}
    }
}

sub run {
    my($cmd) = @_;

    my $rc = system($cmd);
    if ($rc)
    {
	die "$rc: $cmd failed";
    }
}


MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3