Hello!

To see the file structure, click on "tree".

Note that updates take place every 10 minutes, commits may not be seen immediately.
Includes Mamatha's first updates to opt args
authorpreecej <preecej@localhost>
Thu, 28 Jul 2011 18:39:11 +0000 (18:39 +0000)
committerpreecej <preecej@localhost>
Thu, 28 Jul 2011 18:39:11 +0000 (18:39 +0000)
svn path=/; revision=127

preecej/perl_singletons/pathway_gene_swapper.pl

index d472432f41e4fe9b363162605375c2441f6db9af..ca17c35398d64f4ce7f63892d7dfd7a56616b41d 100644 (file)
@@ -75,7 +75,9 @@ use XML::DOM;
 # ---------------------------------------------------------------------------
 
 my %opts; # arg options
-my $input_file;
+my $input_gpml_file;
+my $input_gene_file;
+my $input_config_file;
 my $output_file;
 my $verbose = 0; # flag for verbose output
 my $debug = 0; # debugging switch
@@ -91,19 +93,33 @@ my $gpml_doc;
 sub init
 {
     # read and set options
-    getopts('i:o:vd', \%opts);
+    getopts('i:g:c:o:vd', \%opts);
     
     foreach my $key (keys %opts) { 
         my $value = $opts{$key};
         switch ($key) {
             case "i" { 
                 if ($value =~ /\//) { # assume path
-                    $input_file = $value;
+                    $input_gpml_file = $value;
                 } else {
-                    $input_file = getcwd() . "\/$value";
+                    $input_gpml_file = getcwd() . "\/$value";
                 }
             }
-            case "o" {
+            case "g" { 
+                if ($value =~ /\//) { # assume path
+                    $input_gene_file = $value;
+                } else {
+                    $input_gene_file = getcwd() . "\/$value";
+                }
+            }
+              case "c" { 
+                if ($value =~ /\//) { # assume path
+                    $input_config_file = $value;
+                } else {
+                    $input_config_file = getcwd() . "\/$value";
+                }
+            }
+              case "o" {
                 if ($value =~ /\//) { # assume path
                     $output_file = $value;
                 } else {
@@ -122,7 +138,9 @@ sub init
         . "------------------ Pathway Gene Swapper --------------------\n"
         . "------------------------------------------------------------\n"
         . "\n"
-        . "Input File: $input_file\n"
+        . "Input File: $input_gpml_file\n"
+       . "            $input_gene_file\n"
+       . "            $input_config_file\n"
         . "Output File: $output_file\n"
         . "Running in verbose mode? " . ($verbose ? "Yes" : "No") . "\n"
         . "Running in debug mode? " . ($verbose ? "Yes" : "No") . "\n"