From: preecej Date: Mon, 14 Feb 2011 22:56:30 +0000 (+0000) Subject: First iteration: Determine mapped ChEBI molecules listed in arabidopsis X-Git-Url: http://gitweb.planteome.org/?a=commitdiff_plain;h=ab15b5163f20e0eb2dd9dccbc63a1ee03995992b;p=old-jaiswallab-svn%2F.git First iteration: Determine mapped ChEBI molecules listed in arabidopsis but not in rice. svn path=/; revision=88 --- 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 new file mode 100644 index 0000000..fc24d53 --- /dev/null +++ b/preecej/perl_singletons/aracyc_to_reactome_conversion/ara_rice_exclusive_sets.pl @@ -0,0 +1,68 @@ +#!usr/bin/perl -w +use strict; + +system 'clear'; + +# determine mapped ChEBI molecules listed in arabidopsis but not in rice, +# and vice-versa + +my $dir = "/home/preecej/Documents/projects/reactome/aracyc_to_reactome_conversion/ara_rice_exclusive_sets/"; +my @rice; +my @ara; + +open(IN_FILE, $dir . "Rice_ReferenceNameToChEBIId.txt") or die; +while () { + my $line = $_; + chomp $line; + push(@rice,$line); +} +close IN_FILE; + +open(IN_FILE, $dir . "Ara_ReferenceNameToChEBIId.txt") or die; +while () { + my $line = $_; + chomp $line; + push(@ara,$line); +} +close IN_FILE; + +my %ara_seen; # lookup tbl +my @rice_only; #exclusive to rice + +# build lookup tbl +@ara_seen{@ara} = (); + +foreach my $item (@rice) { + push(@rice_only, $item) unless exists $ara_seen{$item}; +} + +my %rice_seen; # lookup tbl +my @ara_only; #exclusive to rice + +# build lookup tbl +@rice_seen{@rice} = (); + +foreach my $item (@ara) { + push(@ara_only, $item) unless exists $rice_seen{$item}; +} + +my $exc_rice_count = 0; +#print "-- [EXCLUSIVE RICE MOLECULES] --\n"; +foreach my $item (@rice_only) { + $exc_rice_count++; + #print "$exc_rice_count: $item\n"; +} + +#print "$exc_rice_count\n\n"; + +my $exc_ara_count = 0; +print "-- [EXCLUSIVE ARABIDOPSIS MOLECULES] --\n"; +foreach my $item (@ara_only) { + $exc_ara_count++; + print "$exc_ara_count: $item\n"; +} + +print "$exc_ara_count\n\n"; + +# clean up +exit;