}
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";
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
--- /dev/null
+#!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;