<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>List the terms that are obsolete</title>
</head>
<body>
<h2>Working with obsolete terms</h2>
<ol>
<li><a href="#1">Get all the obsolete terms in a given ontology.</a></li>
</ol>
<ol>
<li> <b><a name="1">Get all the obsolete terms in a given ontology:</a></b>
<pre>
use OBO::Parser::OBOParser;
my $my_parser = OBO::Parser::OBOParser->new();
my $ontology = $my_parser->work("my_obo_ontology.obo");
foreach my $term (@{$ontology->get_terms()}) {
print $term->id(), "\t", $term->def()->text(), "\n" if (defined $term->id() && $term->def()->text() && $term->is_obsolete());
}
</pre>
</li>
</ol>
</body>
</html>