From 8d5a9b9abd84071e9aaa97d18640af0caf172b1b Mon Sep 17 00:00:00 2001
From: Ian Longden <ianl@sanger.ac.uk>
Date: Fri, 27 Aug 2004 13:39:35 +0000
Subject: [PATCH] Added get_available_adaptors to get the pairs of name /
 adaptor modules. This should make it easier to read etc

---
 modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm | 47 ++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm
index f95fd55bdd..306f49a7a8 100755
--- a/modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm
+++ b/modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm
@@ -260,6 +260,53 @@ sub get_db_adaptor {
 }
 
 
+sub get_available_adaptors{
+
+  my %pairs =  ( 'Analysis'             => 'Bio::EnsEMBL::DBSQL::AnalysisAdaptor',
+		 'ArchiveStableId'      => 'Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor',
+		 'Attribute'            => 'Bio::EnsEMBL::DBSQL::AttributeAdaptor',
+		 'AssemblyExceptionFeature' => 'Bio::EnsEMBL::DBSQL::AssemblyExceptionFeatureAdaptor',
+		 'AssemblyMapper'       => 'Bio::EnsEMBL::DBSQL::AssemblyMapperAdaptor',
+		 'Blast'                => 'Bio::EnsEMBL::External::BlastAdaptor',
+		 'MetaContainer'        => 'Bio::EnsEMBL::DBSQL::MetaContainer',
+		 'CoordSystem'   => 'Bio::EnsEMBL::DBSQL::CoordSystemAdaptor',
+		 'CompressedSequence' => 'Bio::EnsEMBL::DBSQL::CompressedSequenceAdaptor',
+		 'DBEntry'              => 'Bio::EnsEMBL::DBSQL::DBEntryAdaptor',
+		 'DnaAlignFeature'      => 'Bio::EnsEMBL::DBSQL::DnaAlignFeatureAdaptor',
+		 'DensityFeature'       => 'Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor',
+		 'DensityType'          => 'Bio::EnsEMBL::DBSQL::DensityTypeAdaptor',
+		 'Exon'                 => 'Bio::EnsEMBL::DBSQL::ExonAdaptor',
+		 'Gene'                 => 'Bio::EnsEMBL::DBSQL::GeneAdaptor',
+		 'KaryotypeBand'        => 'Bio::EnsEMBL::DBSQL::KaryotypeBandAdaptor',
+		 'Marker'               => 'Bio::EnsEMBL::Map::DBSQL::MarkerAdaptor',
+		 'MarkerFeature'        =>
+		 'Bio::EnsEMBL::Map::DBSQL::MarkerFeatureAdaptor',
+		 'MetaCoordContainer'   => 'Bio::EnsEMBL::DBSQL::MetaCoordContainer',
+		 'MiscSet'              => 'Bio::EnsEMBL::DBSQL::MiscSetAdaptor',
+		 'MiscFeature'          => 'Bio::EnsEMBL::DBSQL::MiscFeatureAdaptor',
+		 'PredictionTranscript' => 'Bio::EnsEMBL::DBSQL::PredictionTranscriptAdaptor',
+		 'PredictionExon'       => 'Bio::EnsEMBL::DBSQL::PredictionExonAdaptor',
+		 'ProteinFeature'       => 'Bio::EnsEMBL::DBSQL::ProteinFeatureAdaptor',
+		 'ProteinAlignFeature'  =>
+		 'Bio::EnsEMBL::DBSQL::ProteinAlignFeatureAdaptor',
+		 'SNP'             => 'Bio::EnsEMBL::DBSQL::ProxySNPAdaptor',
+		 'QtlFeature'           => 'Bio::EnsEMBL::Map::DBSQL::QtlFeatureAdaptor',
+		 'Qtl'                  => 'Bio::EnsEMBL::Map::DBSQL::QtlAdaptor',
+		 'RepeatConsensus'      => 'Bio::EnsEMBL::DBSQL::RepeatConsensusAdaptor',
+		 'RepeatFeature'        => 'Bio::EnsEMBL::DBSQL::RepeatFeatureAdaptor',
+		 'Sequence'             => 'Bio::EnsEMBL::DBSQL::SequenceAdaptor',
+		 'SimpleFeature'        => 'Bio::EnsEMBL::DBSQL::SimpleFeatureAdaptor',
+		 'Slice'                => 'Bio::EnsEMBL::DBSQL::SliceAdaptor',
+		 'SupportingFeature'    =>
+		 'Bio::EnsEMBL::DBSQL::SupportingFeatureAdaptor',
+		 'Transcript'           => 'Bio::EnsEMBL::DBSQL::TranscriptAdaptor',
+		 'Translation'          => 'Bio::EnsEMBL::DBSQL::TranslationAdaptor');
+
+  return (%pairs);
+}
+
+
+
 
 ###########################################################
 #
-- 
GitLab