From: preecej Date: Tue, 19 Apr 2011 20:16:18 +0000 (+0000) Subject: Added step-interaction data type and format converter script X-Git-Url: http://gitweb.planteome.org/?a=commitdiff_plain;h=bf79fce4bd7b978064c2fe865ddacd200585b01f;p=old-jaiswallab-svn%2F.git Added step-interaction data type and format converter script svn path=/; revision=91 --- diff --git a/preecej/perl_singletons/aracyc_to_reactome_conversion/ara_rice_exclusive_sets.pl b/preecej/perl_singletons/aracyc_to_reactome_conversion/ara_rice_exclusive_sets.pl index fc24d53..75e6ea0 100644 --- a/preecej/perl_singletons/aracyc_to_reactome_conversion/ara_rice_exclusive_sets.pl +++ b/preecej/perl_singletons/aracyc_to_reactome_conversion/ara_rice_exclusive_sets.pl @@ -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"; diff --git a/preecej/perl_singletons/aracyc_to_reactome_conversion/convert_bad_pub_authors_to_years.pl b/preecej/perl_singletons/aracyc_to_reactome_conversion/convert_bad_pub_authors_to_years.pl index a3c7023..8769b10 100644 --- a/preecej/perl_singletons/aracyc_to_reactome_conversion/convert_bad_pub_authors_to_years.pl +++ b/preecej/perl_singletons/aracyc_to_reactome_conversion/convert_bad_pub_authors_to_years.pl @@ -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 index 0000000..13d8e83 --- /dev/null +++ b/preecej/perl_singletons/aracyc_to_reactome_conversion/convert_bad_step_interaction_datatypes.pl @@ -0,0 +1,45 @@ +#!usr/bin/perl -w +use strict; + +system 'clear'; + +# temp script used to fix elements that mistakenly refer to years in +# parentheses. replaces those elements with . +# Example: +# BEFORE: catalysis42055 +# AFTER: + +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 () +{ + $i++; + + # read the next line of the file + my $line = $_; + chomp $line; + + # is it a bad step interaction? + if ($line =~ //) + { + 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;