File: dbobda.pl

package info (click to toggle)
emboss 6.6.0%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 571,544 kB
  • sloc: ansic: 460,579; java: 29,439; perl: 13,573; sh: 12,754; makefile: 3,283; csh: 706; asm: 351; xml: 239; pascal: 237; modula3: 8
file content (42 lines) | stat: -rwxr-xr-x 1,261 bytes parent folder | download | duplicates (7)
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
#!/usr/bin/perl -w

use Cwd;

%dbformats = ("embl" => "embl",
	      "genbank" => "genbank",
	      "swiss" => "swissprot",
	      "wormpep" => "fasta");

%dbfiles = ("embl" => "*.dat",
	    "genbank" => "*.seq",
	    "swiss" => "*.dat",
	    "wormpep" => "wormpep");

$distribtop = "/home/pmr/devemboss";

#open (VERS, "embossversion -full -auto|") || die "Cannot run embossversion";
#while (<VERS>) {
#    if(/InstallDirectory: +(\S+)/) {
#	$installtop = $1;
#	$installtop =~ s/\/$//;
#    }
#    if(/BaseDirectory: +(\S+)/) {
#	$distribtop = $1;
#	$distribtop =~ s/\/$//;
#    }
#}
#close VERS;

foreach $db (sort(keys(%dbformats))) {
    chdir ("$distribtop/test/$db");
    printf "$db: %s\n", cwd(); ;
    $location = "$db";
    if($db eq "wormpep") {$location = "worm"}
    elsif($db eq "swiss") {$location = "swissprot"}
    $format = $dbformats{$db};
    $dbfiles = $dbfiles{$db};
    system "mv $location/CVS ./savecvs";
    print STDERR "~/devemboss/scripts/bioflat_index_obda.pl --create --indextype flat --dbname $location --location . --format $format $dbfiles\n";
    system "~/devemboss/scripts/bioflat_index_obda.pl --create --indextype flat --dbname $location --location . --format $format $dbfiles";
    system "mv ./savecvs $location/CVS";
}