Commit 11f84f47 authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

Update the SYNOPSIS of some of the adaptors so that the example uses the

registry and not get_XXXAdaptor() explicitly.
parent 79f41006
......@@ -3,28 +3,29 @@
=head1 SYNOPSIS
$db = Bio::EnsEMBL::DBSQL::DBAdaptor->new(
-user => 'root',
-dbname => 'pog',
-host => 'caldy',
-driver => 'mysql'
);
$db =
Bio::EnsEMBL::DBSQL::DBAdaptor->new( -user => 'root',
-dbname => 'pog',
-host => 'caldy',
-driver => 'mysql' );
$gene_adaptor = $db->get_GeneAdaptor();
$gene = $gene_adaptor()->fetch_by_stable_id($stable_id);
$gene = $gene_adaptor->fetch_by_stable_id($stable_id);
$slice = $db->get_SliceAdaptor()->fetch_by_chr_start_end('X', 1, 10000);
$slice =
$db->get_SliceAdaptor()->fetch_by_chr_start_end( 'X', 1, 10000 );
=head1 DESCRIPTION
Formerly this class provided database connectivity and a means to retrieve
object adaptors. This class is now provided for convenience and backwards
compatibility, but delegates its connection responsibilities to the
compatibility, and delegates its connection responsibilities to the
DBConnection class (no longer inherited from) and its object adaptor
retrieval to the static Bio::EnsEMBL::Registry.
Please use Bio::EnsEMBL::Registry to retrieve object adaptors.
=head1 CONTACT
......
......@@ -14,13 +14,17 @@ MySQL Database queries to load and store external object references.
=head1 SYNOPSIS
$db_entry_adaptor = $db_adaptor->get_DBEntryAdaptor();
$db_entry = $db_entry_adaptor->fetch_by_dbID($id);
$db_entry_adaptor =
$registry->get_adaptor( 'Human', 'Core', 'DBEntry' );
my $gene = $db_adaptor->get_GeneAdaptor->fetch_by_stable_id('ENSG00000101367');
@db_entries = @{$db_entry_adaptor->fetch_all_by_Gene($gene)};
@gene_ids = $db_entry_adaptor->list_gene_ids_by_extids('BAB15482');
$db_entry = $db_entry_adaptor->fetch_by_dbID($id);
my $gene_adaptor = $registry->get_adaptor( 'Human', 'Core', 'Gene' );
my $gene = $gene_adaptor->fetch_by_stable_id('ENSG00000101367');
@db_entries = @{ $db_entry_adaptor->fetch_all_by_Gene($gene) };
@gene_ids = $db_entry_adaptor->list_gene_ids_by_extids('BAB15482');
=head1 CONTACT
......
......@@ -12,10 +12,12 @@ Bio::EnsEMBL::DBSQL::DensityTypeAdaptor
=head1 SYNOPSIS
my $density_type_adaptor = $database_adaptor->get_DensityTypeAdaptor();
@density_types = @{$density_type_adaptor->fetch_all()};
my $density_type_adaptor =
$registry->get_adaptor( 'Human', 'Core', 'DensityType' );
my $dt = $density_type_adaptor->fetch_by_dbID(12);
my @density_types = @{ $density_type_adaptor->fetch_all() };
my $dt = $density_type_adaptor->fetch_by_dbID(12);
=head1 DESCRIPTION
......
......@@ -11,11 +11,11 @@ Bio::EnsEMBL::DBSQL::DnaAlignFeatureAdaptor - Adaptor for DnaAlignFeatures
=head1 SYNOPSIS
$dafa = $dbadaptor->get_DnaAlignFeatureAdaptor();
$dafa = $registry->get_adaptor( 'Human', 'Core', 'DnaAlignFeature' );
@features = @{$dafa->fetch_by_Slice($slice)};
my @features = @{ $dafa->fetch_by_Slice($slice) };
$dafa->store(@features);
$dafa->store(@features);
=head1 DESCRIPTION
......
......@@ -18,8 +18,9 @@ storage of exon objects
=head1 SYNOPSIS
$exon_adaptor = $database_adaptor->get_ExonAdaptor();
$exon = $exon_adaptor->fetch_by_dbID($dbID);
my $exon_adaptor = $registry->get_adaptor( 'Human', 'Core', 'Exon' );
my $exon = $exon_adaptor->fetch_by_dbID($dbID);
=head1 DESCRIPTION
......
......@@ -15,10 +15,13 @@
=head1 SYNOPSIS
my $meta_container = $db_adaptor->get_MetaContainer();
my $meta_container =
$registry->get_adaptor( 'Human', 'Core', 'MetaContainer' );
my $species = $meta_container->get_Species();
my @mapping_info = @{$meta_container->list_value_by_key('assembly.mapping')};
my @mapping_info =
@{ $meta_container->list_value_by_key('assembly.mapping') };
=head1 DESCRIPTION
......
......@@ -15,14 +15,12 @@ Bio::EnsEMBL::MiscSet objects.
=head1 SYNOPSIS
#$db is a Bio::EnsEMBL::DBSQL::DBAdaptor object:
$msa = $db->get_MiscSetAdaptor();
my $msa = $registry->get_adaptor( 'Human', 'Core', 'MiscSet' );
$misc_set = $msa->fetch_by_dbID(1234);
my $misc_set = $msa->fetch_by_dbID(1234);
$misc_set = $msa->fetch_by_code('clone');
=head1 DESCRIPTION
This class provides database interactivity for MiscSet objects. MiscSets
......
......@@ -14,12 +14,12 @@ Adaptor for ProteinAlignFeatures
=head1 SYNOPSIS
$pafa = $dbadaptor->get_ProteinAlignFeatureAdaptor();
$pafa =
$registry->get_adaptor( 'Human', 'Core', 'ProteinAlignFeature' );
my @features = @{$pafa->fetch_all_by_Slice($slice)};
$pafa->store(@features);
my @features = @{ $pafa->fetch_all_by_Slice($slice) };
$pafa->store(@features);
=head1 DESCRIPTION
......
......@@ -13,8 +13,10 @@ Bio::EnsEMBL::DBSQL::SequenceAdaptor - produce sequence strings from locations
=head1 SYNOPSIS
$seq_adptr = $database_adaptor->get_SequenceAdaptor();
$dna = ${$seq_adptr->fetch_by_Slice_start_end_strand($slice, 1, 1000, -1);}
my $sa = $registry->get_adaptor( 'Human', 'Core', 'Sequence' );
my $dna =
${ $sa->fetch_by_Slice_start_end_strand( $slice, 1, 1000, -1 ) };
=head1 DESCRIPTION
......
......@@ -106,7 +106,7 @@ sub DESTROY {
# Comment out this "__END__" for printing out handy debug information
# (every query if you want).
__END__
#__END__
# To stop caching messing up your timings, try doing the following on
# any adapter:
......
......@@ -12,11 +12,10 @@ features from the database.
=head1 SYNOPSIS
$supporting_feature_adaptor =
$database_adaptor->get_SupportingFeatureAdaptor();
my $sfa =
$registry->get_adaptor( 'Human', 'Core', 'SupportingFeature' );
@supporting_feats =
@{ $supporting_feat_adaptor->fetch_all_by_Exon($exon) };
my @supporting_feats = @{ $sfa->fetch_all_by_Exon($exon) };
=head1 CONTACT
......
......@@ -13,9 +13,10 @@ Bio::EnsEMBL::DBSQL::UnconventionalTranscriptAssociationAdaptor
=head1 SYNOPSIS
$utaa = $database_adaptor->get_UnconventionalTranscriptAssociationAdaptor();
$utaa = $registry->get_adaptor( 'Human', 'Core',
'UnconventionalTranscriptAssociation' );
my $uta = $utaa->fetch_all_by_type('antisense');
my $uta = $utaa->fetch_all_by_type('antisense');
=head1 DESCRIPTION
......@@ -175,6 +176,7 @@ sub fetch_all_by_transcript {
Caller : general
Status : At Risk
: under development
=cut
sub store {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment