Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl
Commits
11f84f47
Commit
11f84f47
authored
Jul 01, 2008
by
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
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
53 additions
and
41 deletions
+53
-41
modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm
+10
-9
modules/Bio/EnsEMBL/DBSQL/DBEntryAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/DBEntryAdaptor.pm
+9
-5
modules/Bio/EnsEMBL/DBSQL/DensityTypeAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/DensityTypeAdaptor.pm
+5
-3
modules/Bio/EnsEMBL/DBSQL/DnaAlignFeatureAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/DnaAlignFeatureAdaptor.pm
+3
-3
modules/Bio/EnsEMBL/DBSQL/ExonAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/ExonAdaptor.pm
+3
-2
modules/Bio/EnsEMBL/DBSQL/MetaContainer.pm
modules/Bio/EnsEMBL/DBSQL/MetaContainer.pm
+5
-2
modules/Bio/EnsEMBL/DBSQL/MiscSetAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/MiscSetAdaptor.pm
+2
-4
modules/Bio/EnsEMBL/DBSQL/ProteinAlignFeatureAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/ProteinAlignFeatureAdaptor.pm
+4
-4
modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm
+4
-2
modules/Bio/EnsEMBL/DBSQL/StatementHandle.pm
modules/Bio/EnsEMBL/DBSQL/StatementHandle.pm
+1
-1
modules/Bio/EnsEMBL/DBSQL/SupportingFeatureAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/SupportingFeatureAdaptor.pm
+3
-4
modules/Bio/EnsEMBL/DBSQL/UnconventionalTranscriptAssociationAdaptor.pm
...sEMBL/DBSQL/UnconventionalTranscriptAssociationAdaptor.pm
+4
-2
No files found.
modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm
View file @
11f84f47
...
...
@@ -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
...
...
modules/Bio/EnsEMBL/DBSQL/DBEntryAdaptor.pm
View file @
11f84f47
...
...
@@ -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
...
...
modules/Bio/EnsEMBL/DBSQL/DensityTypeAdaptor.pm
View file @
11f84f47
...
...
@@ -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
...
...
modules/Bio/EnsEMBL/DBSQL/DnaAlignFeatureAdaptor.pm
View file @
11f84f47
...
...
@@ -11,11 +11,11 @@ Bio::EnsEMBL::DBSQL::DnaAlignFeatureAdaptor - Adaptor for DnaAlignFeatures
=head1 SYNOPSIS
$dafa = $
dbadaptor->get_
DnaAlignFeature
Adaptor(
);
$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
...
...
modules/Bio/EnsEMBL/DBSQL/ExonAdaptor.pm
View file @
11f84f47
...
...
@@ -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
...
...
modules/Bio/EnsEMBL/DBSQL/MetaContainer.pm
View file @
11f84f47
...
...
@@ -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
...
...
modules/Bio/EnsEMBL/DBSQL/MiscSetAdaptor.pm
View file @
11f84f47
...
...
@@ -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
...
...
modules/Bio/EnsEMBL/DBSQL/ProteinAlignFeatureAdaptor.pm
View file @
11f84f47
...
...
@@ -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
...
...
modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm
View file @
11f84f47
...
...
@@ -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
...
...
modules/Bio/EnsEMBL/DBSQL/StatementHandle.pm
View file @
11f84f47
...
...
@@ -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:
...
...
modules/Bio/EnsEMBL/DBSQL/SupportingFeatureAdaptor.pm
View file @
11f84f47
...
...
@@ -12,11 +12,10 @@ features from the database.
=head1 SYNOPSIS
$supporting_feature_adaptor
=
$
database_adaptor->get_
SupportingFeature
Adaptor(
);
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
...
...
modules/Bio/EnsEMBL/DBSQL/UnconventionalTranscriptAssociationAdaptor.pm
View file @
11f84f47
...
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment