File: applyRAxML2AllFilesInDirectory.pl

package info (click to toggle)
raxml 8.2.12%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,516 kB
  • sloc: ansic: 57,710; perl: 125; sh: 63; makefile: 52
file content (45 lines) | stat: -rw-r--r-- 635 bytes parent folder | download | duplicates (6)
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);
    }

   
}