view 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 source

#!/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;