1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
#!/usr/bin/env perl
#print $ARGV[0]." ".$ARGV[1]." ".$#ARGV."\n";
if(($#ARGV != 1))
{
print "ERROR: usage: perl applyRAxML2AllFilesInDirectory.pl directoryName \"raxmlCommandLine\" \n";
exit;
}
$directory = $ARGV[0];
$commandLine = $ARGV[1];
@fileList;
opendir (DIR, $directory) or die $!;
while (my $file = readdir(DIR))
{
#print "$file\n";
push(@fileList, $file);
}
chdir DIR;
closedir(DIR);
foreach (@fileList)
{
$string = $_;
if($string !~ /^[.]/ && $string !~ /.+~/)
{
$cmd = $commandLine." -n Analysis.".$string." -s ".$string."\n";
print "$cmd";
system($cmd);
}
}
|