|
Revision 1429, 0.6 KB
(checked in by thomas, 3 years ago)
|
|
added support for line anchors
added new template for reaction
added small perl script to convert multiple pathways (e.g. from mapp to gpml)
|
| Line | |
|---|
| 1 | use File::Find; |
|---|
| 2 | use warnings; |
|---|
| 3 | use strict; |
|---|
| 4 | use Cwd; |
|---|
| 5 | |
|---|
| 6 | my $dir = shift(@ARGV); |
|---|
| 7 | my $ext_in = shift(@ARGV); |
|---|
| 8 | my $ext_out = shift(@ARGV); |
|---|
| 9 | |
|---|
| 10 | print("Converting all $ext_in files in $dir to $ext_out files\n"); |
|---|
| 11 | |
|---|
| 12 | my $curr_dir = getcwd(); |
|---|
| 13 | |
|---|
| 14 | find(\&edits, $dir); |
|---|
| 15 | |
|---|
| 16 | sub edits() { |
|---|
| 17 | my $file = $_; |
|---|
| 18 | if($file =~ /.$ext_in$/) { |
|---|
| 19 | print "File name is $_\n\t\tFull path is $File::Find::name\n"; |
|---|
| 20 | my $newfile = $file; |
|---|
| 21 | $newfile =~ s/.$ext_in$/.$ext_out/; |
|---|
| 22 | my $cmd = "java -jar \"$curr_dir/pathvisio_core.jar\" \"$file\" \"$newfile\""; |
|---|
| 23 | print("Executing: $cmd\n"); |
|---|
| 24 | system($cmd); |
|---|
| 25 | } |
|---|
| 26 | } |
|---|