From 3df039d4419d56732ea0be7c0d1942737cdacf9c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20Kusalananda=20K=C3=A4h=C3=A4ri?=
 <ak4@sanger.ac.uk>
Date: Thu, 10 Feb 2011 11:46:25 +0000
Subject: [PATCH] Add another example to fetch_all_by_name().

---
 modules/Bio/EnsEMBL/DBSQL/OntologyTermAdaptor.pm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/Bio/EnsEMBL/DBSQL/OntologyTermAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/OntologyTermAdaptor.pm
index 91cb05196f..4fe661ef98 100644
--- a/modules/Bio/EnsEMBL/DBSQL/OntologyTermAdaptor.pm
+++ b/modules/Bio/EnsEMBL/DBSQL/OntologyTermAdaptor.pm
@@ -66,13 +66,16 @@ use base qw( Bio::EnsEMBL::DBSQL::BaseAdaptor );
   Arg [2]       : (optional) String, name of ontology
 
   Description   : Fetches ontology term(s) given a name, a synonym, or a
-                  SQL pattern like "%splice_site"
+                  SQL pattern like "%splice_site%"
 
   Example       :
 
     my ($term) =
       @{ $ot_adaptor->fetch_by_name( 'DNA_binding_site', 'SO' ) };
 
+    # Will find terms in both SO and GO:
+    my @terms = @{ $ot_adaptor->fetch_by_name('%splice_site%') };
+
   Return type   : listref of Bio::EnsEMBL::OntologyTerm
 
 =cut
-- 
GitLab