Hello!

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

Note that updates take place every 10 minutes, commits may not be seen immediately.
Added step-interaction data type and format converter script
authorpreecej <preecej@localhost>
Tue, 19 Apr 2011 20:16:18 +0000 (20:16 +0000)
committerpreecej <preecej@localhost>
Tue, 19 Apr 2011 20:16:18 +0000 (20:16 +0000)
svn path=/; revision=91

preecej/perl_singletons/aracyc_to_reactome_conversion/ara_rice_exclusive_sets.pl
preecej/perl_singletons/aracyc_to_reactome_conversion/convert_bad_pub_authors_to_years.pl
preecej/perl_singletons/aracyc_to_reactome_conversion/convert_bad_step_interaction_datatypes.pl [new file with mode: 0644]

index fc24d53c4445875d417d3a5d8b9bc3a888aa3cc5..75e6ea0f92ddc1c69bb1f10f1c1272618806f645 100644 (file)
@@ -47,10 +47,10 @@ foreach my $item (@ara) {
 }
 
 my $exc_rice_count = 0; 
-#print "-- [EXCLUSIVE RICE MOLECULES] --\n";
+print "-- [EXCLUSIVE RICE MOLECULES] --\n";
 foreach my $item (@rice_only) {
     $exc_rice_count++;
-     #print "$exc_rice_count: $item\n";
+     print "$exc_rice_count: $item\n";
 }
 
 #print "$exc_rice_count\n\n";
index a3c7023dd5c8751302e46196866066ee0a8ed301..8769b10bd60c14467af70f78d79dfc51d7d612ce 100644 (file)
@@ -8,8 +8,8 @@ system 'clear';
 
 my $dir = "/home/preecej/Documents/projects/reactome/aracyc_to_reactome_conversion/aracyc_data/";
 
-open(in_file, $dir . "test_year_swap.owl");
-open(out_file, ">>" . $dir . "test_year_swap_fixed.owl");
+open(in_file, $dir . "aracyc_v8_0_biopax-level2_STOIdouble.owl");
+open(out_file, ">>" . $dir . "aracyc_v8_0_biopax-level2_STOIdouble_AUTHORSYEAR.owl");
 
 my $i = 0; # limiter for testing
 
diff --git a/preecej/perl_singletons/aracyc_to_reactome_conversion/convert_bad_step_interaction_datatypes.pl b/preecej/perl_singletons/aracyc_to_reactome_conversion/convert_bad_step_interaction_datatypes.pl
new file mode 100644 (file)
index 0000000..13d8e83
--- /dev/null
@@ -0,0 +1,45 @@
+#!usr/bin/perl -w
+use strict;
+
+system 'clear';
+
+# temp script used to fix <bp:STEP-INTERACTION> elements that mistakenly refer to years in
+# parentheses. replaces those elements with <bp:YEAR>.
+# Example:
+#   BEFORE: <bp:STEP-INTERACTIONS rdf:datatype="http://www.w3.org/2001/XMLSchema#string">catalysis42055</bp:STEP-INTERACTIONS>
+#   AFTER:  <bp:STEP-INTERACTIONS rdf:resource="#catalysis42055"/>
+
+my $dir = "/home/preecej/Documents/projects/reactome/aracyc_to_reactome_conversion/aracyc_data/";
+
+open(in_file, $dir . "aracyc_v8_0_biopax-level2_STOIdouble_AUTHORSYEAR.owl");
+open(out_file, ">>" . $dir . "aracyc_v8_0_biopax-level2_STOIdouble_AUTHORSYEAR_STEPINT.owl");
+
+my $i = 0; # limiter for testing
+
+while (<in_file>)
+{
+    $i++;
+
+    # read the next line of the file
+    my $line = $_;
+    chomp $line;
+    
+    # is it a bad step interaction?
+    if ($line =~ /<bp:STEP-INTERACTIONS rdf:datatype="http:\/\/www.w3.org\/2001\/XMLSchema#string">/)
+    {
+        print "$i: $line\n";
+        # change the line to a well-formatted STEP-INTERACTION tag
+        $line =~ s/datatype="http:\/\/www.w3.org\/2001\/XMLSchema#string">/resource="\#/g;
+        $line =~ s/<\/bp:STEP-INTERACTIONS>/"\/>/;
+        print "$i: $line\n";
+    }
+     print out_file "$line\n"; 
+    #last if $i > 1000; # let's test w/ low numbers for now
+}
+
+close in_file;
+close out_file;
+
+# clean up
+exit;