diff onto-toolkit/tools/ontology/get_intersection_ontology_from.pl @ 0:4484575e4186

Migrated tool version 0.1 from old tool shed archive to new tool shed repository
author erick-antezana
date Tue, 07 Jun 2011 17:51:45 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/onto-toolkit/tools/ontology/get_intersection_ontology_from.pl	Tue Jun 07 17:51:45 2011 -0400
@@ -0,0 +1,27 @@
+#!/usr/bin/perl -w
+
+use OBO::Parser::OBOParser;
+use OBO::Util::Ontolome;
+
+
+use Carp;
+use strict;
+use warnings;
+
+my @input_files = @ARGV;
+
+my $parse_ont = OBO::Parser::OBOParser->new();
+my $ome = OBO::Util::Ontolome->new();
+
+my @input_ontos;
+foreach(@input_files)
+{
+	my $onto = $parse_ont->work($_) or warn "ontology not defined, check input files\n";
+	push @input_ontos, $onto;
+}
+
+my $intersection_ontology = $ome->intersection(@input_ontos);
+$intersection_ontology->export(\*STDOUT, "obo");
+
+exit 0; 
+