Hello!

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

Note that updates take place every 10 minutes, commits may not be seen immediately.
swaps the GBWI ids w/ GRMZ ids for Gramene web site indexing
authorpreecej <preecej@localhost>
Thu, 2 Jan 2014 23:04:34 +0000 (23:04 +0000)
committerpreecej <preecej@localhost>
Thu, 2 Jan 2014 23:04:34 +0000 (23:04 +0000)
svn path=/; revision=518

Personnel/preecej/perl_singletons/gramene/maizecyc_GRMZ_GBWI_swap.pl [new file with mode: 0644]

diff --git a/Personnel/preecej/perl_singletons/gramene/maizecyc_GRMZ_GBWI_swap.pl b/Personnel/preecej/perl_singletons/gramene/maizecyc_GRMZ_GBWI_swap.pl
new file mode 100644 (file)
index 0000000..2747acf
--- /dev/null
@@ -0,0 +1,38 @@
+#!/usr/bin/perl -w
+use strict;
+
+my $map_file = $ARGV[0]; #GBWI::GRMZ mapping file
+
+# # cyc pathway dump file (generated w/ brie:/usr/local/gramene/gramene-lib/scripts/pathway/format-pathway-data.pl (see README for conventional usage))
+my $dump_file = $ARGV[1]; 
+my %map_hash;
+
+open(MAP_FILE,$map_file) or die("could not open $map_file");
+while (<MAP_FILE>)
+{
+    my $line = $_;
+    chomp $line;
+    my @line_ary = split('\t',$line);
+    my $key = $line_ary[0];
+    $key =~ s/\s+$//;
+    my $val = $line_ary[1];
+    $val =~ s/^\s+//;
+    
+    $map_hash{$key} = $val;
+}
+close(MAP_FILE);
+
+open(DUMP_FILE,$dump_file) or die("could not open $dump_file");
+while (<DUMP_FILE>)
+{
+    my $line = $_;
+    chomp $line;
+    my @line_ary = split('\t',$line);
+    
+    if ($map_hash{$line_ary[0]}) {
+        print $map_hash{$line_ary[0]} . "\t" . $line_ary[1] . "\t" . $line_ary[2] . "\t" 
+            . $line_ary[3] . "\t" . $line_ary[4] . "\t" . $line_ary[5] . "\t" . $line_ary[6] . "\n";
+    }
+}
+close(DUMP_FILE);
+