diff --git a/modules/Bio/EnsEMBL/AffyArray.pm b/modules/Bio/EnsEMBL/AffyArray.pm index 82e4322a03b54e1c4ffb3606848a092618f9768d..96cb0f90a4a9fe99779ce49a0708c7f9f4c3fa23 100644 --- a/modules/Bio/EnsEMBL/AffyArray.pm +++ b/modules/Bio/EnsEMBL/AffyArray.pm @@ -1,40 +1,45 @@ -# -# Ensembl module for Bio::EnsEMBL::AffyArray -# -# You may distribute this module under the same terms as Perl itself +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::AffyArray - A module to represent an Affymetrix array. + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html -use Bio::EnsEMBL::AffyArray; +=head1 CONTACT -my $array = Bio::EnsEMBL::AffyArray->new( - -NAME => 'Affy-1', - -INCLUDED_IN => $another_array, - -SETSIZE => 16, -); + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 DESCRIPTION + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -An AffyArray object represents an Affymetrix array. The data (currently the -name, probeset size and parent array) are stored in the oligo_array table. +=cut -Each array can have a parent array (another array that contains all the probes -of this array). This is rarely (if ever) used. +=head1 NAME -=head1 AUTHOR +Bio::EnsEMBL::AffyArray - A module to represent an Affymetrix array. -This module was originally written by Arne Stabenau, but was changed to be a -subclass of OligoArray by Ian Sealy. +=head1 SYNOPSIS -This module is part of the Ensembl project: http://www.ensembl.org/ + use Bio::EnsEMBL::AffyArray; -=head1 CONTACT + my $array = Bio::EnsEMBL::AffyArray->new( + -NAME => 'Affy-1', + -INCLUDED_IN => $another_array, + -SETSIZE => 16, + ); + +=head1 DESCRIPTION + +An AffyArray object represents an Affymetrix array. The data (currently +the name, probeset size and parent array) are stored in the oligo_array +table. -Post comments or questions to the Ensembl development list: ensembl-dev@ebi.ac.uk +Each array can have a parent array (another array that contains all the +probes of this array). This is rarely (if ever) used. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/AffyFeature.pm b/modules/Bio/EnsEMBL/AffyFeature.pm index 115afd480a464d4b5414565961ccbf0696e60748..bb8671d10acbe40259fa8a296d1d6084690daca6 100644 --- a/modules/Bio/EnsEMBL/AffyFeature.pm +++ b/modules/Bio/EnsEMBL/AffyFeature.pm @@ -1,7 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::AffyFeature -# -# You may distribute this module under the same terms as Perl itself +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -10,33 +25,22 @@ mapping. =head1 SYNOPSIS -use Bio::EnsEMBL::AffyFeature; + use Bio::EnsEMBL::AffyFeature; -my $feature = Bio::EnsEMBL::AffyFeature->new( - -PROBE => $probe, - -MISMATCHCOUNT => 0, - -SLICE => $chr_1_slice, - -START => 1_000_000, - -END => 1_000_024, - -STRAND => -1, -); + my $feature = Bio::EnsEMBL::AffyFeature->new( + -PROBE => $probe, + -MISMATCHCOUNT => 0, + -SLICE => $chr_1_slice, + -START => 1_000_000, + -END => 1_000_024, + -STRAND => -1, + ); =head1 DESCRIPTION An AffyFeature object represents the genomic placement of an AffyProbe object. The data are stored in the oligo_feature table. -=head1 AUTHOR - -This module was originally written by Arne Stabenau, but was changed to be a -subclass of OligoArray by Ian Sealy. - -This module is part of the Ensembl project: http://www.ensembl.org/ - -=head1 CONTACT - -Post comments or questions to the Ensembl development list: ensembl-dev@ebi.ac.uk - =head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/AffyProbe.pm b/modules/Bio/EnsEMBL/AffyProbe.pm index f1c02bab6349c1b361599e2d1244639b0d0f71d3..51684829a4a0082c204882d3bebefcc8ca170225 100644 --- a/modules/Bio/EnsEMBL/AffyProbe.pm +++ b/modules/Bio/EnsEMBL/AffyProbe.pm @@ -1,47 +1,52 @@ -# -# Ensembl module for Bio::EnsEMBL::AffyProbe -# -# You may distribute this module under the same terms as Perl itself +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::AffyProbe - A module to represent an Affymetrix probe. + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html -use Bio::EnsEMBL::OligoProbe; +=head1 CONTACT -my $probe = Bio::EnsEMBL::OligoProbe->new( - -PROBENAME => 'Probe-1', - -ARRAY => $array, - -PROBESET => 'Probeset-1', -); + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 DESCRIPTION + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -An AffyProbe object represents an Affy probe on a microarray. The data -(currently the name, array, length, probeset and description) are stored in the -oligo_probe table. The complete name of a probe is the concatenation of the -array name, the probeset and the probe name. +=cut -For Affy arrays, a probe can be part of more than one array, but only part of -one probeset. On each Affy array the probe has a slightly different name. For -example, two different complete names for the same probe might be -DrosGenome1:AFFX-LysX-5_at:535:35; and Drosophila_2:AFFX-LysX-5_at:460:51;. In -the database, these two probes will have the same oligo_probe_id. Thus the same -Affy probe can have a number of different names and complete names depending on -which array it's on. +=head1 NAME + +Bio::EnsEMBL::AffyProbe - A module to represent an Affymetrix probe. -=head1 AUTHOR +=head1 SYNOPSIS -This module was originally written by Arne Stabenau, but was changed to be a -subclass of OligoArray by Ian Sealy. + use Bio::EnsEMBL::OligoProbe; -This module is part of the Ensembl project: http://www.ensembl.org/ + my $probe = Bio::EnsEMBL::OligoProbe->new( + -PROBENAME => 'Probe-1', + -ARRAY => $array, + -PROBESET => 'Probeset-1', + ); -=head1 CONTACT +=head1 DESCRIPTION -Post comments or questions to the Ensembl development list: ensembl-dev@ebi.ac.uk +An AffyProbe object represents an Affy probe on a microarray. The +data (currently the name, array, length, probeset and description) are +stored in the oligo_probe table. The complete name of a probe is the +concatenation of the array name, the probeset and the probe name. + +For Affy arrays, a probe can be part of more than one array, but +only part of one probeset. On each Affy array the probe has a +slightly different name. For example, two different complete names +for the same probe might be DrosGenome1:AFFX-LysX-5_at:535:35; and +Drosophila_2:AFFX-LysX-5_at:460:51;. In the database, these two probes +will have the same oligo_probe_id. Thus the same Affy probe can have a +number of different names and complete names depending on which array +it's on. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/AlignStrainSlice.pm b/modules/Bio/EnsEMBL/AlignStrainSlice.pm index 2370ffcd19c3c9a52868c0d3ef9e100b85e6daa8..a93d07f7bbf0e4456f622ba421e83c3d51c2b22d 100644 --- a/modules/Bio/EnsEMBL/AlignStrainSlice.pm +++ b/modules/Bio/EnsEMBL/AlignStrainSlice.pm @@ -1,12 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::AlignStrainSlice -# -# -# Copyright Team Ensembl -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -14,39 +24,37 @@ Bio::EnsEMBL::AlignStrainSlice - Represents the slice of the genome aligned with =head1 SYNOPSIS - $sa = $db->get_SliceAdaptor; + $sa = $db->get_SliceAdaptor; - $slice = $sa->fetch_by_region('chromosome', 'X', 1_000_000, 2_000_000); + $slice = + $sa->fetch_by_region( 'chromosome', 'X', 1_000_000, 2_000_000 ); - $strainSlice1 = $slice->get_by_Strain($strain_name1); - $strainSlice2 = $slice->get_by_Strain($strain_name2); + $strainSlice1 = $slice->get_by_Strain($strain_name1); + $strainSlice2 = $slice->get_by_Strain($strain_name2); - my @strainSlices; - push @strainSlices, $strainSlice1; - push @strainSlices, $strainSlice2; + my @strainSlices; + push @strainSlices, $strainSlice1; + push @strainSlices, $strainSlice2; - $alignSlice = Bio::EnsEMBL::AlignStrainSlice->new(-SLICE => $slice, - -STRAINS => \@strainSlices); + $alignSlice = Bio::EnsEMBL::AlignStrainSlice->new( + -SLICE => $slice, + -STRAINS => \@strainSlices + ); - #get coordinates of variation in alignSlice - my $alleleFeatures = $strainSlice1->get_all_AlleleFeature_Slice(); - foreach my $af (@{$alleleFeatures}){ - my $new_feature = $alignSlice->alignFeature($af, $strainSlice1); - print "Coordinates of the feature in AlignSlice are: ", $new_feature->start, "-", $new_feature->end, "\n"; - } + # Get coordinates of variation in alignSlice + my $alleleFeatures = $strainSlice1->get_all_AlleleFeature_Slice(); + foreach my $af ( @{$alleleFeatures} ) { + my $new_feature = $alignSlice->alignFeature( $af, $strainSlice1 ); + print( "Coordinates of the feature in AlignSlice are: ", + $new_feature->start, "-", $new_feature->end, "\n" ); + } =head1 DESCRIPTION -A AlignStrainSlice object represents a region of a genome align for certain strains. It can be used to align -certain strains to a reference slice - -=head1 CONTACT - -This modules is part of the Ensembl project http://www.ensembl.org - -Questions can be posted to the ensembl-dev mailing list: -ensembl-dev@ebi.ac.uk +A AlignStrainSlice object represents a region of a genome align for +certain strains. It can be used to align certain strains to a reference +slice. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/Analysis.pm b/modules/Bio/EnsEMBL/Analysis.pm index e7b5335d8ad645ffce08f84896f9d36030080d59..e11add0ca7ebb2b3cfbbc949dcbdf29e5010fbfb 100755 --- a/modules/Bio/EnsEMBL/Analysis.pm +++ b/modules/Bio/EnsEMBL/Analysis.pm @@ -1,15 +1,22 @@ -# -# Object for storing sequence analysis details -# -# Cared for by Michele Clamp <michele@sanger.ac.uk> -# -# Copyright Michele Clamp -# -# You may distribute this module under the same terms as perl itself -# -# POD documentation - main docs before the code - -=pod +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -17,34 +24,30 @@ Bio::EnsEMBL::Analysis.pm - Stores details of an analysis run =head1 SYNOPSIS - my $obj = new Bio::EnsEMBL::Analysis( - -id => $id, - -logic_name => 'SWIRBlast', - -db => $db, - -db_version => $db_version, - -db_file => $db_file, - -program => $program, - -program_version => $program_version, - -program_file => $program_file, - -gff_source => $gff_source, - -gff_feature => $gff_feature, - -module => $module, - -module_version => $module_version, - -parameters => $parameters, - -created => $created, - -description => 'some warm words about this analysis', - -display_label => 'UNIprot alignment', - -displayable => '1', - -web_data => 'web metadata info' - ); + my $obj = new Bio::EnsEMBL::Analysis( + -id => $id, + -logic_name => 'SWIRBlast', + -db => $db, + -db_version => $db_version, + -db_file => $db_file, + -program => $program, + -program_version => $program_version, + -program_file => $program_file, + -gff_source => $gff_source, + -gff_feature => $gff_feature, + -module => $module, + -module_version => $module_version, + -parameters => $parameters, + -created => $created, + -description => 'some warm words about this analysis', + -display_label => 'UNIprot alignment', + -displayable => '1', + -web_data => 'web metadata info' + ); =head1 DESCRIPTION -Object to store details of an analysis run - -=head1 CONTACT - -Post questions to the EnsEMBL dev mailing list: <ensembl-dev@ebi.ac.uk> +Object to store details of an analysis run. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/Analysis/PairAlign.pm b/modules/Bio/EnsEMBL/Analysis/PairAlign.pm index d72eb42ebf031f493017e3ca709dc831611a89c4..d6db9cae8160bae261494b12e193f50ed69ee67d 100755 --- a/modules/Bio/EnsEMBL/Analysis/PairAlign.pm +++ b/modules/Bio/EnsEMBL/Analysis/PairAlign.pm @@ -1,11 +1,22 @@ -# -# BioPerl module for PairAlign object -# -# Cared for by Ewan Birney <birney@sanger.ac.uk> -# -# Copyright Ewan Birney -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut # POD documentation - main docs before the code @@ -22,41 +33,33 @@ Give standard usage here Contains list of sub alignments making up a dna-dna alignment Creation: - - my $pair = new Bio::EnsEMBL::FeaturePair(-start => $qstart, - -end => $qend, - -strand => $qstrand, - -hstart => $hstart, - -hend => $hend, - -hend => $hstrand, - ); - my $pairaln = new Bio::EnsEMBL::Analysis::PairAlign; - $pairaln->addFeaturePair($pair); + my $pair = new Bio::EnsEMBL::FeaturePair( + -start => $qstart, + -end => $qend, + -strand => $qstrand, + -hstart => $hstart, + -hend => $hend, + -hend => $hstrand, + ); + + my $pairaln = new Bio::EnsEMBL::Analysis::PairAlign; + $pairaln->addFeaturePair($pair); Any number of pair alignments can be added to the PairAlign object Manipulation: -To convert between coordinates : - - my $cdna_coord = $pair->genomic2cDNA($gen_coord); - my $gen_coord = $pair->cDNA2genomic($cdna_coord); - -=head1 CONTACT - -Describe contact details here +To convert between coordinates: -=head1 APPENDIX + my $cdna_coord = $pair->genomic2cDNA($gen_coord); + my $gen_coord = $pair->cDNA2genomic($cdna_coord); -The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ +=head1 METHODS =cut - -# Let the code begin... - package Bio::EnsEMBL::Analysis::PairAlign; use vars qw(@ISA); diff --git a/modules/Bio/EnsEMBL/Analysis/Programs.pm b/modules/Bio/EnsEMBL/Analysis/Programs.pm index 56c93e080a4d59d2f27f43d1a590d431c57c3ff5..8d8b61a438c0005c6cf9e1d75975216574b9ef5a 100755 --- a/modules/Bio/EnsEMBL/Analysis/Programs.pm +++ b/modules/Bio/EnsEMBL/Analysis/Programs.pm @@ -1,3 +1,22 @@ +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut package Bio::EnsEMBL::Analysis::Programs; use strict; diff --git a/modules/Bio/EnsEMBL/ArchiveStableId.pm b/modules/Bio/EnsEMBL/ArchiveStableId.pm index a02e663ce5f01ae9969bbd5b2d58320303e43a85..cf6c14c650fc32ec127b4ac40d4104367ff75b81 100644 --- a/modules/Bio/EnsEMBL/ArchiveStableId.pm +++ b/modules/Bio/EnsEMBL/ArchiveStableId.pm @@ -1,4 +1,22 @@ -package Bio::EnsEMBL::ArchiveStableId; +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -6,11 +24,10 @@ Bio::EnsEMBL::ArchiveStableId =head1 SYNOPSIS - =head1 DESCRIPTION -ArchiveStableId objects are the main workunit for retrieving stable id archived -information from EnsEMBL core database. +ArchiveStableId objects are the main workunit for retrieving stable id +archived information from EnsEMBL core database. Attributes: type: Gene, Transcript, Translation, Exon, other, undef @@ -55,23 +72,9 @@ Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor Bio::EnsEMBL::StableIdEvent Bio::EnsEMBL::StableIdHistoryTree -=head1 LICENCE - -This code is distributed under an Apache style licence: -Please see http://www.ensembl.org/code_licence.html for details - -=head1 AUTHOR - -Ensembl core API team -Currently maintained by Patrick Meidl <meidl@ebi.ac.uk> - -=head1 CONTACT - -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> - =cut - + +package Bio::EnsEMBL::ArchiveStableId; use strict; use warnings; diff --git a/modules/Bio/EnsEMBL/AssemblyExceptionFeature.pm b/modules/Bio/EnsEMBL/AssemblyExceptionFeature.pm index b8347ee9135202e0842666568b64d7533738c806..61cfd9e68044ec415695401f9205c9c6be2e7ecb 100644 --- a/modules/Bio/EnsEMBL/AssemblyExceptionFeature.pm +++ b/modules/Bio/EnsEMBL/AssemblyExceptionFeature.pm @@ -1,52 +1,53 @@ -# -# Ensembl module for Bio::EnsEMBL::AssemblyExceptionFeature -# -# Cared for by Ewan Birney <birney@ebi.ac.uk> -# -# Copyright Ewan Birney -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 NAME + This software is distributed under a modified Apache license. + For license details, please see -Bio::EnsEMBL::AssemblyExceptionFeature - A feature that represents an assembly exception + http://www.ensembl.org/info/about/code_licence.html -=head1 SYNOPSIS +=head1 CONTACT -use Bio::EnsEMBL::AssemblyExceptionFeature; + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -$feature = Bio::EnsEMBL::AssemblyExceptionFeature->new(-start => 100, - -end => 220, - -type => 'HAP', - -slice => $slice, - -adaptor => $adaptor); + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 DESCRIPTION +=cut + +=head1 NAME -Certain features, e.g. Haplotypes and PARs, are represented as "exceptions" to the -normal assembly. This class represents such features. +Bio::EnsEMBL::AssemblyExceptionFeature - A feature that represents an assembly exception -=head1 AUTHOR - Glenn Proctor +=head1 SYNOPSIS -This modules is part of the Ensembl project http://www.ensembl.org + use Bio::EnsEMBL::AssemblyExceptionFeature; -Email birney@ebi.ac.uk + $feature = Bio::EnsEMBL::AssemblyExceptionFeature->new( + -start => 100, + -end => 220, + -type => 'HAP', + -slice => $slice, + -adaptor => $adaptor + ); -Describe contact details here +=head1 DESCRIPTION -=head1 APPENDIX +Certain features, e.g. Haplotypes and PARs, are represented as +"exceptions" to the normal assembly. This class represents such +features. -The rest of the documentation details each of the object methods. Internal -methods are usually preceded with a _ +=head1 METHODS =cut -use strict; - package Bio::EnsEMBL::AssemblyExceptionFeature; +use strict; + use vars qw(@ISA); use Bio::EnsEMBL::Feature; diff --git a/modules/Bio/EnsEMBL/AssemblyMapper.pm b/modules/Bio/EnsEMBL/AssemblyMapper.pm index b96fe5462d35d151bf8af1beb582586a940bd515..21f9aec7cb13b0b69884a4744283e667d10dfdf6 100644 --- a/modules/Bio/EnsEMBL/AssemblyMapper.pm +++ b/modules/Bio/EnsEMBL/AssemblyMapper.pm @@ -1,20 +1,28 @@ +=head1 LICENSE -# -# Ensembl module for Bio::EnsEMBL::AssemblyMapper -# -# Written by Arne Stabenau <stabenau@ebi.ac.uk> -# -# Copyright GRL and EBI -# -# You may distribute this module under the same terms as perl itself + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -# POD documentation - main docs before the code + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME Bio::EnsEMBL::AssemblyMapper - -Handles mapping between two coordinate systems using the information stored in -the assembly table +Handles mapping between two coordinate systems using the information +stored in the assembly table. =head1 SYNOPSIS @@ -22,8 +30,7 @@ the assembly table $asma = $db->get_AssemblyMapperAdaptor(); $csa = $db->get_CoordSystemAdaptor(); - my $chr_cs = - $cs_adaptor->fetch_by_name( 'chromosome', 'NCBI33' ); + my $chr_cs = $cs_adaptor->fetch_by_name( 'chromosome', 'NCBI33' ); my $ctg_cs = $cs_adaptor->fetch_by_name('contig'); $asm_mapper = $map_adaptor->fetch_by_CoordSystems( $cs1, $cs2 ); @@ -35,7 +42,7 @@ the assembly table # Map to chromosome coordinate system from contig. @chr_coords = $asm_mapper->map( 'AL30421.1.200.92341', 100, 10000, -1, - $ctg_cs ); + $ctg_cs ); # List contig names for a region of chromsome. @ctg_ids = $asm_mapper->list_ids( '13', 1_000_000, 1, $chr_cs ); @@ -43,7 +50,7 @@ the assembly table # List chromosome names for a contig region. @chr_ids = $asm_mapper->list_ids( 'AL30421.1.200.92341', 1, 1000, -1, - $ctg_cs ); + $ctg_cs ); =head1 DESCRIPTION @@ -56,10 +63,6 @@ coordinate systems. It is implemented using the Bio::EnsEMBL::Mapper object, which is a generic mapper object between disjoint coordinate systems. -=head1 CONTACT - -Post general queries to B<ensembl-dev@ebi.ac.uk> - =head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/Attribute.pm b/modules/Bio/EnsEMBL/Attribute.pm index 3d52c5403c992f429d87300fb3d866b9ab53596d..ad6bfe8715baa7cdd45e642e706190fac3fcc224 100644 --- a/modules/Bio/EnsEMBL/Attribute.pm +++ b/modules/Bio/EnsEMBL/Attribute.pm @@ -1,11 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::Attribute -# -# Copyright (c) 2004 Ensembl -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -15,16 +26,17 @@ Bio::EnsEMBL::Attribute - A generic Attribute class. use Bio::EnsEMBL::Attribute; - my $attribute = Bio::EnsEMBL::Attribute->new - (-CODE => 'myCode', - -NAME => 'My Attribute', - -DESCRIPTION => 'This is my attribute description.', - -VALUE => '10023'); + my $attribute = Bio::EnsEMBL::Attribute->new( + -CODE => 'myCode', + -NAME => 'My Attribute', + -DESCRIPTION => 'This is my attribute description.', + -VALUE => '10023' + ); - print $attrib->name(), "\n"; - print $attrib->code(), "\n"; + print $attrib->name(), "\n"; + print $attrib->code(), "\n"; print $attrib->description(), "\n"; - print $attrib->value(), "\n"; + print $attrib->value(), "\n"; =head1 DESCRIPTION @@ -34,13 +46,6 @@ associated with seq_regions (and their Slices) and MiscFeatures. Also see B<Bio::EnsEMBL::Slice>, B<Bio::EnsEMBL::MiscFeature> and B<Bio::EnsEMBL::DBSQL::AttributeAdaptor>. -=head1 CONTACT - -This modules is part of the Ensembl project http://www.ensembl.org - -Questions can be posted to the ensembl-dev mailing list: -ensembl-dev@ebi.ac.uk - =head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/BaseAlignFeature.pm b/modules/Bio/EnsEMBL/BaseAlignFeature.pm index 54ed7cb9b488075c90eb8beb2a87864199e3dd2d..07c57fefd9e5e23ea0d1faa3fca15365dcd38fe6 100644 --- a/modules/Bio/EnsEMBL/BaseAlignFeature.pm +++ b/modules/Bio/EnsEMBL/BaseAlignFeature.pm @@ -1,9 +1,22 @@ -# EnsEMBL module for storing dna-protein pairwise alignments -# -# -# You may distribute this module under the same terms as perl itself -# -=pod +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -12,26 +25,28 @@ implmentation for alignment features =head1 SYNOPSIS - my $feat = new Bio::EnsEMBL::DnaPepAlignFeature - (-slice => $slice, - -start => 100, - -end => 120, - -strand => 1, - -hseqname => 'SP:RF1231', - -hstart => 200, - -hend => 220, - -analysis => $analysis, - -cigar_string => '10M3D5M2I'); + my $feat = new Bio::EnsEMBL::DnaPepAlignFeature( + -slice => $slice, + -start => 100, + -end => 120, + -strand => 1, + -hseqname => 'SP:RF1231', + -hstart => 200, + -hend => 220, + -analysis => $analysis, + -cigar_string => '10M3D5M2I' + ); Alternatively if you have an array of ungapped features - my $feat = new Bio::EnsEMBL::DnaPepAlignFeature(-features => \@features); + my $feat = + new Bio::EnsEMBL::DnaPepAlignFeature( -features => \@features ); Where @features is an array of Bio::EnsEMBL::FeaturePair There is a method to manipulate the cigar_string into ungapped features - my @ungapped_features = $feat->ungapped_features; + my @ungapped_features = $feat->ungapped_features(); This converts the cigar string into an array of Bio::EnsEMBL::FeaturePair diff --git a/modules/Bio/EnsEMBL/ChainedAssemblyMapper.pm b/modules/Bio/EnsEMBL/ChainedAssemblyMapper.pm index 921a9f6e05f17bb34c2674b1ed5055e2ae9993a1..46991bca887095b561dc3f22245a776d8efd1714 100644 --- a/modules/Bio/EnsEMBL/ChainedAssemblyMapper.pm +++ b/modules/Bio/EnsEMBL/ChainedAssemblyMapper.pm @@ -1,60 +1,70 @@ +=head1 LICENSE -# -# Ensembl module for Bio::EnsEMBL::ChainedAssemblyMapper -# -# Written by Graham McVicker -# -# Copyright GRL and EBI -# -# You may distribute this module under the same terms as perl itself + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -# POD documentation - main docs before the code + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME Bio::EnsEMBL::ChainedAssemblyMapper - -Handles mapping between two coordinate systems using the information stored in -the assembly table +Handles mapping between two coordinate systems using the information +stored in the assembly table =head1 SYNOPSIS - $db = Bio::EnsEMBL::DBSQL::DBAdaptor->new(...); + $db = Bio::EnsEMBL::DBSQL::DBAdaptor->new(...); $asma = $db->get_AssemblyMapperAdaptor(); $csa = $db->get_CoordSystemAdaptor(); - my $chr_cs = $cs_adaptor->fetch_by_name('chromosome', 'NCBI33'); - my $cln_cs = $cs_adaptor->fetch_by_name('clone'); + my $chr_cs = $cs_adaptor->fetch_by_name( 'chromosome', 'NCBI33' ); + my $cln_cs = $cs_adaptor->fetch_by_name('clone'); - $asm_mapper = $map_adaptor->fetch_by_CoordSystems($cs1, $cs2); + $asm_mapper = $map_adaptor->fetch_by_CoordSystems( $cs1, $cs2 ); - #map to contig coordinate system from chromosomal - @cln_coords = $asm_mapper->map('X', 1_000_000, 2_000_000, 1, $chr_cs); + # Map to contig coordinate system from chromosomal + @cln_coords = + $asm_mapper->map( 'X', 1_000_000, 2_000_000, 1, $chr_cs ); - #map to chromosome coordinate system from contig - @chr_coords = $asm_mapper->map('AL30421.1',100,10000,-1,$cln_cs); + # Map to chromosome coordinate system from contig + @chr_coords = + $asm_mapper->map( 'AL30421.1', 100, 10000, -1, $cln_cs ); - #list contig names for a region of chromsome - @cln_ids = $asm_mapper->list_ids('13', 1_000_000, 1, $chr_cs); + # List contig names for a region of chromsome + @cln_ids = $asm_mapper->list_ids( '13', 1_000_000, 1, $chr_cs ); - #list chromosome names for a contig region - @chr_ids = $asm_mapper->list_ids('AL30421.1',1,1000,-1,$cln_cs); + # List chromosome names for a contig region + @chr_ids = + $asm_mapper->list_ids( 'AL30421.1', 1, 1000, -1, $cln_cs ); =head1 DESCRIPTION -The ChainedAssemblyMapper is an extension of the regular AssemblyMapper that -allows for mappings between coordinate systems that require multi-step mapping. -For example if explicit mappings are defined between the following -coordinate systems, +The ChainedAssemblyMapper is an extension of the regular AssemblyMapper +that allows for mappings between coordinate systems that require +multi-step mapping. For example if explicit mappings are defined +between the following coordinate systems, + chromosome <-> contig contig <-> clone -the ChainedAssemblyMapper would be able to perform implicit mapping between -the chromosome and clone coordinate systems. This should be transparent to -the user of this module, and users should not even realise that they are using -a chained assembly mapper as opposed to a normal assembly mapper. - -=head1 CONTACT -Post general queries to B<ensembl-dev@ebi.ac.uk> +the ChainedAssemblyMapper would be able to perform implicit mapping +between the chromosome and clone coordinate systems. This should be +transparent to the user of this module, and users should not even +realise that they are using a chained assembly mapper as opposed to a +normal assembly mapper. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/Collection.pm b/modules/Bio/EnsEMBL/Collection.pm index f661ca76f542be57664ed45cddebd6eefb634ab3..7db005df7bc637665a152f33ac445cc9df7ae9e9 100644 --- a/modules/Bio/EnsEMBL/Collection.pm +++ b/modules/Bio/EnsEMBL/Collection.pm @@ -1,11 +1,22 @@ -# $Id$ +=head1 LICENSE -# Ensembl module Bio::EnsEMBL::Collection -# -# You may distribute this module under the same terms as Perl itself. -# + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -package Bio::EnsEMBL::Collection; + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -132,6 +143,8 @@ fetch_all_by_Slice(). =cut +package Bio::EnsEMBL::Collection; + use strict; use warnings; diff --git a/modules/Bio/EnsEMBL/Collection/Exon.pm b/modules/Bio/EnsEMBL/Collection/Exon.pm index feb80c039b1d571aa0779f2cbdaac71092459d32..1566a320d84bebc3be046a530448611949246637 100644 --- a/modules/Bio/EnsEMBL/Collection/Exon.pm +++ b/modules/Bio/EnsEMBL/Collection/Exon.pm @@ -1,4 +1,22 @@ -# $Id$ +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut package Bio::EnsEMBL::Collection::Exon; @@ -121,3 +139,5 @@ sub _default_where_clause { } 1; + +# $Id$ diff --git a/modules/Bio/EnsEMBL/Collection/Gene.pm b/modules/Bio/EnsEMBL/Collection/Gene.pm index 70e737aec7c6d7d91b30cd784bc3c4debf0328d0..8d9c3bbad26ac0448c6ad75910ecf859408d9314 100644 --- a/modules/Bio/EnsEMBL/Collection/Gene.pm +++ b/modules/Bio/EnsEMBL/Collection/Gene.pm @@ -1,4 +1,22 @@ -# $Id$ +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut package Bio::EnsEMBL::Collection::Gene; @@ -162,3 +180,5 @@ sub _default_where_clause { } 1; + +# $Id$ diff --git a/modules/Bio/EnsEMBL/Collection/RepeatFeature.pm b/modules/Bio/EnsEMBL/Collection/RepeatFeature.pm index 22907c18fa9cb1e8ca1247ce9a0eb1c4642932c6..57848fdf16468c2c7d2ec30f23e8a0694f8fbba7 100644 --- a/modules/Bio/EnsEMBL/Collection/RepeatFeature.pm +++ b/modules/Bio/EnsEMBL/Collection/RepeatFeature.pm @@ -1,4 +1,22 @@ -# $Id$ +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut package Bio::EnsEMBL::Collection::RepeatFeature; @@ -107,3 +125,5 @@ sub _default_where_clause { } 1; + +# $Id$ diff --git a/modules/Bio/EnsEMBL/Collection/Transcript.pm b/modules/Bio/EnsEMBL/Collection/Transcript.pm index a5f00c77043e9c9d49594de03530654d31c4ecb1..ed75e1bff8554a06346a274e13c3138479d4591c 100644 --- a/modules/Bio/EnsEMBL/Collection/Transcript.pm +++ b/modules/Bio/EnsEMBL/Collection/Transcript.pm @@ -1,6 +1,22 @@ -# $Id$ +=head1 LICENSE -package Bio::EnsEMBL::Collection::Transcript; + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -74,6 +90,8 @@ External status =cut +package Bio::EnsEMBL::Collection::Transcript; + use strict; use warnings; @@ -157,3 +175,5 @@ sub _default_where_clause { } 1; + +# $Id$ diff --git a/modules/Bio/EnsEMBL/CoordSystem.pm b/modules/Bio/EnsEMBL/CoordSystem.pm index f0e7dbfcb43fec013c184e8358fccd5e26f76a88..b9a95df7e2d08708682c1f23dafd33ffce9ec4ef 100644 --- a/modules/Bio/EnsEMBL/CoordSystem.pm +++ b/modules/Bio/EnsEMBL/CoordSystem.pm @@ -1,6 +1,22 @@ -# -# EnsEMBL module for Bio::EnsEMBL::CoordSystem -# +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -15,8 +31,8 @@ Bio::EnsEMBL::CoordSystem # # Get all coord systems in the database: # - foreach my $cs (@{$csa->fetch_all()}) { - my $str = join ':', $cs->name(),$cs->version(),$cs->dbID(); + foreach my $cs ( @{ $csa->fetch_all() } ) { + my $str = join ':', $cs->name(), $cs->version(), $cs->dbID(); print "$str\n"; } @@ -37,12 +53,6 @@ versions, there is no version which applies to the entire set of clones. Coordinate system objects are immutable. Their name and version, and other attributes may not be altered after they are created. -=head1 AUTHOR - Graham McVicker - -=head1 CONTACT - -Post questions to the EnsEMBL development list ensembl-dev@ebi.ac.uk - =head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/DB/ExternalFeatureFactoryI.pm b/modules/Bio/EnsEMBL/DB/ExternalFeatureFactoryI.pm index 6ce740a1662b98f03a2e2fb3950430a8493c8c78..d752dbd888cb027c0072d55af779f92d627f3662 100755 --- a/modules/Bio/EnsEMBL/DB/ExternalFeatureFactoryI.pm +++ b/modules/Bio/EnsEMBL/DB/ExternalFeatureFactoryI.pm @@ -1,137 +1,135 @@ +=head1 LICENSE -# -# EnsEMBL module for Bio::EnsEMBL::DB::ExternalFeatureFactoryI -# -# Cared for by Ewan Birney <birney@ebi.ac.uk> -# -# Copyright Ewan Birney -# -# You may distribute this module under the same terms as perl itself + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -# POD documentation - main docs before the code + This software is distributed under a modified Apache license. + For license details, please see -=head1 NAME + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -Bio::EnsEMBL::DB::ExternalFeatureFactoryI - Legacy Abstract interface for External Feature Factories. Bio::EnsEMBL::External::ExternalFeatureAdaptor should be used instead if possible. +=cut + +=head1 NAME +Bio::EnsEMBL::DB::ExternalFeatureFactoryI - +Legacy Abstract interface for External Feature +Factories. Bio::EnsEMBL::External::ExternalFeatureAdaptor should be used +instead if possible. =head1 SYNOPSIS - $external_ff = new ImplementingExternalFeatureFactoryClass; + $external_ff = new ImplementingExternalFeatureFactoryClass; - $database_adaptor = new Bio::EnsEMBL::DBSQL::DBAdaptor( -host => 'blah', - -dbname => 'other', - -pass => 'pass'); + $database_adaptor = new Bio::EnsEMBL::DBSQL::DBAdaptor( + -host => 'blah', + -dbname => 'other', + -pass => 'pass' + ); - # alternatively, you can add external databases to an obj once made - $database_adaptor->add_ExternalFeatureFactory($external_ff); + # alternatively, you can add external databases to an obj once made + $database_adaptor->add_ExternalFeatureFactory($external_ff); - # now the ExternalFeatureFactory has been added, Ensembl RawContigs - # and Slices will now have ExternalFeatures on them - $contig = - $db_adaptor->get_RawContigAdaptor->fetch_by_name('AC00056.00001'); - @external = $contig->get_all_ExternalFeatures(); + # now the ExternalFeatureFactory has been added, Ensembl RawContigs + # and Slices will now have ExternalFeatures on them + $contig = + $db_adaptor->get_RawContigAdaptor->fetch_by_name('AC00056.00001'); + @external = $contig->get_all_ExternalFeatures(); - # this works on Slices as well - $slice = - $db_adaptor->get_SliceAdaptor->fetch_by_chr_start_end('12', 10000, 30000); - @external = $slice->get_all_ExternalFeatures(); + # this works on Slices as well + $slice = + $db_adaptor->get_SliceAdaptor->fetch_by_chr_start_end( '12', 10000, + 30000 ); + @external = $slice->get_all_ExternalFeatures(); - =head1 DESCRIPTION -This is a legacy class. It is included only for backwards compatibility with -ExternalFeatureFactories which are presumably still used to place data into -ensembl. It is recommended that if you wish to create EnsEMBL features -externally that you use the Bio::EnsEMBL::External::ExternalFeatureAdaptor -instead. +This is a legacy class. It is included only for backwards +compatibility with ExternalFeatureFactories which are presumably +still used to place data into ensembl. It is recommended that if +you wish to create EnsEMBL features externally that you use the +Bio::EnsEMBL::External::ExternalFeatureAdaptor instead. -This object defines the abstract interface for External Database -access inside Ensembl. The aim is that one can attach an External -Database which will generate Sequence Features and these Sequence -Features will be accessible along side all the internal Ensembl -sequence features, for drawing, EMBL dumping etc. In particular, the -external database does not have to worry about the transformation of -the Sequence Feature objects into VirtualContigs. +This object defines the abstract interface for External Database access +inside Ensembl. The aim is that one can attach an External Database +which will generate Sequence Features and these Sequence Features will +be accessible along side all the internal Ensembl sequence features, for +drawing, EMBL dumping etc. In particular, the external database does not +have to worry about the transformation of the Sequence Feature objects +into VirtualContigs. Sequence Features have to be defined in one of two coordinate systems: -Original EMBL/GenBank coordinates of a particular sequnence version or the -Ensembl contig coordinates. This means you have to calculate your sequence -features in one these two coordinate systems +Original EMBL/GenBank coordinates of a particular sequnence version or +the Ensembl contig coordinates. This means you have to calculate your +sequence features in one these two coordinate systems The methods that have to be implemented are: - get_External_SeqFeatures_contig( - $ensembl_contig_identifier,$sequence_version,$start,$end); + get_External_SeqFeatures_contig( $ensembl_contig_identifier, + $sequence_version, $start, $end ); - get_External_SeqFeatures_clone( - $embl_accession_number,$sequence_version,$start,$end); + get_External_SeqFeatures_clone( $embl_accession_number, + $sequence_version, $start, $end ); The semantics of this method is as follows: - $ensembl_contig_identifier - the ensembl contig id (external id). - $sequence_version - embl/genbank sequence version - $embl_accession_number - the embl/genbank accession number + $ensembl_contig_identifier - the ensembl contig id (external id). + $sequence_version - embl/genbank sequence version + $embl_accession_number - the embl/genbank accession number The $start/$end can be ignored, but methods can take advantage of it. This is so that ensembl can ask for features only on a region of DNA, -and if desired, the external database can respond with features only -in this region, rather than the entire sequence. +and if desired, the external database can respond with features only in +this region, rather than the entire sequence. -The hope is that the second method could potentially have a very -complex set of mappings of other embl_accession numbers to one -embl_accession number and provide the complex mapping. +The hope is that the second method could potentially have a very complex +set of mappings of other embl_accession numbers to one embl_accession +number and provide the complex mapping. -The methods should return Sequence Features with -the following spec: +The methods should return Sequence Features with the following spec: - a) must implement the Bio::SeqFeatureI interface. + a) must implement the Bio::SeqFeatureI interface. - b) must accept "set" calls on + b) must accept "set" calls on - start,end,strand + start,end,strand - to provide coordinate transformation of the feature. + to provide coordinate transformation of the feature. - c) must be unique in-memory objects, ie, the implementation is not - allowed to cache the sequence feature in its entirity. Two - separate calls to get_External_SeqFeatures_contig must be able to - separately set start,end,strand information without clobbering - each other. The other information, if so wished, can be cached by - each SeqFeature holding onto another object, but this is left to - the implementor to decide on the correct strategy. + c) must be unique in-memory objects, ie, the implementation is not + allowed to cache the sequence feature in its entirity. Two separate + calls to get_External_SeqFeatures_contig must be able to separately + set start,end,strand information without clobbering each other. The + other information, if so wished, can be cached by each SeqFeature + holding onto another object, but this is left to the implementor to + decide on the correct strategy. - d) must return an unique identifier when called with method id. + d) must return an unique identifier when called with method id. You must implement both functions. In most cases, one function will always return an empty list, whereas the other function will actually query the external database. -The second way of accessing the External Database from Ensembl is -using unique internal identifiers in that database. The method is: +The second way of accessing the External Database from Ensembl is using +unique internal identifiers in that database. The method is: - get_SeqFeature_by_id($id); + get_SeqFeature_by_id($id); -It should return exactly one Sequence Feature object of the same type -as above. +It should return exactly one Sequence Feature object of the same type as +above. -=head1 AUTHOR - Ewan Birney - -Email birney@ebi.ac.uk - -=head1 CONTACT - -Email questions to the EnsEMBL developer list: <ensembl-dev@ebi.ac.uk> - -=head1 APPENDIX - -The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ +=head1 METHODS =cut - -# Let the code begin... - package Bio::EnsEMBL::DB::ExternalFeatureFactoryI; use Bio::EnsEMBL::External::ExternalFeatureAdaptor; use vars qw(@ISA); diff --git a/modules/Bio/EnsEMBL/DBEntry.pm b/modules/Bio/EnsEMBL/DBEntry.pm index 0f66dbd8f864f44e50a66826ba09bdca3133cd97..7113c1634ef4ee5b7b1519efe64dcbbfbbbcab5b 100644 --- a/modules/Bio/EnsEMBL/DBEntry.pm +++ b/modules/Bio/EnsEMBL/DBEntry.pm @@ -1,37 +1,41 @@ -package Bio::EnsEMBL::DBEntry; - -=head1 NAME +=head1 LICENSE -Bio::EnsEMBL::DBEntry - -Object representing an external reference (xref) + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 SYNOPSIS + This software is distributed under a modified Apache license. + For license details, please see + http://www.ensembl.org/info/about/code_licence.html -=head1 DESCRIPTION +=head1 CONTACT -This object holds information about external references (xrefs) to Ensembl -objects. + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 METHODS + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. +=cut -=head1 LICENCE +=head1 NAME -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. +Bio::EnsEMBL::DBEntry - +Object representing an external reference (xref) -=head1 AUTHOR +=head1 SYNOPSIS -Arne Stabenau <stabenau@ebi.ac.uk>, Ensembl core API team +=head1 DESCRIPTION -=head1 CONTACT +This object holds information about external references (xrefs) to +Ensembl objects. -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> +=head1 METHODS =cut +package Bio::EnsEMBL::DBEntry; + use strict; use warnings; no warnings qw(uninitialized); diff --git a/modules/Bio/EnsEMBL/DBLoader.pm b/modules/Bio/EnsEMBL/DBLoader.pm index 66f78ce3fc62ea97df7c245fc051325b57a08031..828b0a8ab425fe7c251f06a9e20731f09fa2cbff 100755 --- a/modules/Bio/EnsEMBL/DBLoader.pm +++ b/modules/Bio/EnsEMBL/DBLoader.pm @@ -1,14 +1,22 @@ +=head1 LICENSE -# -# BioPerl module for Bio::EnsEMBL::DBLoader -# -# Cared for by Ewan Birney <birney@sanger.ac.uk> -# -# Copyright Ewan Birney -# -# You may distribute this module under the same terms as perl itself + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -# POD documentation - main docs before the code + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -16,33 +24,36 @@ Bio::EnsEMBL::DBLoader - Run time database loader =head1 SYNOPSIS - $db = Bio::EnsEMBL::DBLoader->new("Bio::EnsEMBL::DBSQL::DBAdaptor/host=localhost;dbname=homo_sapiens_core_19_34a;user=ensro;"); + $db = + Bio::EnsEMBL::DBLoader->new( "Bio::EnsEMBL::DBSQL::DBAdaptor/" + . "host=localhost;" + . "dbname=homo_sapiens_core_19_34a;" + . "user=ensro;" ); # $db is a database object $db = Bio::EnsEMBL::DBLoader->standard(); - # equivalent to Bio::EnsEMBL::DBLoader->new($ENV{'ENSEMBL_DATABASE'}); + # equivalent to + # Bio::EnsEMBL::DBLoader->new( $ENV{'ENSEMBL_DATABASE'} ); =head1 DESCRIPTION -This system provides a run-time loading of the database for ensembl, allowing two things +This system provides a run-time loading of the database for ensembl, +allowing two things - a) Only "using" the database module which is required for a particular implementation + a) Only "using" the database module which is required for a + particular implementation - b) Providing a simple string method to indicate where the database is, allowing per sites -defaults and other things as such + b) Providing a simple string method to indicate where the database + is, allowing per sites defaults and other things as such The string is parsed as follows: -Before the / is the Perl database object to load, after are the parameters to pass -to that database. The parameters are series of key=values separated by semi-colons. -These are passed as a hash to the new method of the database object - -=head1 CONTACT - -Post questions/comments to the Ensembl development list: -B<ensembl-dev@ebi.ac.uk> +Before the / is the Perl database object to load, after are the +parameters to pass to that database. The parameters are series of +key=values separated by semi-colons. These are passed as a hash to the +new method of the database object =head1 METHODS diff --git a/modules/Bio/EnsEMBL/DBSQL/AffyArrayAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/AffyArrayAdaptor.pm index f26b324207a768db339c5e33558fdbdd8130321d..305def1f54208178bc80c022ca748f83de485e11 100644 --- a/modules/Bio/EnsEMBL/DBSQL/AffyArrayAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/AffyArrayAdaptor.pm @@ -1,7 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::DBSQL::AffyArrayAdaptor -# -# You may distribute this module under the same terms as Perl itself +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -10,36 +25,25 @@ storing AffyArray objects. =head1 SYNOPSIS -my $aaa = $db->get_AffyArrayAdaptor(); + my $aaa = $db->get_AffyArrayAdaptor(); -my $array = $aaa->fetch_by_name('Affy-1'); -my @arrays = @{$aaa->fetch_all()}; + my $array = $aaa->fetch_by_name('Affy-1'); + my @arrays = @{ $aaa->fetch_all() }; =head1 DESCRIPTION The AffyArrayAdaptor is a database adaptor for storing and retrieving AffyArray objects. -=head1 AUTHOR - -This module was originally written by Arne Stabenau, but was changed to be a -subclass of OligoArrayAdaptor by Ian Sealy. - -This module is part of the Ensembl project: http://www.ensembl.org/ - -=head1 CONTACT - -Post comments or questions to the Ensembl development list: ensembl-dev@ebi.ac.uk - =head1 METHODS =cut +package Bio::EnsEMBL::DBSQL::AffyArrayAdaptor; + use strict; use warnings; -package Bio::EnsEMBL::DBSQL::AffyArrayAdaptor; - use Bio::EnsEMBL::AffyArray; use Bio::EnsEMBL::DBSQL::OligoArrayAdaptor; diff --git a/modules/Bio/EnsEMBL/DBSQL/AffyFeatureAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/AffyFeatureAdaptor.pm index d361d6dfd0516f4f440e5838d3dc22bfcf651112..3322ff53806e130520028dae1b657ebe011a7eee 100644 --- a/modules/Bio/EnsEMBL/DBSQL/AffyFeatureAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/AffyFeatureAdaptor.pm @@ -1,7 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::DBSQL::AffyFeatureAdaptor -# -# You may distribute this module under the same terms as Perl itself +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -10,36 +25,26 @@ storing AffyFeature objects. =head1 SYNOPSIS -my $afa = $db->get_AffyFeatureAdaptor(); + my $afa = $db->get_AffyFeatureAdaptor(); -my $features = $afa->fetch_all_by_AffyProbe($probe); -$features = $afa->fetch_all_by_Slice_arrayname($slice, 'Affy-1', 'Affy-2'); + my $features = $afa->fetch_all_by_AffyProbe($probe); + $features = + $afa->fetch_all_by_Slice_arrayname( $slice, 'Affy-1', 'Affy-2' ); =head1 DESCRIPTION The AffyFeatureAdaptor is a database adaptor for storing and retrieving AffyFeature objects. -=head1 AUTHOR - -This module was originally written by Arne Stabenau, but was changed to be a -subclass of OligoFeatureAdaptor by Ian Sealy. - -This module is part of the Ensembl project: http://www.ensembl.org/ - -=head1 CONTACT - -Post comments or questions to the Ensembl development list: ensembl-dev@ebi.ac.uk - =head1 METHODS =cut +package Bio::EnsEMBL::DBSQL::AffyFeatureAdaptor; + use strict; use warnings; -package Bio::EnsEMBL::DBSQL::AffyFeatureAdaptor; - use Bio::EnsEMBL::AffyFeature; use Bio::EnsEMBL::DBSQL::OligoFeatureAdaptor; diff --git a/modules/Bio/EnsEMBL/DBSQL/AffyProbeAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/AffyProbeAdaptor.pm index 54a0dc7fc85eb20946b0131707c75c5e1b2d37b9..b712510095f8768673a9545270c2536c86b1c1f7 100644 --- a/modules/Bio/EnsEMBL/DBSQL/AffyProbeAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/AffyProbeAdaptor.pm @@ -1,7 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::DBSQL::AffyProbeAdaptor -# -# You may distribute this module under the same terms as Perl itself +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -10,26 +25,17 @@ storing AffyProbe objects. =head1 SYNOPSIS -my $apa = $db->get_AffyProbeAdaptor(); + my $apa = $db->get_AffyProbeAdaptor(); -my $probe = $opa->fetch_by_array_probeset_probe('Affy-1', 'Probeset-1', 'Probe-1'); + my $probe = + $opa->fetch_by_array_probeset_probe( 'Affy-1', 'Probeset-1', + 'Probe-1' ); =head1 DESCRIPTION The AffyProbeAdaptor is a database adaptor for storing and retrieving AffyProbe objects. -=head1 AUTHOR - -This module was originally written by Arne Stabenau, but was changed to be a -subclass of OligoProbeAdaptor by Ian Sealy. - -This module is part of the Ensembl project: http://www.ensembl.org/ - -=head1 CONTACT - -Post comments or questions to the Ensembl development list: ensembl-dev@ebi.ac.uk - =head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/DBSQL/AnalysisAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/AnalysisAdaptor.pm index 1b8c6fcebdb35c4f8fe98a883ee61e7d649a2557..af610e7ebc203aad1eb20d2e74a309dfca7c1a5e 100755 --- a/modules/Bio/EnsEMBL/DBSQL/AnalysisAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/AnalysisAdaptor.pm @@ -1,13 +1,22 @@ -# Perl module for Bio::EnsEMBL::DBSQL::AnalysisAdaptor -# -# Creator: Arne Stabenau <stabenau@ebi.ac.uk> -# Date of creation: 25.01.2001 -# Last modified : 25.01.2001 by Arne Stabenau -# -# Copyright Ensembl 2000-2004 -# -# You may distribute this module under the same terms as perl itself -# POD documentation - main docs before the code +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -18,25 +27,20 @@ Bio::EnsEMBL::DBSQL::AnalysisAdaptor use Bio::EnsEMBL::Registry; Bio::EnsEMBL::Registry->load_registry_from_db( - -host => 'ensembldb.ensembl.org', - -user => 'anonymous' + -host => 'ensembldb.ensembl.org', + -user => 'anonymous' ); - $analysis_adaptor = Bio::EnsEMBL::Registry->get_adaptor("human", "core", "analysis"); + $analysis_adaptor = + Bio::EnsEMBL::Registry->get_adaptor( "human", "core", "analysis" ); my $analysis = $analysis_adaptor->fetch_by_logic_name('genscan'); - =head1 DESCRIPTION Module to encapsulate all db access for persistent class Analysis. There should be just one per application and database connection. -=head1 CONTACT - - Post questions/comments to the EnsEMBL development list: - ensembl-dev@ebi.ac.uk - =head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/DBSQL/ArchiveStableIdAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/ArchiveStableIdAdaptor.pm index 5be52defd554efb1083141140d4a260336a8a537..54d6063d463d6bda77c9fa2596e72d2b0a3cac8f 100644 --- a/modules/Bio/EnsEMBL/DBSQL/ArchiveStableIdAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/ArchiveStableIdAdaptor.pm @@ -1,4 +1,22 @@ -package Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor; +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -13,41 +31,41 @@ Bio::EnsEMBL::ArchiveStableIdAdaptor my $stable_id = 'ENSG00000068990'; - my $arch_id = - $archiveStableIdAdaptor->fetch_by_stable_id($stable_id); + my $arch_id = $archiveStableIdAdaptor->fetch_by_stable_id($stable_id); print("Latest incarnation of this stable ID:\n"); printf( " Stable ID: %s.%d\n", - $arch_id->stable_id(), $arch_id->version() ); - print( " Release: " - . $arch_id->release() . " (" - . $arch_id->assembly() . ", " - . $arch_id->db_name() - . ")\n" ); + $arch_id->stable_id(), $arch_id->version() ); + print(" Release: " + . $arch_id->release() . " (" + . $arch_id->assembly() . ", " + . $arch_id->db_name() + . ")\n" ); print "\nStable ID history:\n\n"; my $history = $archiveStableIdAdaptor->fetch_history_tree_by_stable_id( - $stable_id); + $stable_id); foreach my $a ( @{ $history->get_all_ArchiveStableIds } ) { printf( " Stable ID: %s.%d\n", $a->stable_id(), $a->version() ); - print( " Release: " - . $a->release() . " (" - . $a->assembly() . ", " - . $a->db_name() - . ")\n\n" ); + print(" Release: " + . $a->release() . " (" + . $a->assembly() . ", " + . $a->db_name() + . ")\n\n" ); } =head1 DESCRIPTION -ArchiveStableIdAdaptor does all SQL to create ArchiveStableIds and works of +ArchiveStableIdAdaptor does all SQL to create ArchiveStableIds and works +of - stable_id_event - mapping_session - peptite_archive - gene_archive + stable_id_event + mapping_session + peptite_archive + gene_archive tables inside the core database. @@ -55,44 +73,32 @@ This whole module has a status of At Risk as it is under development. =head1 METHODS - fetch_by_stable_id - fetch_by_stable_id_version - fetch_by_stable_id_dbname - fetch_all_by_archive_id - fetch_predecessors_by_archive_id - fetch_successors_by_archive_id - fetch_history_tree_by_stable_id - add_all_current_to_history - list_dbnames - previous_dbname - next_dbname - get_peptide - get_current_release - get_current_assembly + fetch_by_stable_id + fetch_by_stable_id_version + fetch_by_stable_id_dbname + fetch_all_by_archive_id + fetch_predecessors_by_archive_id + fetch_successors_by_archive_id + fetch_history_tree_by_stable_id + add_all_current_to_history + list_dbnames + previous_dbname + next_dbname + get_peptide + get_current_release + get_current_assembly =head1 RELATED MODULES -Bio::EnsEMBL::ArchiveStableId -Bio::EnsEMBL::StableIdEvent -Bio::EnsEMBL::StableIdHistoryTree - -=head1 LICENCE - -This code is distributed under an Apache style licence: -Please see http://www.ensembl.org/code_licence.html for details - -=head1 AUTHOR - -Ensembl core API team -Currently maintained by Patrick Meidl <meidl@ebi.ac.uk> + Bio::EnsEMBL::ArchiveStableId + Bio::EnsEMBL::StableIdEvent + Bio::EnsEMBL::StableIdHistoryTree -=head1 CONTACT - -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> +=head1 METHODS =cut +package Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor; use strict; use warnings; diff --git a/modules/Bio/EnsEMBL/DBSQL/AssemblyExceptionFeatureAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/AssemblyExceptionFeatureAdaptor.pm index 90f507ef189e13ea808672fe903711fccd67690c..d0cd49f778616bffbf14422b71f0cc3c426b43b8 100644 --- a/modules/Bio/EnsEMBL/DBSQL/AssemblyExceptionFeatureAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/AssemblyExceptionFeatureAdaptor.pm @@ -1,4 +1,22 @@ -package Bio::EnsEMBL::DBSQL::AssemblyExceptionFeatureAdaptor; +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -8,30 +26,21 @@ Bio::EnsEMBL::DBSQL::AssemblyExceptionFeatureAdaptor my $assembly_exception_feature_adaptor = $database_adaptor->get_AssemblyExceptionFeatureAdaptor(); + @assembly_exception_features = $assembly_exception_feature_adaptor->fetch_all_by_Slice($slice); =head1 DESCRIPTION -Assembly Exception Feature Adaptor - database access for assembly exception -features. - -=head1 LICENCE - -This code is distributed under an Apache style licence: -Please see http://www.ensembl.org/code_licence.html for details +Assembly Exception Feature Adaptor - database access for assembly +exception features. -=head1 AUTHOR - -Glenn Proctor <glenn@ebi.ac.uk>, Ensembl core API team - -=head1 CONTACT - -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> +=head1 METHODS =cut +package Bio::EnsEMBL::DBSQL::AssemblyExceptionFeatureAdaptor; + use strict; use warnings; no warnings qw(uninitialized); diff --git a/modules/Bio/EnsEMBL/DBSQL/AssemblyMapperAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/AssemblyMapperAdaptor.pm index 883a22e96222270bf41c3130a796e68fc08dcc0a..787392ce5924b1fc11791f6e9d00e1c4a313b8f3 100644 --- a/modules/Bio/EnsEMBL/DBSQL/AssemblyMapperAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/AssemblyMapperAdaptor.pm @@ -1,67 +1,74 @@ +=head1 LICENSE -# -# Ensembl module for Bio::EnsEMBL::DBSQL::AssemblyMapperAdaptor -# -# -# Copyright Ensembl -# -# You may distribute this module under the same terms as perl itself + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -# POD documentation - main docs before the code + This software is distributed under a modified Apache license. + For license details, please see -=Head1 NAME + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut + +=head1 NAME + +Bio::EnsEMBL::DBSQL::AssemblyMapperAdaptor =head1 SYNOPSIS use Bio::EnsEMBL::Registry; Bio::EnsEMBL::Registry->load_registry_from_db( - -host => 'ensembldb.ensembl.org', - -user => 'anonymous' + -host => 'ensembldb.ensembl.org', + -user => 'anonymous' ); - $asma = Bio::EnsEMBL::Registry->get_adaptor("human", "core", "assemblymapper"); - $csa = Bio::EnsEMBL::Registry->get_adaptor("human", "core", "coordsystem"); + $asma = Bio::EnsEMBL::Registry->get_adaptor( "human", "core", + "assemblymapper" ); + + $csa = Bio::EnsEMBL::Registry->get_adaptor( "human", "core", + "coordsystem" ); - my $chr33_cs = $csa->fetch_by_name('chromosome', 'NCBI33'); - my $chr34_cs = $csa->fetch_by_name('chromosome', 'NCBI34'); - my $ctg_cs = $csa->fetch_by_name('contig'); - my $clone_cs = $csa->fetch_by_name('clone'); + my $chr33_cs = $csa->fetch_by_name( 'chromosome', 'NCBI33' ); + my $chr34_cs = $csa->fetch_by_name( 'chromosome', 'NCBI34' ); + my $ctg_cs = $csa->fetch_by_name('contig'); + my $clone_cs = $csa->fetch_by_name('clone'); my $chr_ctg_mapper = - $asma->fetch_by_CoordSystems($chr33_cs, $ctg_cs); + $asma->fetch_by_CoordSystems( $chr33_cs, $ctg_cs ); my $ncbi33_ncbi34_mapper = - $asm_adptr->fetch_by_CoordSystems($chr33,$chr34); + $asm_adptr->fetch_by_CoordSystems( $chr33, $chr34 ); my $ctg_clone_mapper = - $asm_adptr->fetch_by_CoordSystems($ctg_cs,$clone_cs); + $asm_adptr->fetch_by_CoordSystems( $ctg_cs, $clone_cs ); =head1 DESCRIPTION -Adaptor for handling Assembly mappers. This is a -I<Singleton> class. ie: There is only one per -database (C<DBAdaptor>). - -This is used to retrieve mappers between any two coordinate systems whose -makeup is described by the assembly table. Currently one step (explicit) and -two step (implicit) pairwise mapping is supported. In one-step mapping -an explicit relationship between the coordinate systems is defined in the -assembly table. In two-step 'chained' mapping no explicit mapping is present -but the coordinate systems must share a common mapping to an intermediate -coordinate system. +Adaptor for handling Assembly mappers. This is a I<Singleton> class. +ie: There is only one per database (C<DBAdaptor>). -=head1 CONTACT - -This module is part of the Ensembl project: www.ensembl.org -Post general queries to B<ensembl-dev@ebi.ac.uk> +This is used to retrieve mappers between any two coordinate systems +whose makeup is described by the assembly table. Currently one step +(explicit) and two step (implicit) pairwise mapping is supported. In +one-step mapping an explicit relationship between the coordinate systems +is defined in the assembly table. In two-step 'chained' mapping no +explicit mapping is present but the coordinate systems must share a +common mapping to an intermediate coordinate system. =head1 METHODS =cut - package Bio::EnsEMBL::DBSQL::AssemblyMapperAdaptor; use vars qw(@ISA); use strict; diff --git a/modules/Bio/EnsEMBL/DBSQL/AssemblySliceAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/AssemblySliceAdaptor.pm index 9a9cf8146bd99f73dead546dee05004357ef6849..e06f727a57b4e15cc8c89734e3d8ef37f563dfa0 100644 --- a/modules/Bio/EnsEMBL/DBSQL/AssemblySliceAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/AssemblySliceAdaptor.pm @@ -1,4 +1,22 @@ -package Bio::EnsEMBL::DBSQL::AssemblySliceAdaptor; +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -7,56 +25,42 @@ representing alternative assemblies =head1 SYNOPSIS -my $slice = $slice_adaptor->fetch_by_region('chromosome', 14, 900000, 950000); + my $slice = + $slice_adaptor->fetch_by_region( 'chromosome', 14, 900000, 950000 ); -my $msc = Bio::EnsEMBL::MappedSliceContainer->new( - -SLICE => $slice -); + my $msc = Bio::EnsEMBL::MappedSliceContainer->new( -SLICE => $slice ); -my $asa = Bio::EnsEMBL::DBSQL::AssemblySliceAdaptor->new; + my $asa = Bio::EnsEMBL::DBSQL::AssemblySliceAdaptor->new; -my ($mapped_slice) = @{ $asa->fetch_by_version($msc, 'NCBIM36') }; + my ($mapped_slice) = @{ $asa->fetch_by_version( $msc, 'NCBIM36' ) }; =head1 DESCRIPTION -NOTE: this code is under development and not fully functional nor tested yet. -Use only for development. +NOTE: this code is under development and not fully functional nor tested +yet. Use only for development. -This adaptor is a factory for creating MappedSlices representing alternative -assemblies and attaching them to a MappedSliceContainer. A mapper will be -created to map between the reference slice and the common container slice -coordinate system. +This adaptor is a factory for creating MappedSlices representing +alternative assemblies and attaching them to a MappedSliceContainer. A +mapper will be created to map between the reference slice and the common +container slice coordinate system. =head1 METHODS -new -fetch_by_version + new + fetch_by_version =head1 REALTED MODULES -Bio::EnsEMBL::MappedSlice -Bio::EnsEMBL::MappedSliceContainer -Bio::EnsEMBL::Compara::AlignSlice -Bio::EnsEMBL::Compara::AlignSlice::Slice -Bio::EnsEMBL::AlignStrainSlice -Bio::EnsEMBL::StrainSlice - -=head1 LICENCE - -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. - -=head1 AUTHOR - -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team - -=head1 CONTACT - -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> + Bio::EnsEMBL::MappedSlice + Bio::EnsEMBL::MappedSliceContainer + Bio::EnsEMBL::Compara::AlignSlice + Bio::EnsEMBL::Compara::AlignSlice::Slice + Bio::EnsEMBL::AlignStrainSlice + Bio::EnsEMBL::StrainSlice =cut +package Bio::EnsEMBL::DBSQL::AssemblySliceAdaptor; use strict; use warnings; diff --git a/modules/Bio/EnsEMBL/DBSQL/AttributeAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/AttributeAdaptor.pm index 0c197514fb056b0124a5bdf45305d8b7e1a1f71d..5caecbd4a345a4d34f065a3a1fd1acda0304f713 100644 --- a/modules/Bio/EnsEMBL/DBSQL/AttributeAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/AttributeAdaptor.pm @@ -1,11 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::DBSQL::AttributeAdaptor -# -# Copyright (c) 2003 EnsEMBL -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -# POD documentation - main docs before the code +=cut =head1 NAME @@ -15,35 +26,29 @@ Bio::EnsEMBL::Attribute objects. =head1 SYNOPSIS - #$db is a Bio::EnsEMBL::DBSQL::DBAdaptor object: + # $db is a Bio::EnsEMBL::DBSQL::DBAdaptor object: $attribute_adaptor = $db->get_AttributeAdaptor(); - $attributes = $attribute_adaptor->fetch_all_by_MiscFeature( $feature ); + $attributes = $attribute_adaptor->fetch_all_by_MiscFeature($feature); - $attributes = $attribute_adaptor->fetch_all_by_Slice( $slice ); + $attributes = $attribute_adaptor->fetch_all_by_Slice($slice); $attribute_adaptor->store_on_Slice( $slice, \@attributes ); - $attribute_adaptor->store_on_MiscFeature( $misc_feature, \@attributes ) - + $attribute_adaptor->store_on_MiscFeature( $misc_feature, + \@attributes ) =head1 DESCRIPTION - -=head1 CONTACT - -This modules is part of the Ensembl project http://www.ensembl.org - -Questions can be posted to the ensembl-dev mailing list: -ensembl-dev@ebi.ac.uk +=head1 METHODS =cut +package Bio::EnsEMBL::DBSQL::AttributeAdaptor; + use strict; use warnings; -package Bio::EnsEMBL::DBSQL::AttributeAdaptor; - use Bio::EnsEMBL::DBSQL::BaseAdaptor; use Bio::EnsEMBL::Attribute; diff --git a/modules/Bio/EnsEMBL/DBSQL/BaseAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/BaseAdaptor.pm index 13499aa2a0a69f996244353ac06a3b876b726a41..854f1cee457d77e2b11d7de8b9945081b7b3d346 100755 --- a/modules/Bio/EnsEMBL/DBSQL/BaseAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/BaseAdaptor.pm @@ -1,14 +1,22 @@ +=head1 LICENSE -# -# BioPerl module for Bio::EnsEMBL::DBSQL::BaseAdaptor -# -# Cared for by Ewan Birney <birney@ebi.ac.uk> -# -# Copyright Ewan Birney -# -# You may distribute this module under the same terms as perl itself + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see -# POD documentation - main docs before the code + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -16,74 +24,64 @@ Bio::EnsEMBL::DBSQL::BaseAdaptor - Base Adaptor for DBSQL adaptors =head1 SYNOPSIS - # base adaptor provides - - # SQL prepare function - $adaptor->prepare("sql statement"); + # base adaptor provides + + # SQL prepare function + $adaptor->prepare("sql statement"); - # get of root DBAdaptor object - $adaptor->db(); + # get of root DBAdaptor object + $adaptor->db(); - # constructor, ok for inheritence - $adaptor = Bio::EnsEMBL::DBSQL::SubClassOfBaseAdaptor->new($dbobj) + # constructor, ok for inheritence + $adaptor = Bio::EnsEMBL::DBSQL::SubClassOfBaseAdaptor->new($dbobj) =head1 DESCRIPTION This is a true base class for Adaptors in the Ensembl DBSQL system. Original idea from Arne - Adaptors are expected to have the following functions - $obj = $adaptor->fetch_by_dbID($internal_id); + $obj = $adaptor->fetch_by_dbID($internal_id); which builds the object from the primary key of the object. This -function is crucial because it allows adaptors to collaborate -relatively independently of each other - in other words, we can change -the schema under one adaptor without too many knock on changes through -the other adaptors. +function is crucial because it allows adaptors to collaborate relatively +independently of each other - in other words, we can change the schema +under one adaptor without too many knock on changes through the other +adaptors. Most adaptors will also have - $dbid = $adaptor->store($obj); + $dbid = $adaptor->store($obj); which stores the object. Currently the storing of an object also causes the objects to set - $obj->dbID + $obj->dbID(); correctly and attach the adaptor. - Other fetch functions go by the convention of - @object_array = @{$adaptor->fetch_all_by_XXXX($arguments_for_XXXX)}; + @object_array = @{ $adaptor->fetch_all_by_XXXX($arguments_for_XXXX) }; -sometimes it returns an array ref denoted by the 'all' in the name of the -method, sometimes an individual object. For example +sometimes it returns an array ref denoted by the 'all' in the name of +the method, sometimes an individual object. For example - $gene = $gene_adaptor->fetch_by_stable_id($stable_id); + $gene = $gene_adaptor->fetch_by_stable_id($stable_id); or - @fp = @{$simple_feature_adaptor->fetch_all_by_Slice($slice)}; - + @fp = @{ $simple_feature_adaptor->fetch_all_by_Slice($slice) }; -Occassionally adaptors need to provide access to lists of ids. In this case the -convention is to go list_XXXX, such as +Occassionally adaptors need to provide access to lists of ids. In this +case the convention is to go list_XXXX, such as - @gene_ids = @{$gene_adaptor->list_geneIds()}; + @gene_ids = @{ $gene_adaptor->list_geneIds() }; (note: this method is poorly named) -=head1 CONTACT - -Post questions to the EnsEMBL developer mailing list: <ensembl-dev@ebi.ac.uk> - -=head1 APPENDIX - -The rest of the documentation details each of the object methods. -Internal methods are usually preceded with a _ +=head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/DBSQL/BaseAlignFeatureAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/BaseAlignFeatureAdaptor.pm index 6e511b05867ec827b5da18051d0d52a9d7c51063..b9145a393bff1244853dfba35a8a28ab825f9463 100644 --- a/modules/Bio/EnsEMBL/DBSQL/BaseAlignFeatureAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/BaseAlignFeatureAdaptor.pm @@ -1,11 +1,22 @@ -# -# EnsEMBL module for Bio::EnsEMBL::BaseFeatureAdaptor -# -# Copyright (c) 2003 EnsEMBL -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -22,11 +33,6 @@ methods must be performed by subclasses. This is a base adaptor for the align feature adaptors DnaAlignFeatureAdaptor and ProteinAlignFeatureAdaptor. -=head1 CONTACT - -Post questions/comments to the ensembl developer list: -ensembl-dev@ebi.ac.uk - =head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm index f5c0076d9812ae7a3ce85f38ce93c1bf32f843b5..e92ac71d353f0d69bede2f6f3edd889416cb8e72 100644 --- a/modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm @@ -1,9 +1,22 @@ -# -# EnsEMBL module for Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor -# -# Copyright (c) 2003 Ensembl -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -21,10 +34,6 @@ This is a base adaptor for feature adaptors. This base class is simply a way of eliminating code duplication through the implementation of methods common to all feature adaptors. -=head1 CONTACT - -Contact Ensembl development list for info: <ensembl-dev@ebi.ac.uk> - =head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/DBSQL/BaseMetaContainer.pm b/modules/Bio/EnsEMBL/DBSQL/BaseMetaContainer.pm index f4aa45947d038cb16ce87fe34684594a8cfc5228..b01f1e6d04e03115b77e455f74f4c6d5e23facef 100644 --- a/modules/Bio/EnsEMBL/DBSQL/BaseMetaContainer.pm +++ b/modules/Bio/EnsEMBL/DBSQL/BaseMetaContainer.pm @@ -1,12 +1,22 @@ -# -# EnsEMBL module for Bio::EnsEMBL::DBSQL::BaseMetaContainer -# -# Cared for by Arne Stabenau -# -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -17,16 +27,13 @@ my $meta_container = $db_adaptor->get_MetaContainer(); - my @mapping_info = @{$meta_container->list_value_by_key('assembly.mapping')}; + my @mapping_info = + @{ $meta_container->list_value_by_key('assembly.mapping') }; =head1 DESCRIPTION An object that encapsulates access to db meta data -=head1 CONTACT - - Post questions to the EnsEMBL development list: ensembl-dev@ebi.ac.uk - =head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/DBSQL/CompressedSequenceAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/CompressedSequenceAdaptor.pm index 40282d720d847ff0ecada0f0e75f17c37ed7e32a..7f79a9f43c1f2b36cfcb4e3676980b08aabb1e08 100644 --- a/modules/Bio/EnsEMBL/DBSQL/CompressedSequenceAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/CompressedSequenceAdaptor.pm @@ -1,10 +1,22 @@ -# -# EnsEMBL module for Bio::EnsEMBL::DBSQL::SequenceAdaptor -# -# -# Copyright EMBL/EBI -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -12,19 +24,17 @@ Bio::EnsEMBL::DBSQL::CompressedSequenceAdaptor - Facilitates DB storage and retr =head1 SYNOPSIS -$seq_adptr = $database_adaptor->get_SequenceAdaptor(); -$dna = ${$seq_adptr->fetch_by_Slice_start_end_strand($slice, 1, 1000, -1);} + $seq_adptr = $database_adaptor->get_SequenceAdaptor(); + + $dna = + ${ $seq_adptr->fetch_by_Slice_start_end_strand( $slice, 1, 1000, + -1 ) }; =head1 DESCRIPTION An adaptor for the retrieval of compressed DNA sequence from the EnsEMBL database -=head1 CONTACT - -Post questions/comments to the EnsEMBL development list: -ensembl-dev@ebi.ac.uk - =head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/DBSQL/CoordSystemAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/CoordSystemAdaptor.pm index 45de06a37adfd4a565ee40edf2beae0461e6ffc9..88d22017899aee21162d5b17d651f2fd6b04608b 100644 --- a/modules/Bio/EnsEMBL/DBSQL/CoordSystemAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/CoordSystemAdaptor.pm @@ -1,7 +1,22 @@ -# -# EnsEMBL module for Bio::EnsEMBL::DBSQL::CoordSystemAdaptor -# -# +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -9,36 +24,36 @@ Bio::EnsEMBL::DBSQL::CoordSystemAdaptor =head1 SYNOPSIS - use Bio::EnsEMBL::Registry; Bio::EnsEMBL::Registry->load_registry_from_db( - -host => 'ensembldb.ensembl.org', - -user => 'anonymous' + -host => 'ensembldb.ensembl.org', + -user => 'anonymous' ); - $csa = Bio::EnsEMBL::Registry->get_adaptor("human", "core", "coordsystem"); + $csa = Bio::EnsEMBL::Registry->get_adaptor( "human", "core", + "coordsystem" ); # # Get all coord systems in the database: # - foreach my $cs (@{$csa->fetch_all()}) { - print $cs->name, ' ', $cs->version, "\n"; + foreach my $cs ( @{ $csa->fetch_all() } ) { + print $cs->name, ' ', $cs->version, "\n"; } # # Fetching by name: # - #use the default version of coord_system 'chromosome' (e.g. NCBI33): + # use the default version of coord_system 'chromosome' (e.g. NCBI33): $cs = $csa->fetch_by_name('chromosome'); - #get an explicit version of coord_system 'chromosome': - $cs = $csa->fetch_by_name('chromsome', 'NCBI34'); + # get an explicit version of coord_system 'chromosome': + $cs = $csa->fetch_by_name( 'chromsome', 'NCBI34' ); - #get all coord_systems of name 'chromosome': - foreach $cs (@{$csa->fetch_all_by_name('chromosome')}) { - print $cs->name, ' ', $cs->version, "\n"; + # get all coord_systems of name 'chromosome': + foreach $cs ( @{ $csa->fetch_all_by_name('chromosome') } ) { + print $cs->name, ' ', $cs->version, "\n"; } # @@ -50,23 +65,23 @@ Bio::EnsEMBL::DBSQL::CoordSystemAdaptor # Fetching the pseudo coord system 'toplevel' # - #Get the default top_level coord system: + # Get the default top_level coord system: $cs = $csa->fetch_top_level(); - #can also use an alias in fetch_by_name: + # can also use an alias in fetch_by_name: $cs = $csa->fetch_by_name('toplevel'); - #can also request toplevel using rank=0 + # can also request toplevel using rank=0 $cs = $csa->fetch_by_rank(0); # # Fetching by sequence level: # - #Get the coord system which is used to store sequence: + # Get the coord system which is used to store sequence: $cs = $csa->fetch_sequence_level(); - #can also use an alias in fetch_by_name: + # can also use an alias in fetch_by_name: $cs = $csa->fetch_by_name('seqlevel'); # @@ -77,31 +92,26 @@ Bio::EnsEMBL::DBSQL::CoordSystemAdaptor =head1 DESCRIPTION -This adaptor allows the querying of information from the coordinate system -adaptor. +This adaptor allows the querying of information from the coordinate +system adaptor. Note that many coordinate systems do not have a concept of a version -for the entire coordinate system (though they may have a per-sequence version). -The 'chromosome' coordinate system usually has a version (i.e. the -assembly version) but the clonal coordinate system does not (despite having -individual sequence versions). In the case where a coordinate system does -not have a version an empty string ('') is used instead. - -=head1 AUTHOR - Graham McVicker - -=head1 CONTACT - -Post questions to the EnsEMBL development list ensembl-dev@ebi.ac.uk +for the entire coordinate system (though they may have a per-sequence +version). The 'chromosome' coordinate system usually has a version +(i.e. the assembly version) but the clonal coordinate system does not +(despite having individual sequence versions). In the case where a +coordinate system does not have a version an empty string ('') is used +instead. =head1 METHODS =cut +package Bio::EnsEMBL::DBSQL::CoordSystemAdaptor; + use strict; use warnings; -package Bio::EnsEMBL::DBSQL::CoordSystemAdaptor; - use Bio::EnsEMBL::DBSQL::BaseAdaptor; use Bio::EnsEMBL::Utils::Exception qw(throw warning deprecate); use Bio::EnsEMBL::CoordSystem; diff --git a/modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm index 82cd96842163a14ecc226d6d80ee5767fa73c427..c5213c6ffd4d0e07d0b18765996975cd344cfc3d 100755 --- a/modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/DBAdaptor.pm @@ -1,46 +1,59 @@ +=head1 LICENSE -=head1 NAME - Bio::EnsEMBL::DBSQL::DBAdaptor + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 SYNOPSIS + This software is distributed under a modified Apache license. + For license details, please see - $db = - Bio::EnsEMBL::DBSQL::DBAdaptor->new( -user => 'root', - -dbname => 'pog', - -host => 'caldy', - -driver => 'mysql' ); + http://www.ensembl.org/info/about/code_licence.html - $gene_adaptor = $db->get_GeneAdaptor(); +=head1 CONTACT - $gene = $gene_adaptor->fetch_by_stable_id($stable_id); + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. - $slice = - $db->get_SliceAdaptor()->fetch_by_chr_start_end( 'X', 1, 10000 ); + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 DESCRIPTION +=cut +=head1 NAME -Formerly this class provided database connectivity and a means to retrieve -object adaptors. This class is now provided for convenience and backwards -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. +Bio::EnsEMBL::DBSQL::DBAdaptor -Please use Bio::EnsEMBL::Registry to retrieve object adaptors. +=head1 SYNOPSIS -=head1 CONTACT + $db = Bio::EnsEMBL::DBSQL::DBAdaptor->new( + -user => 'root', + -dbname => 'pog', + -host => 'caldy', + -driver => 'mysql' + ); -Post questions to the EnsEMBL development list <ensembl-dev@ebi.ac.uk> + $gene_adaptor = $db->get_GeneAdaptor(); -=head1 METHODS + $gene = $gene_adaptor->fetch_by_stable_id($stable_id); -The rest of the documentation details each of the object methods. Internal -methods are usually preceded with a _ + $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, 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 METHODS =cut package Bio::EnsEMBL::DBSQL::DBAdaptor; - use strict; use Bio::EnsEMBL::DBSQL::DBConnection; diff --git a/modules/Bio/EnsEMBL/DBSQL/DBConnection.pm b/modules/Bio/EnsEMBL/DBSQL/DBConnection.pm index a110b16baf6994fdf3f799033bf212532872ae65..053fb918e5b91f6b64d6a8ffd3e10edd4d3924cf 100644 --- a/modules/Bio/EnsEMBL/DBSQL/DBConnection.pm +++ b/modules/Bio/EnsEMBL/DBSQL/DBConnection.pm @@ -1,41 +1,55 @@ -=head1 NAME - Bio::EnsEMBL::DBSQL::DBConnection +=head1 LICENSE -=head1 SYNOPSIS + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. - $dbc = Bio::EnsEMBL::DBSQL::DBConnection->new( - -user => 'anonymous', - -dbname => 'homo_sapiens_core_20_34c', - -host => 'ensembldb.ensembl.org', - -driver => 'mysql', - ); + This software is distributed under a modified Apache license. + For license details, please see + http://www.ensembl.org/info/about/code_licence.html - SQL statements should be created/executed through - this modules prepare() and do() methods. +=head1 CONTACT - $sth = $dbc->prepare( "SELECT something FROM yourtable" ); + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. - $sth->execute(); + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. - # do something with rows returned ... +=cut - $sth->finish(); +=head1 NAME -=head1 DESCRIPTION +Bio::EnsEMBL::DBSQL::DBConnection - This class is a wrapper around DBIs datbase handle. It provides some - additional functionality such as the ability to automatically disconnect - when inactive and reconnect when needed. +=head1 SYNOPSIS - Generally this class will be used through one of the object adaptors or the - Bio::EnsEMBL::Registry and will not be instantiated directly. + $dbc = Bio::EnsEMBL::DBSQL::DBConnection->new( + -user => 'anonymous', + -dbname => 'homo_sapiens_core_20_34c', + -host => 'ensembldb.ensembl.org', + -driver => 'mysql', + ); + # SQL statements should be created/executed through this modules + # prepare() and do() methods. -=head1 CONTACT + $sth = $dbc->prepare("SELECT something FROM yourtable"); + + $sth->execute(); + + # do something with rows returned ... + + $sth->finish(); + +=head1 DESCRIPTION - This module is part of the Ensembl project: www.ensembl.org +This class is a wrapper around DBIs datbase handle. It provides some +additional functionality such as the ability to automatically disconnect +when inactive and reconnect when needed. - Ensembl development mailing list: <ensembl-dev@ebi.ac.uk> +Generally this class will be used through one of the object adaptors or +the Bio::EnsEMBL::Registry and will not be instantiated directly. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/DBSQL/DBEntryAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/DBEntryAdaptor.pm index ebb2d00689b0da8dfbd81c4ed0f2fa2a0742d15a..10929710338637f2f5a03478de2e6f9ae75b38ba 100644 --- a/modules/Bio/EnsEMBL/DBSQL/DBEntryAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/DBEntryAdaptor.pm @@ -1,11 +1,22 @@ -# EnsEMBL External object reference reading writing adaptor for mySQL -# -# Copyright EMBL-EBI 2001 -# -# Author: Arne Stabenau -# -# Date : 06.03.2001 -# +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -26,10 +37,6 @@ MySQL Database queries to load and store external object references. @db_entries = @{ $db_entry_adaptor->fetch_all_by_Gene($gene) }; @gene_ids = $db_entry_adaptor->list_gene_ids_by_extids('BAB15482'); -=head1 CONTACT - -Post questions to the EnsEMBL developer list <ensembl-dev@ebi.ac.uk> - =head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/DBSQL/DensityFeatureAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/DensityFeatureAdaptor.pm index c0dc5272a42c68556365cca21b93be68866015fe..c3a6f01a2844da9e1f94633d2629c69d5590f132 100644 --- a/modules/Bio/EnsEMBL/DBSQL/DensityFeatureAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/DensityFeatureAdaptor.pm @@ -1,11 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor -# -# Copyright EMBL/EBI -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -13,23 +24,21 @@ Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor =head1 SYNOPSIS -my $dfa = $database_adaptor->get_DensityFeatureAdaptor(); + my $dfa = $database_adaptor->get_DensityFeatureAdaptor(); -my $interpolate = 1; -my $blocks_wanted = 50; + my $interpolate = 1; + my $blocks_wanted = 50; -@dense_feats = @{$dfa->fetch_all_by_Slice($slice,'SNPDensity', - $blocks_wanted, $interpolate);} + @dense_feats = @{ + $dfa->fetch_all_by_Slice( $slice, 'SNPDensity', $blocks_wanted, + $interpolate ); + } =head1 DESCRIPTION Density Feature Adaptor - An adaptor responsible for the creation of density features from the database. -=head1 CONTACT - -Post questions to the Ensembl developer list. - =head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/DBSQL/DensityTypeAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/DensityTypeAdaptor.pm index de23d96fca1ec88f5052e4379f4a621a56a31afb..8e0bff87b8f504364f8fbf6b23c20deead602e70 100644 --- a/modules/Bio/EnsEMBL/DBSQL/DensityTypeAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/DensityTypeAdaptor.pm @@ -1,10 +1,22 @@ -# -# EnsEMBL module for Bio::EnsEMBL::DBSQL::DensityTypeAdaptor -# -# -# Copyright EMBL/EBI -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -19,7 +31,6 @@ Bio::EnsEMBL::DBSQL::DensityTypeAdaptor my $dt = $density_type_adaptor->fetch_by_dbID(12); - =head1 DESCRIPTION DensityTypeAdaptor - Performs database interaction for DensityType objects. diff --git a/modules/Bio/EnsEMBL/DBSQL/DnaAlignFeatureAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/DnaAlignFeatureAdaptor.pm index fe2139c445b8f65b95f2617b56bc540f1e549bdf..f8b08d74595c7fa10e98b0d1730d2b20bf7650f5 100644 --- a/modules/Bio/EnsEMBL/DBSQL/DnaAlignFeatureAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/DnaAlignFeatureAdaptor.pm @@ -1,9 +1,22 @@ -# -# EnsEMBL module for Bio::EnsEMBL::DnaAlignFeatureAdaptor -# -# Copyright (c) 2003 EnsEMBL -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -19,14 +32,12 @@ Bio::EnsEMBL::DBSQL::DnaAlignFeatureAdaptor - Adaptor for DnaAlignFeatures =head1 DESCRIPTION -This is an adaptor responsible for the retrieval and storage of -DnaDnaAlignFeatures from the database. This adaptor inherits most of its -functionality from the BaseAlignFeatureAdaptor and BaseFeatureAdaptor +This is an adaptor responsible for the retrieval and storage of +DnaDnaAlignFeatures from the database. This adaptor inherits most of its +functionality from the BaseAlignFeatureAdaptor and BaseFeatureAdaptor superclasses. -=head1 CONTACT - -Post questions to the EnsEMBL development list <ensembl-dev@ebi.ac.uk> +=head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/DBSQL/ExonAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/ExonAdaptor.pm index b21ca44b4adc99194a5d6e87ce140bd5b961546a..8afddcd97e1275ea9bdb61b4f085fa3012eaf16f 100644 --- a/modules/Bio/EnsEMBL/DBSQL/ExonAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/ExonAdaptor.pm @@ -1,15 +1,22 @@ -package Bio::EnsEMBL::DBSQL::ExonAdaptor; +=head1 LICENSE -#EnsEMBL Exon reading writing adaptor for mySQL -# -# Copyright EMBL-EBI 2001 -# -# Author: Arne Stabenau -# based on -# Elia Stupkas Gene_Obj -# -# Date : 20.02.2001 -# + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -24,18 +31,16 @@ storage of exon objects =head1 DESCRIPTION -The ExonAdaptor is responsible for retrieving and storing Exon objects from an -Ensembl database. Most of the ExonAdaptor functionality is inherited from the -B<Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor> class. - -=head1 CONTACT - -Post questions/comments to the Ensembl dev list: ensembl-dev@ebi.ac.uk +The ExonAdaptor is responsible for retrieving and storing Exon objects +from an Ensembl database. Most of the ExonAdaptor functionality is +inherited from the B<Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor> class. =head1 METHODS =cut +package Bio::EnsEMBL::DBSQL::ExonAdaptor; + use strict; use Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor; diff --git a/modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm index 6183fea59e9c99128b244326b1fb6840cf5074bc..ff1089d4240fafc6c86dc1e9fdb8bac1b10d58fb 100644 --- a/modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm @@ -1,4 +1,22 @@ -package Bio::EnsEMBL::DBSQL::GeneAdaptor; +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -10,43 +28,38 @@ storage of Gene objects use Bio::EnsEMBL::Registry; Bio::EnsEMBL::Registry->load_registry_from_db( - -host => 'ensembldb.ensembl.org', - -user => 'anonymous', + -host => 'ensembldb.ensembl.org', + -user => 'anonymous', ); - $gene_adaptor = Bio::EnsEMBL::Registry->get_adaptor("human", "core", "gene"); + $gene_adaptor = + Bio::EnsEMBL::Registry->get_adaptor( "human", "core", "gene" ); $gene = $gene_adaptor->fetch_by_dbID(1234); $gene = $gene_adaptor->fetch_by_stable_id('ENSG00000184129'); - @genes = @{$gene_adaptor->fetch_all_by_external_name('BRCA2')}; - - $slice_adaptor = Bio::EnsEMBL::Registry->get_adaptor("human", "core", "slice");; - $slice = $slice_adaptor->fetch_by_region('chromosome', '1', 1, 1000000); - @genes = @{$gene_adaptor->fetch_all_by_Slice($slice)}; - -=head1 DESCRIPTION - -This is a database aware adaptor for the retrieval and storage of gene objects. + @genes = @{ $gene_adaptor->fetch_all_by_external_name('BRCA2') }; -=head1 LICENCE + $slice_adaptor = + Bio::EnsEMBL::Registry->get_adaptor( "human", "core", "slice" ); -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. + $slice = + $slice_adaptor->fetch_by_region( 'chromosome', '1', 1, 1000000 ); -=head1 AUTHOR + @genes = @{ $gene_adaptor->fetch_all_by_Slice($slice) }; -Arne Stabenau <stabenau@ebi.ac.uk>, Ensembl core API team -Based on Elia Stupkas Gene_Obj +=head1 DESCRIPTION -=head1 CONTACT +This is a database aware adaptor for the retrieval and storage of gene +objects. -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> +=head1 METHODS =cut +package Bio::EnsEMBL::DBSQL::GeneAdaptor; + use strict; use Bio::EnsEMBL::Utils::Exception qw( deprecate throw warning ); diff --git a/modules/Bio/EnsEMBL/DBSQL/KaryotypeBandAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/KaryotypeBandAdaptor.pm index 55d3130b7486275ea80a00e5e82818c1d30b2760..d9caabe68709eab47261cecff2c34760ad95ed8d 100644 --- a/modules/Bio/EnsEMBL/DBSQL/KaryotypeBandAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/KaryotypeBandAdaptor.pm @@ -1,53 +1,49 @@ -# -# Ensembl module for Bio::EnsEMBL::DBSQL::KaryotypeBandAdaptor -# -# -# Copyright James Stalker -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 NAME + This software is distributed under a modified Apache license. + For license details, please see -Bio::EnsEMBL::DBSQL::KaryotypeBandAdaptor + http://www.ensembl.org/info/about/code_licence.html -=head1 SYNOPSIS +=head1 CONTACT -$kary_adaptor = $db_adaptor->get_KaryotypeBandAdaptor(); -foreach $band ( @{$kary_adaptor->fetch_all_by_Slice($slice)} ) { - #do something with band -} + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -$band = $kary_adaptor->fetch_by_dbID($id); + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -my @bands = @{$kary_adaptor->fetch_all_by_chr_name('X')}; +=cut -my $band = $kary_adaptor->fetch_by_chr_band('4','q23'); +=head1 NAME +Bio::EnsEMBL::DBSQL::KaryotypeBandAdaptor -=head1 DESCRIPTION +=head1 SYNOPSIS -Database adaptor to provide access to KaryotypeBand objects + $kary_adaptor = $db_adaptor->get_KaryotypeBandAdaptor(); -=head1 AUTHOR + foreach $band ( @{ $kary_adaptor->fetch_all_by_Slice($slice) } ) { + # do something with band + } -James Stalker + $band = $kary_adaptor->fetch_by_dbID($id); -This modules is part of the Ensembl project http://www.ensembl.org + my @bands = @{ $kary_adaptor->fetch_all_by_chr_name('X') }; -=head1 CONTACT + my $band = $kary_adaptor->fetch_by_chr_band( '4', 'q23' ); -Email jws@sanger.ac.uk +=head1 DESCRIPTION -=head1 APPENDIX +Database adaptor to provide access to KaryotypeBand objects -The rest of the documentation details each of the object methods. Internal -methods are usually preceded with a _ +=head1 METHODS =cut - package Bio::EnsEMBL::DBSQL::KaryotypeBandAdaptor; use strict; diff --git a/modules/Bio/EnsEMBL/DBSQL/MergedAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/MergedAdaptor.pm index 53ba3d33d28fbc400304e8c8f3294cde5a3d83cf..a7da9ea7de66326035f366f7dd91f1517330c0d5 100644 --- a/modules/Bio/EnsEMBL/DBSQL/MergedAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/MergedAdaptor.pm @@ -1,30 +1,38 @@ -# -# Ensembl module for Registry -# -# Copyright EMBL/EBI -## -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 NAME + This software is distributed under a modified Apache license. + For license details, please see -Bio::EnsEMBL::DBSQL::MergedAdaptor + http://www.ensembl.org/info/about/code_licence.html -=head1 SYNOPSIS +=head1 CONTACT -$merged_adaptor = new Bio::EnsEMBL::DBSQL::MergedAdaptor(-species => "human", -type => "Population"); + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 DESCRIPTION +=cut -The MergedAdaptor object is merely a list of adaptors. AUTOLOAD is used to -call a subroutine on each adaptor and merge the results. +=head1 NAME -=head1 CONTACT +Bio::EnsEMBL::DBSQL::MergedAdaptor + +=head1 SYNOPSIS + + $merged_adaptor = new Bio::EnsEMBL::DBSQL::MergedAdaptor( + -species => "human", + -type => "Population" + ); -Post questions to the Ensembl developer list: <ensembl-dev@ebi.ac.uk> +=head1 DESCRIPTION +The MergedAdaptor object is merely a list of adaptors. AUTOLOAD is used +to call a subroutine on each adaptor and merge the results. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/DBSQL/MetaContainer.pm b/modules/Bio/EnsEMBL/DBSQL/MetaContainer.pm index 54933117f1ae76d2ed4bded3568f02af35fa742e..d5fb3added8a7673e724d49960065049213bf967 100644 --- a/modules/Bio/EnsEMBL/DBSQL/MetaContainer.pm +++ b/modules/Bio/EnsEMBL/DBSQL/MetaContainer.pm @@ -1,12 +1,22 @@ -# -# EnsEMBL module for Bio::EnsEMBL::DBSQL::MetaContainer -# -# Cared for by Arne Stabenau -# -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -27,10 +37,6 @@ An object that encapsulates specific access to core db meta data -=head1 CONTACT - - Post questions to the EnsEMBL development list: ensembl-dev@ebi.ac.uk - =head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/DBSQL/MetaCoordContainer.pm b/modules/Bio/EnsEMBL/DBSQL/MetaCoordContainer.pm index 036afced6bfef69c369123fbaaeb15d66006d893..0e98233ae2ce9cf5f79b35e719ab084779142edc 100644 --- a/modules/Bio/EnsEMBL/DBSQL/MetaCoordContainer.pm +++ b/modules/Bio/EnsEMBL/DBSQL/MetaCoordContainer.pm @@ -1,8 +1,28 @@ -use strict; -use warnings; +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut package Bio::EnsEMBL::DBSQL::MetaCoordContainer; +use strict; +use warnings; + use vars qw(@ISA); use strict; @@ -11,9 +31,6 @@ use Bio::EnsEMBL::Utils::Exception; @ISA = qw(Bio::EnsEMBL::DBSQL::BaseAdaptor); - - - sub new { my $class = shift; diff --git a/modules/Bio/EnsEMBL/DBSQL/MiscFeatureAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/MiscFeatureAdaptor.pm index b1f50a088981fe2026efed3b710c382fd550f894..2963bb2da9c08194dd01f5a6abc63a7d0971db57 100644 --- a/modules/Bio/EnsEMBL/DBSQL/MiscFeatureAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/MiscFeatureAdaptor.pm @@ -1,11 +1,22 @@ -# -# EnsEMBL module for Bio::EnsEMBL::DBSQL::MiscFeatureAdaptor -# -# Copyright EMBL/EBI -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT -# POD documentation - main docs before the code + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -13,35 +24,31 @@ Bio::EnsEMBL::DBSQL::MiscFeatureAdaptor =head1 SYNOPSIS -$mfa = $database_adaptor->get_MiscFeatureAdaptor(); + $mfa = $database_adaptor->get_MiscFeatureAdaptor(); -# retrieve a misc feature by its dbID -my $misc_feat = $mfa->fetch_by_dbID(1234); + # retrieve a misc feature by its dbID + my $misc_feat = $mfa->fetch_by_dbID(1234); -# retrieve all misc features in a given region -my @misc_feats = @{$mfa->fetch_all_by_Slice($slice)}; + # retrieve all misc features in a given region + my @misc_feats = @{ $mfa->fetch_all_by_Slice($slice) }; -# retrieve all misc features in a given region with a given set code -my @misc_clones = @{$mfa->fetch_all_by_Slice_and_set_code('cloneset')}; + # retrieve all misc features in a given region with a given set code + my @misc_clones = + @{ $mfa->fetch_all_by_Slice_and_set_code('cloneset') }; -# store some misc features in the database -$mfa->store(@misc_features); + # store some misc features in the database + $mfa->store(@misc_features); =head1 DESCRIPTION -This is an adaptor for the retrieval and storage of MiscFeatures. Misc -Features are extremely generic features that can be added with minimal -effort to the database. Currently misc features are used to describe -the locations of clone sets and tiling path information, but arbitrary -features can be stored. Misc features are grouped into sets and can be -fetched according to their grouping using the fetch_all_by_Slice_and_set_code -and fetch_all_by_set_code methods. MiscFeatures may belong to more -than one set. - - -=head1 CONTACT - -Post questions to the EnsEMBL developer list: ensembl-dev@ebi.ac.uk +This is an adaptor for the retrieval and storage of MiscFeatures. +Misc Features are extremely generic features that can be added with +minimal effort to the database. Currently misc features are used to +describe the locations of clone sets and tiling path information, +but arbitrary features can be stored. Misc features are grouped +into sets and can be fetched according to their grouping using the +fetch_all_by_Slice_and_set_code and fetch_all_by_set_code methods. +MiscFeatures may belong to more than one set. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/DBSQL/MiscSetAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/MiscSetAdaptor.pm index f2ea0b67d7e8032e922ace3e347c860daf495e48..eacc68b8cea1adac52a53503024f7be9861f4ed0 100644 --- a/modules/Bio/EnsEMBL/DBSQL/MiscSetAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/MiscSetAdaptor.pm @@ -1,18 +1,28 @@ -# -# Ensembl module for Bio::EnsEMBL::DBSQL::MiscSetAdaptor -# -# Copyright (c) 2003 EnsEMBL -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME Bio::EnsEMBL::DBSQL::MiscSetAdaptor - Provides database interaction for Bio::EnsEMBL::MiscSet objects. - =head1 SYNOPSIS my $msa = $registry->get_adaptor( 'Human', 'Core', 'MiscSet' ); @@ -23,23 +33,18 @@ Bio::EnsEMBL::MiscSet objects. =head1 DESCRIPTION -This class provides database interactivity for MiscSet objects. MiscSets -are used to classify MiscFeatures into groups. - -=head1 CONTACT - -This modules is part of the Ensembl project http://www.ensembl.org +This class provides database interactivity for MiscSet objects. +MiscSets are used to classify MiscFeatures into groups. -Questions can be posted to the ensembl-dev mailing list: -ensembl-dev@ebi.ac.uk +=head1 METHODS =cut +package Bio::EnsEMBL::DBSQL::MiscSetAdaptor; + use strict; use warnings; -package Bio::EnsEMBL::DBSQL::MiscSetAdaptor; - use Bio::EnsEMBL::MiscSet; use Bio::EnsEMBL::DBSQL::BaseAdaptor; diff --git a/modules/Bio/EnsEMBL/DBSQL/OligoArrayAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/OligoArrayAdaptor.pm index cade72d35a1fd42afac3807dc2db16928deabb47..9bbaaef58a9ed16d593422e73a28e0ca172cb65b 100644 --- a/modules/Bio/EnsEMBL/DBSQL/OligoArrayAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/OligoArrayAdaptor.pm @@ -1,7 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::DBSQL::OligoArrayAdaptor -# -# You may distribute this module under the same terms as Perl itself +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -10,36 +25,25 @@ storing OligoArray objects. =head1 SYNOPSIS -my $oaa = $db->get_OligoArrayAdaptor(); + my $oaa = $db->get_OligoArrayAdaptor(); -my $array = $oaa->fetch_by_name('Array-1'); -my @arrays = @{$oaa->fetch_all()}; + my $array = $oaa->fetch_by_name('Array-1'); + my @arrays = @{ $oaa->fetch_all() }; =head1 DESCRIPTION The OligoArrayAdaptor is a database adaptor for storing and retrieving OligoArray objects. -=head1 AUTHOR - -This module was created by Ian Sealy, but is almost entirely based on the -OligoArrayAdaptor module written by Arne Stabenau. - -This module is part of the Ensembl project: http://www.ensembl.org/ - -=head1 CONTACT - -Post comments or questions to the Ensembl development list: ensembl-dev@ebi.ac.uk - =head1 METHODS =cut +package Bio::EnsEMBL::DBSQL::OligoArrayAdaptor; + use strict; use warnings; -package Bio::EnsEMBL::DBSQL::OligoArrayAdaptor; - use Bio::EnsEMBL::Utils::Exception qw( warning ); use Bio::EnsEMBL::OligoArray; use Bio::EnsEMBL::DBSQL::BaseAdaptor; diff --git a/modules/Bio/EnsEMBL/DBSQL/OligoFeatureAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/OligoFeatureAdaptor.pm index 85f2d013bf74cc087b6cd79098d8a390193cc07a..6be449369063d2e7e3eee57a68e0d6e6ba9a6161 100644 --- a/modules/Bio/EnsEMBL/DBSQL/OligoFeatureAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/OligoFeatureAdaptor.pm @@ -1,7 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::DBSQL::OligoFeatureAdaptor -# -# You may distribute this module under the same terms as Perl itself +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -10,36 +25,26 @@ storing OligoFeature objects. =head1 SYNOPSIS -my $ofa = $db->get_OligoFeatureAdaptor(); + my $ofa = $db->get_OligoFeatureAdaptor(); -my $features = $ofa->fetch_all_by_Probe($probe); -$features = $ofa->fetch_all_by_Slice_arrayname($slice, 'Array-1', 'Array-2'); + my $features = $ofa->fetch_all_by_Probe($probe); + $features = + $ofa->fetch_all_by_Slice_arrayname( $slice, 'Array-1', 'Array-2' ); =head1 DESCRIPTION The OligoFeatureAdaptor is a database adaptor for storing and retrieving OligoFeature objects. -=head1 AUTHOR - -This module was created by Ian Sealy, but is almost entirely based on the -OligoFeatureAdaptor module written by Arne Stabenau. - -This module is part of the Ensembl project: http://www.ensembl.org/ - -=head1 CONTACT - -Post comments or questions to the Ensembl development list: ensembl-dev@ebi.ac.uk - =head1 METHODS =cut +package Bio::EnsEMBL::DBSQL::OligoFeatureAdaptor; + use strict; use warnings; -package Bio::EnsEMBL::DBSQL::OligoFeatureAdaptor; - use Bio::EnsEMBL::Utils::Exception qw( throw warning ); use Bio::EnsEMBL::OligoFeature; use Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor; diff --git a/modules/Bio/EnsEMBL/DBSQL/OligoProbeAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/OligoProbeAdaptor.pm index c6e76f93f6f255ce82116b893ceb6cc87f344eec..f72810460418a5c7ef6692ff5e49875aea2968eb 100644 --- a/modules/Bio/EnsEMBL/DBSQL/OligoProbeAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/OligoProbeAdaptor.pm @@ -1,7 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::DBSQL::OligoProbeAdaptor -# -# You may distribute this module under the same terms as Perl itself +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -10,35 +25,25 @@ storing OligoProbe objects. =head1 SYNOPSIS -my $opa = $db->get_OligoProbeAdaptor(); + my $opa = $db->get_OligoProbeAdaptor(); -my $probe = $opa->fetch_by_array_probeset_probe('Array-1', undef, 'Probe-1'); + my $probe = + $opa->fetch_by_array_probeset_probe( 'Array-1', undef, 'Probe-1' ); =head1 DESCRIPTION The OligoProbeAdaptor is a database adaptor for storing and retrieving OligoProbe objects. -=head1 AUTHOR - -This module was created by Ian Sealy, but is almost entirely based on the -OligoProbeAdaptor module written by Arne Stabenau. - -This module is part of the Ensembl project: http://www.ensembl.org/ - -=head1 CONTACT - -Post comments or questions to the Ensembl development list: ensembl-dev@ebi.ac.uk - =head1 METHODS =cut +package Bio::EnsEMBL::DBSQL::OligoProbeAdaptor; + use strict; use warnings; -package Bio::EnsEMBL::DBSQL::OligoProbeAdaptor; - use Bio::EnsEMBL::Utils::Exception qw( throw warning ); use Bio::EnsEMBL::OligoProbe; use Bio::EnsEMBL::DBSQL::BaseAdaptor; diff --git a/modules/Bio/EnsEMBL/DBSQL/PredictionExonAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/PredictionExonAdaptor.pm index 5186a2cd983892a08b233844245b7bebf7d90c0d..242a87ec3fd6aadc53130c4fec97f5775e9b1d18 100644 --- a/modules/Bio/EnsEMBL/DBSQL/PredictionExonAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/PredictionExonAdaptor.pm @@ -1,36 +1,41 @@ -#EnsEMBL PredictionExon reading writing adaptor for mySQL -# -# Copyright EMBL-EBI 2003 -# -# Author: Arne Stabenau -# -# +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::DBSQL::PredictionExonAdaptor - Performs database interaction for -PredictionExons. + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT -$pea = $database_adaptor->get_PredictionExonAdaptor(); -$pexon = $pea->fetch_by_dbID(); + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -my $slice = $database_adaptor->get_SliceAdaptor->fetch_by_region('X',1,1e6); + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -my @pexons = @{$pea->fetch_all_by_Slice($slice)}; +=cut +=head1 NAME -=head1 CONTACT +Bio::EnsEMBL::DBSQL::PredictionExonAdaptor - Performs database interaction for +PredictionExons. - Post questions to the EnsEMBL development list ensembl-dev@ebi.ac.uk +=head1 SYNOPSIS -=head1 APPENDIX + $pea = $database_adaptor->get_PredictionExonAdaptor(); + $pexon = $pea->fetch_by_dbID(); - The rest of the documentation describes object methods. + my $slice = + $database_adaptor->get_SliceAdaptor->fetch_by_region( 'X', 1, 1e6 ); -=cut + my @pexons = @{ $pea->fetch_all_by_Slice($slice) }; +=head1 METHODS + +=cut package Bio::EnsEMBL::DBSQL::PredictionExonAdaptor; diff --git a/modules/Bio/EnsEMBL/DBSQL/PredictionTranscriptAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/PredictionTranscriptAdaptor.pm index 17f6a5523c368bd17da1c3d60ac397a9c869e957..0d32953d4dfa8a07bc823a3dc8aceb837620b3b2 100644 --- a/modules/Bio/EnsEMBL/DBSQL/PredictionTranscriptAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/PredictionTranscriptAdaptor.pm @@ -1,9 +1,22 @@ -# EnsEMBL Exon reading writing adaptor for mySQL -# -# Author: Arne Stabenau -# -# Date : 22.11.2001 -# +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -12,20 +25,18 @@ Performs database interaction related to PredictionTranscripts =head1 SYNOPSIS -#get a prediction transcript adaptor from the database -$pta = $database_adaptor->get_PredictionTranscriptAdaptor(); - -#get a slice on a region of chromosome 1 -$sa = $database_adaptor->get_SliceAdaptor(); + # get a prediction transcript adaptor from the database + $pta = $database_adaptor->get_PredictionTranscriptAdaptor(); -$slice = $sa->fetch_by_region('chromosome','x', 100000, 200000); + # get a slice on a region of chromosome 1 + $sa = $database_adaptor->get_SliceAdaptor(); -#get all the prediction transcripts from the slice region -$prediction_transcripts = @{$pta->fetch_all_by_Slice($slice)}; + $slice = $sa->fetch_by_region( 'chromosome', 'x', 100000, 200000 ); -=head1 CONTACT + # get all the prediction transcripts from the slice region + $prediction_transcripts = @{ $pta->fetch_all_by_Slice($slice) }; -Email questions to the EnsEMBL developer list: <ensembl-dev@ebi.ac.uk> +=head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/DBSQL/ProteinAlignFeatureAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/ProteinAlignFeatureAdaptor.pm index 3b04e6789dced95c4637f7365678ebea4f4f26dd..4719fabe2a9c008cf772072659c463aeb69dd9db 100644 --- a/modules/Bio/EnsEMBL/DBSQL/ProteinAlignFeatureAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/ProteinAlignFeatureAdaptor.pm @@ -1,11 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::DBSQL::ProteinAlignFeatureAdaptor -# -# Copyright Ewan Birney -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -21,13 +32,6 @@ Adaptor for ProteinAlignFeatures $pafa->store(@features); -=head1 DESCRIPTION - - -=head1 CONTACT - -Post questions to the Ensembl development list: ensembl-dev@ebia.ac.uk - =head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/DBSQL/ProteinFeatureAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/ProteinFeatureAdaptor.pm index 13e40fa9dbeea391837bed43bb20c60640a9037c..594be79e8d180d9af170b715caa6aacc2a8d50f4 100755 --- a/modules/Bio/EnsEMBL/DBSQL/ProteinFeatureAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/ProteinFeatureAdaptor.pm @@ -1,13 +1,22 @@ -# -# EnsEMBL module for Bio::EnsEMBL::DBSQL::ProteinFeatureAdaptor -# -# Cared for by Emmanuel Mongin <mongin@ebi.ac.uk> -# -# Copyright Emmanuel Mongin -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -18,25 +27,17 @@ Bio::EnsEMBL::DBSQL::ProteinFeatureAdaptor use Bio::EnsEMBL::Registry; Bio::EnsEMBL::Registry->load_registry_from_db( - -host => 'ensembldb.ensembl.org', - -user => 'anonymous' + -host => 'ensembldb.ensembl.org', + -user => 'anonymous' ); - $pfa = Bio::EnsEMBL::Registry->get_adaptor("human", "core", "proteinfeature"); + $pfa = Bio::EnsEMBL::Registry->get_adaptor( "human", "core", + "proteinfeature" ); - my @prot_feats = @{$pfa->fetch_all_by_translation_id(1231)}; + my @prot_feats = @{ $pfa->fetch_all_by_translation_id(1231) }; my $prot_feat = $pfa->fetch_by_dbID(523); - -=head1 DESCRIPTION - - -=head1 CONTACT - - Post questions to the EnsEMBl development mailing list : - ensembl-dev@ebi.ac.uk - =head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/DBSQL/ProxySNPAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/ProxySNPAdaptor.pm index 4565f86681822273047f0c5e46a9fe04debae071..fbfe2e51c7710211757e8e030a29dd75c68bed9a 100644 --- a/modules/Bio/EnsEMBL/DBSQL/ProxySNPAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/ProxySNPAdaptor.pm @@ -1,8 +1,22 @@ -# EnsEMBL Gene reading writing adaptor for mySQL -# -# Copyright EMBL-EBI 2002 -# -# +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -10,23 +24,20 @@ Bio::EnsEMBL::DBSQL::ProxySNPAdaptor =head1 SYNOPSIS -Designed as an abstraction over the database specific SNPAdaptors. This is -written right now to serve as a replacement for a core SNPadaptor which -doesn''t even exist yet and probably never will since SNPs are taken from -external databases. In the future some sort of DBRegistry may remove the -need for this class. - -=head1 CONTACT - - Post questions to the Ensembl development list <ensembl-dev@ebi.ac.uk> +Designed as an abstraction over the database specific SNPAdaptors. This +is written right now to serve as a replacement for a core SNPadaptor +which doesn''t even exist yet and probably never will since SNPs are +taken from external databases. In the future some sort of DBRegistry may +remove the need for this class. =head1 METHODS =cut +package Bio::EnsEMBL::DBSQL::ProxySNPAdaptor; + use strict; -package Bio::EnsEMBL::DBSQL::ProxySNPAdaptor; use Bio::EnsEMBL::DBSQL::BaseAdaptor; use Bio::EnsEMBL::Utils::Exception qw(throw); diff --git a/modules/Bio/EnsEMBL/DBSQL/RepeatConsensusAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/RepeatConsensusAdaptor.pm index f102e628aa50e94c586561b2d45a32b1d01b117d..04c18df502190a51cb2d340f2e58009b389309ef 100644 --- a/modules/Bio/EnsEMBL/DBSQL/RepeatConsensusAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/RepeatConsensusAdaptor.pm @@ -1,36 +1,40 @@ -# -# EnsEMBL module for Bio::EnsEMBL::DBSQL::RepeatFeatureAdaptor -# -# Copyright EMBL/EBI -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 NAME + This software is distributed under a modified Apache license. + For license details, please see -Bio::EnsEMBL::DBSQL::RepeatConsensusAdaptor + http://www.ensembl.org/info/about/code_licence.html -=head1 +=head1 CONTACT -$rca = $database_adaptor->get_RepeatConsensusAdaptor(); + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -$repeat_consensus = $rca->fetch_by_dbID(132); -$repeat_consensus = $rca->fetch_by_name_class('AluSx', 'SINE/Alu'); + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -$rca->store($rc1, $rc2, $rc3); +=cut -=head1 DESCRIPTION +=head1 NAME -This is an adaptor for the retrieval and storage of RepeatConsensus objects. +Bio::EnsEMBL::DBSQL::RepeatConsensusAdaptor -=head1 AUTHOR - James Gilbert +=head1 SYNOPSIS -Email jgrg@ebi.ac.uk + $rca = $database_adaptor->get_RepeatConsensusAdaptor(); -=head1 CONTACT + $repeat_consensus = $rca->fetch_by_dbID(132); + $repeat_consensus = $rca->fetch_by_name_class( 'AluSx', 'SINE/Alu' ); + + $rca->store( $rc1, $rc2, $rc3 ); + +=head1 DESCRIPTION -Post questions to the EnsEMBL developer list ensembl-dev@ebi.ac.uk +This is an adaptor for the retrieval and storage of RepeatConsensus +objects. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/DBSQL/RepeatFeatureAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/RepeatFeatureAdaptor.pm index 7c27ef2b6bdcec70938b3de067c1e890598a7d1a..9318615786ffa8d4d5d210b591544f362152f0fd 100644 --- a/modules/Bio/EnsEMBL/DBSQL/RepeatFeatureAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/RepeatFeatureAdaptor.pm @@ -1,11 +1,22 @@ -# -# EnsEMBL module for Bio::EnsEMBL::DBSQL::RepeatFeatureAdaptor -# -# Copyright EMBL/EBI -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT -# POD documentation - main docs before the code + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -13,23 +24,17 @@ Bio::EnsEMBL::DBSQL::RepeatFeatureAdaptor =head1 SYNOPSIS -$rfa = $database_adaptor->get_RepeatFeatureAdaptor(); + $rfa = $database_adaptor->get_RepeatFeatureAdaptor(); -my $repeat = $rfa->fetch_by_dbID(1234); -my @repeats = @{$rfa->fetch_all_by_Slice($slice)}; + my $repeat = $rfa->fetch_by_dbID(1234); + my @repeats = @{ $rfa->fetch_all_by_Slice($slice) }; =head1 DESCRIPTION -This is an adaptor for the retrieval and storage of RepeatFeature objects -from the database. Most of the implementation is in the +This is an adaptor for the retrieval and storage of RepeatFeature +objects from the database. Most of the implementation is in the superclass BaseFeatureAdaptor. -=head1 AUTHOR - James Gilbert - -=head1 CONTACT - -Post questions to the EnsEMBL developer list: ensembl-dev@ebi.ac.uk - =head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm index 5cae0f3fb4a9b2227c64f2eb304c502e135580b8..748846ae8135981b0e80f5ab5f97405a618cd3e2 100644 --- a/modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm @@ -1,11 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::DBSQL::SequenceAdaptor -# -# Cared for by Arne Stabenau <stabenau@ebi.ac.uk> -# -# Copyright Ensembl -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -22,11 +33,6 @@ Bio::EnsEMBL::DBSQL::SequenceAdaptor - produce sequence strings from locations An adaptor for the retrieval of DNA sequence from the EnsEMBL database -=head1 CONTACT - -Post questions/comments to the EnsEMBL development list: -ensembl-dev@ebi.ac.uk - =head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/DBSQL/SimpleFeatureAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/SimpleFeatureAdaptor.pm index 2908d1ec660954bf7f441805c06854f2066f49f2..948f24d81f6cad19a6dc0d072277c7c747853213 100644 --- a/modules/Bio/EnsEMBL/DBSQL/SimpleFeatureAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/SimpleFeatureAdaptor.pm @@ -1,12 +1,22 @@ -# -# EnsEMBL module for Bio::EnsEMBL::DBSQL::SimpleFeatureAdaptor -# -# -# Copyright EMBL/EBI -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -14,15 +24,16 @@ Bio::EnsEMBL::DBSQL::SimpleFeatureAdaptor =head1 SYNOPSIS -my $simple_feature_adaptor = $database_adaptor->get_SimpleFeatureAdaptor(); -@simple_features = @{$simple_feature_adaptor->fetch_all_by_Slice($slice)}; + my $simple_feature_adaptor = + $database_adaptor->get_SimpleFeatureAdaptor(); + + @simple_features = + @{ $simple_feature_adaptor->fetch_all_by_Slice($slice) }; =head1 DESCRIPTION Simple Feature Adaptor - database access for simple features -=head1 AUTHOR - Ewan Birney - =head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm index e3f1383c08a21e32365dea261e35b7442551dd98..9589bd22323f9c6165a89f4c2cda491ea7f2e4ca 100644 --- a/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm @@ -1,13 +1,22 @@ +=head1 LICENSE -# -# Ensembl module for Bio::EnsEMBL::DBSQL::SliceAdaptor -# -# -# Copyright (c) 2004 Ensembl -# -# You may distribute this module under the same terms as perl itself + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -# POD documentation - main docs before the code +=cut =head1 NAME @@ -20,70 +29,62 @@ the creation of Slice objects. use Bio::EnsEMBL::Registry; Bio::EnsEMBL::Registry->load_registry_from_db( - -host => 'ensembldb.ensembl.org', - -user => 'anonymous' + -host => 'ensembldb.ensembl.org', + -user => 'anonymous' ); - $slice_adaptor = Bio::EnsEMBL::Registry->get_adaptor("human", "core", "slice"); - - + $slice_adaptor = + Bio::EnsEMBL::Registry->get_adaptor( "human", "core", "slice" ); # get a slice on the entire chromosome X - $chr_slice = $slice_adaptor->fetch_by_region('chromosome','X'); + $chr_slice = $slice_adaptor->fetch_by_region( 'chromosome', 'X' ); # get a slice for each clone in the database - foreach $cln_slice (@{$slice_adaptor->fetch_all('clone')}) { - #do something with clone + foreach $cln_slice ( @{ $slice_adaptor->fetch_all('clone') } ) { + # do something with clone } # get a slice which is part of NT_004321 - $spctg_slice = $slice_adaptor->fetch_by_region('supercontig','NT_004321', - 200_000, 600_000); + $spctg_slice = + $slice_adaptor->fetch_by_region( 'supercontig', 'NT_004321', + 200_000, 600_000 ); - - # get all non-redundant slices from the highest possible coordinate systems + # get all non-redundant slices from the highest possible coordinate + # systems $slices = $slice_adaptor->fetch_all('toplevel'); # include non-reference regions - $slices = $slice_adaptor->fetch_all('toplevel',undef,1); + $slices = $slice_adaptor->fetch_all( 'toplevel', undef, 1 ); # include non-duplicate regions - $slices = $slice_adaptor->fetch_all('toplevel', undef, 0, 1); + $slices = $slice_adaptor->fetch_all( 'toplevel', undef, 0, 1 ); # split up a list of slices into smaller slices - $overlap = 1000; + $overlap = 1000; $max_length = 1e6; - $slices = split_Slices($slices, $max_length, $overlap); - + $slices = split_Slices( $slices, $max_length, $overlap ); # store a list of slice names in a file - open(FILE, ">$filename") or die("Could not open file $filename"); + open( FILE, ">$filename" ) or die("Could not open file $filename"); foreach my $slice (@$slices) { print FILE $slice->name(), "\n"; } close FILE; # retreive a list of slices from a file - open(FILE, $filename) or die("Could not open file $filename"); - while($name = <FILE>) { + open( FILE, $filename ) or die("Could not open file $filename"); + while ( $name = <FILE> ) { chomp($name); $slice = $slice_adaptor->fetch_by_name($name); - # do something with slice } =head1 DESCRIPTION -This module is responsible for fetching Slices representing genomic regions -from a database. A Details on how slices can be used are in the +This module is responsible for fetching Slices representing genomic +regions from a database. A Details on how slices can be used are in the Bio::EnsEMBL::Slice module. -=head1 CONTACT - -This module is part of the Ensembl project http://www.ensembl.org - -For more information email <ensembl-dev@ebi.ac.uk> - =head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/DBSQL/StatementHandle.pm b/modules/Bio/EnsEMBL/DBSQL/StatementHandle.pm index 4ab4c53624ce1d6543057080fc8989824f73aebf..948d248c972f11c9714c70579eded45a4b6696a0 100644 --- a/modules/Bio/EnsEMBL/DBSQL/StatementHandle.pm +++ b/modules/Bio/EnsEMBL/DBSQL/StatementHandle.pm @@ -1,22 +1,38 @@ -=head1 NAME - Bio::EnsEMBL::DBSQL::StatementHandle +=head1 LICENSE -=head1 SYNOPSIS - - Do not use this class directly. It will automatically be used by - the Bio::EnsEMBL::DBSQL::DBConnection class. + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 DESCRIPTION + This software is distributed under a modified Apache license. + For license details, please see - This class extends DBD::mysql::st so that the DESTROY method may be - overridden. If the DBConnection::disconnect_when_inactive flag is set - this statement handle will cause the database connection to be closed - when it goes out of scope and there are no other open statement handles. + http://www.ensembl.org/info/about/code_licence.html =head1 CONTACT - This module is part of the Ensembl project: www.ensembl.org + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut + +=head1 NAME + +Bio::EnsEMBL::DBSQL::StatementHandle + +=head1 SYNOPSIS + +Do not use this class directly. It will automatically be used by the +Bio::EnsEMBL::DBSQL::DBConnection class. + +=head1 DESCRIPTION - Ensembl development mailing list: <ensembl-dev@ebi.ac.uk> +This class extends DBD::mysql::st so that the DESTROY method may be +overridden. If the DBConnection::disconnect_when_inactive flag is set +this statement handle will cause the database connection to be closed +when it goes out of scope and there are no other open statement handles. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/DBSQL/SupportingFeatureAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/SupportingFeatureAdaptor.pm index 47e64a16140449e6c3674132a252e3321dc07c4a..87e83de93838b83670e301f65390d2adea54cf01 100644 --- a/modules/Bio/EnsEMBL/DBSQL/SupportingFeatureAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/SupportingFeatureAdaptor.pm @@ -1,9 +1,22 @@ -# EnsEMBL Adaptor for retrieving SupportingFeatures -# -# Author: Graham McVicker -# -# Date : 11-Oct-2002 -# +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -17,18 +30,14 @@ features from the database. my @supporting_feats = @{ $sfa->fetch_all_by_Exon($exon) }; -=head1 CONTACT - -Post questions to ensembl developer mailing list: -<ensembl-dev@ebi.ac.uk> +=head1 METHODS =cut +package Bio::EnsEMBL::DBSQL::SupportingFeatureAdaptor; use strict; -package Bio::EnsEMBL::DBSQL::SupportingFeatureAdaptor; - use Bio::EnsEMBL::DBSQL::BaseAdaptor; use Bio::EnsEMBL::Utils::Exception qw(throw warning); diff --git a/modules/Bio/EnsEMBL/DBSQL/TranscriptAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/TranscriptAdaptor.pm index 6ef69c624397f77b42f6deb4efd629f0b9c92495..6181b590b9ebca1290603e491f46e14b0fa58e1a 100644 --- a/modules/Bio/EnsEMBL/DBSQL/TranscriptAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/TranscriptAdaptor.pm @@ -33,9 +33,9 @@ Bio::EnsEMBL::Transcript objects from a database. See Bio::EnsEMBL::Transcript for details of the Transcript class. -=head1 LICENCE +=head1 LICENSE -This code is distributed under an Apache style licence. Please see +This code is distributed under an Apache style license. Please see http://www.ensembl.org/info/about/code_licence.html for details. =head1 AUTHOR diff --git a/modules/Bio/EnsEMBL/DBSQL/TranscriptSupportingFeatureAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/TranscriptSupportingFeatureAdaptor.pm index 986387f1c2455a7b578e0b346a5d3d3390c6cef6..31d76babe7b3d86f448d78e20ae5b30d616a60fd 100644 --- a/modules/Bio/EnsEMBL/DBSQL/TranscriptSupportingFeatureAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/TranscriptSupportingFeatureAdaptor.pm @@ -1,31 +1,43 @@ -# EnsEMBL Adaptor for retrieving SupportingFeatures -# -# Author: Graham McVicker -# -# Date : 11-Oct-2002 -# +=head1 LICENSE -=head1 NAME - -Bio::EnsEMBL::DBSQL::TranscriptSupportingFeatureAdaptor - Retrieves supporting features - from the database. + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 SYNOPSIS + This software is distributed under a modified Apache license. + For license details, please see -$supporting_feature_adaptor = $database_adaptor->get_TranscriptSupportingFeatureAdaptor; -@supporting_feats = @{$supporting_feat_adaptor->fetch_all_by_Transcript($transcript)}; + http://www.ensembl.org/info/about/code_licence.html =head1 CONTACT -Post questions to ensembl developer mailing list : <ensembl-dev@ebi.ac.uk> + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. =cut +=head1 NAME -use strict; +Bio::EnsEMBL::DBSQL::TranscriptSupportingFeatureAdaptor - Retrieves +supporting features from the database. + +=head1 SYNOPSIS + + $supporting_feature_adaptor = + $database_adaptor->get_TranscriptSupportingFeatureAdaptor; + + @supporting_feats = + @{ $supporting_feat_adaptor->fetch_all_by_Transcript($transcript) }; + +=head1 METHODS + +=cut package Bio::EnsEMBL::DBSQL::TranscriptSupportingFeatureAdaptor; +use strict; use Bio::EnsEMBL::DBSQL::BaseAdaptor; use Bio::EnsEMBL::Utils::Exception qw(throw warning); diff --git a/modules/Bio/EnsEMBL/DBSQL/TranslationAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/TranslationAdaptor.pm index 068422b3f9641c37c46d81a1127cab79cbe234da..6f99178e4404799a997518d3aaaa9c62d0471fd3 100644 --- a/modules/Bio/EnsEMBL/DBSQL/TranslationAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/TranslationAdaptor.pm @@ -1,11 +1,22 @@ -# EnsEMBL Translation reading writing adaptor for mySQL -# -# Copyright EMBL-EBI 2001 -# -# Author: Arne Stabenau -# -# Date : 21.07.2001 -# +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -14,38 +25,42 @@ Translation objects from a database. =head1 DESCRIPTION -This adaptor provides a means to retrieve and store Bio::EnsEMBL::Translation -objects from/in a database. +This adaptor provides a means to retrieve and store +Bio::EnsEMBL::Translation objects from/in a database. -Translation objects only truly make sense in the context of their transcripts -so the recommended means to retrieve Translations is by retrieving the -Transcript object first, and then fetching the Translation. +Translation objects only truly make sense in the context of their +transcripts so the recommended means to retrieve Translations is +by retrieving the Transcript object first, and then fetching the +Translation. =head1 SYNOPSIS use Bio::EnsEMBL::Registry; Bio::EnsEMBL::Registry->load_registry_from_db( - -host => 'ensembldb.ensembl.org', - -user => 'anonymous' + -host => 'ensembldb.ensembl.org', + -user => 'anonymous' ); - $transcript_adaptor = Bio::EnsEMBL::Registry->get_adaptor("human", "core", "transcript"); - $translation_adaptor = Bio::EnsEMBL::Registry->get_adaptor("human", "core", "translation"); + $transcript_adaptor = + Bio::EnsEMBL::Registry->get_adaptor( "human", "core", + "transcript" ); + $translation_adaptor = + Bio::EnsEMBL::Registry->get_adaptor( "human", "core", + "translation" ); my $transcript = $transcript_adaptor->fetch_by_dbID(131243); - my $translation = $translation_adaptor->fetch_by_Transcript($transcript); - - print "Translation Start Site: " . - $translation->start_Exon()->stable_id(), " ", $translation->start(); - print "Translation Stop: " . - $translation->end_Exon()->stable_id(), " ", $translation->end(); - - -=head1 CONTACT - - ensembl-dev@ebi.ac.uk + my $translation = + $translation_adaptor->fetch_by_Transcript($transcript); + + print("Translation Start Site: " + . $translation->start_Exon()->stable_id() . " " + . $translation->start() + . "\n" ); + print("Translation Stop: " + . $translation->end_Exon()->stable_id() . " " + . $translation->end() ); =head1 METHODS diff --git a/modules/Bio/EnsEMBL/DBSQL/UnconventionalTranscriptAssociationAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/UnconventionalTranscriptAssociationAdaptor.pm index f2ed230b8775ee44d80b03cfaf2251fcb0d0a835..99b200d4c8b1966fd9dfd483094de29286aa6ff2 100644 --- a/modules/Bio/EnsEMBL/DBSQL/UnconventionalTranscriptAssociationAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/UnconventionalTranscriptAssociationAdaptor.pm @@ -1,11 +1,22 @@ -# -# EnsEMBL module for Bio::EnsEMBL::DBSQL::UnconventionalTranscriptAssociationAdaptor -# -# Copyright EMBL/EBI -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -14,20 +25,15 @@ Bio::EnsEMBL::DBSQL::UnconventionalTranscriptAssociationAdaptor =head1 SYNOPSIS $utaa = $registry->get_adaptor( 'Human', 'Core', - 'UnconventionalTranscriptAssociation' ); + 'UnconventionalTranscriptAssociation' ); my $uta = $utaa->fetch_all_by_type('antisense'); =head1 DESCRIPTION -This is an adaptor for the retrieval and storage of UnconventionalTranscriptAssociation objects -from the database. Most of the implementation is in the superclass BaseFeatureAdaptor. - -=head1 AUTHOR - Glenn Proctor - -=head1 CONTACT - -Post questions to the EnsEMBL developer list: ensembl-dev@ebi.ac.uk +This is an adaptor for the retrieval and storage of +UnconventionalTranscriptAssociation objects from the database. Most of +the implementation is in the superclass BaseFeatureAdaptor. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/DBSQL/UnmappedObjectAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/UnmappedObjectAdaptor.pm index 096d2b99505eef2206f1e25bcab60fd904d8440c..0b1db1302f378b59cfcd87d398a2935b9e23e441 100644 --- a/modules/Bio/EnsEMBL/DBSQL/UnmappedObjectAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/UnmappedObjectAdaptor.pm @@ -1,11 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor -# -# Copyright EMBL/EBI -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -13,20 +24,15 @@ Bio::EnsEMBL::DBSQL::UnmappedObjectAdaptor =head1 SYNOPSIS -my $uoa = $database_adaptor->get_UnmappedObjectAdaptor(); + my $uoa = $database_adaptor->get_UnmappedObjectAdaptor(); + my $missed = @{ $uoa->fetch_all_by_type('xref') }; -my $missed = @{$uoa->fetch_all_by_type('xref'); - =head1 DESCRIPTION -Unmapped ObjectAdaptor - An adaptor responsible for the creation, editing, -retrieval of Unmapped Objects. These being the Objects that where not mapped -in a specific process i.e. xref, cDNA, Markers. - -=head1 CONTACT - -Post questions to the Ensembl developer list. +Unmapped ObjectAdaptor - An adaptor responsible for the creation, +editing, retrieval of Unmapped Objects. These being the Objects that +where not mapped in a specific process i.e. xref, cDNA, Markers. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/DensityFeature.pm b/modules/Bio/EnsEMBL/DensityFeature.pm index 962e89bbf406a2c5af73bf3c504e02af86c3e2f1..e90f22fd8cfefa799cda254a7c09efed5498883c 100644 --- a/modules/Bio/EnsEMBL/DensityFeature.pm +++ b/modules/Bio/EnsEMBL/DensityFeature.pm @@ -1,36 +1,47 @@ -# -# Ensembl module for Bio::EnsEMBL::DensityFeature -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME -Bio::EnsEMBL::DensityFeature - A feature representing a density, or precentage -coverage etc. in a given region. +Bio::EnsEMBL::DensityFeature - A feature representing a density, or +precentage coverage etc. in a given region. =head1 SYNOPSIS -use Bio::EnsEMBL::DensityFeature; + use Bio::EnsEMBL::DensityFeature; -$feature = Bio::EnsEMBL::DensityFeature->new(-seq_region => $region, - -start => 1, - -end => 1e6, - -density_type => $dt, - -density_value => 98.5) + $feature = Bio::EnsEMBL::DensityFeature->new( + -seq_region => $region, + -start => 1, + -end => 1e6, + -density_type => $dt, + -density_value => 98.5 + ); =head1 DESCRIPTION -A density feature represents a count, density, or percentage coverage, etc. for -a given region. +A density feature represents a count, density, or percentage coverage, +etc. for a given region. This module is part of the Ensembl project http://www.ensembl.org -=head1 CONTACT - -Post comments/questions to the ensembl development list: ensembl-dev@ebi.ac.uk - =head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/DensityFeatureSet.pm b/modules/Bio/EnsEMBL/DensityFeatureSet.pm index cb8b07e4495b3b698d33cf745f5fe4808704f756..1b7a932ddf471bfbb2141e1d456575f0c3db66df 100644 --- a/modules/Bio/EnsEMBL/DensityFeatureSet.pm +++ b/modules/Bio/EnsEMBL/DensityFeatureSet.pm @@ -1,9 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::DensityFeatureSet -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -12,35 +25,31 @@ A feature representing a set of density features =head1 SYNOPSIS -use Bio::EnsEMBL::DensityFeatureSet; + use Bio::EnsEMBL::DensityFeatureSet; -my $densitySet = Bio::EnsEMBL::DensityFeatureSet->new - ( -bin_array = \@out, - -stretch = 1, - ); + my $densitySet = Bio::EnsEMBL::DensityFeatureSet->new( + -bin_array = \@out, + -stretch = 1, + ); =head1 DESCRIPTION -A density feature set is a wrap around a array of density features -with additional information about the collective density feature set, -such as max_min_values and scale factors etc. a given region. +A density feature set is a wrap around a array of density features with +additional information about the collective density feature set, such as +max_min_values and scale factors etc. a given region. This module is part of the Ensembl project http://www.ensembl.org -=head1 CONTACT - -Post comments/questions to the ensembl development list: ensembl-dev@ebi.ac.uk - =head1 METHODS =cut +package Bio::EnsEMBL::DensityFeatureSet; + use strict; use warnings; -package Bio::EnsEMBL::DensityFeatureSet; - use Bio::EnsEMBL::Utils::Argument qw(rearrange); use Bio::EnsEMBL::Utils::Exception qw(throw); use Data::Dumper; diff --git a/modules/Bio/EnsEMBL/DensityPlot/BinValue.pm b/modules/Bio/EnsEMBL/DensityPlot/BinValue.pm index 20d5791f14d9cc5ebb41e4a8dd1ef5b11016171f..049ae1351100cee7043283830a61d4a0ef5d005f 100644 --- a/modules/Bio/EnsEMBL/DensityPlot/BinValue.pm +++ b/modules/Bio/EnsEMBL/DensityPlot/BinValue.pm @@ -1,40 +1,36 @@ +=head1 LICENSE -# -# BioPerl module for BinValue -# -# Cared for by Emmanuel Mongin <mongin@ebi.ac.uk> -# -# Copyright Emmanuel Mongin -# -# You may distribute this module under the same terms as perl itself + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -# POD documentation - main docs before the code + This software is distributed under a modified Apache license. + For license details, please see -=head1 NAME - -BinValue - -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html -Give standard usage here +=head1 CONTACT -=head1 DESCRIPTION + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -This object deals with the raw data to built the density plots + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 CONTACT +=cut -Describe contact details here +=head1 NAME -=head1 APPENDIX +Bio::EnsEMBL::DensityPlot::BinValue -The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ +=head1 SYNOPSIS -=cut +=head1 DESCRIPTION +This object deals with the raw data to built the density plots -# Let the code begin... +=head1 METHODS +=cut package Bio::EnsEMBL::DensityPlot::BinValue; use vars qw($AUTOLOAD @ISA); diff --git a/modules/Bio/EnsEMBL/DensityPlot/BinValueSet.pm b/modules/Bio/EnsEMBL/DensityPlot/BinValueSet.pm index 53905a0a85eeea322b8d28675a9cd1cdc5dd874d..f614e2af6a45aa4a8433af9426180152b92719d0 100644 --- a/modules/Bio/EnsEMBL/DensityPlot/BinValueSet.pm +++ b/modules/Bio/EnsEMBL/DensityPlot/BinValueSet.pm @@ -1,40 +1,35 @@ +=head1 LICENSE -# -# BioPerl module for BinValueSet -# -# Cared for by Emmanuel Mongin <mongin@ebi.ac.uk> -# -# Copyright Emmanuel Mongin -# -# You may distribute this module under the same terms as perl itself + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -# POD documentation - main docs before the code + This software is distributed under a modified Apache license. + For license details, please see -=head1 NAME - -BinValueSet - DESCRIPTION of Object - -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html -Give standard usage here +=head1 CONTACT -=head1 DESCRIPTION + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -Describe the object here + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 CONTACT +=cut -Describe contact details here -=head1 APPENDIX +=head1 NAME -The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ +Bio::EnsEMBL::DensityPlot::BinValueSet -=cut +=head1 SYNOPSIS +=head1 DESCRIPTION -# Let the code begin... +=head1 METHODS +=cut package Bio::EnsEMBL::DensityPlot::BinValueSet; diff --git a/modules/Bio/EnsEMBL/DensityType.pm b/modules/Bio/EnsEMBL/DensityType.pm index 4fffb1f881c370788d8516b55fd26dff70d69556..f01055f5c279039b40fc011697687550964a63bf 100644 --- a/modules/Bio/EnsEMBL/DensityType.pm +++ b/modules/Bio/EnsEMBL/DensityType.pm @@ -1,9 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::DensityType -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -12,23 +25,18 @@ coverage etc. in a given region. =head1 SYNOPSIS -use Bio::EnsEMBL::DensityType; + use Bio::EnsEMBL::DensityType; -$type = Bio::EnsEMBL::DensityType->new(-analysis => $analysis, - -blocksize => 1000000, - -value_type => $type); + $type = Bio::EnsEMBL::DensityType->new( + -analysis => $analysis, + -blocksize => 1000000, + -value_type => $type + ); =head1 DESCRIPTION -A density type represents a density, or percentage -coverage etc. in a given region. - - -This module is part of the Ensembl project http://www.ensembl.org - -=head1 CONTACT - -Post comments/questions to the ensembl development list: ensembl-dev@ebi.ac.uk +A density type represents a density, or percentage coverage etc. in a +given region. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/DnaDnaAlignFeature.pm b/modules/Bio/EnsEMBL/DnaDnaAlignFeature.pm index 3c8a6be295c4e222b183e42f1cf9079a065bffad..7859b8cc29faca92f865c51a666dc8808939e9b9 100644 --- a/modules/Bio/EnsEMBL/DnaDnaAlignFeature.pm +++ b/modules/Bio/EnsEMBL/DnaDnaAlignFeature.pm @@ -1,11 +1,22 @@ -package Bio::EnsEMBL::DnaDnaAlignFeature; +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -# EnsEMBL module for storing dna-dna pairwise alignments -# -# Cared for by Michele Clamp <michele@sanger.ac.uk> -# -# You may distribute this module under the same terms as perl itself -# +=cut =head1 NAME @@ -18,11 +29,13 @@ package Bio::EnsEMBL::DnaDnaAlignFeature; =cut -use Bio::EnsEMBL::BaseAlignFeature; +package Bio::EnsEMBL::DnaDnaAlignFeature; +use strict; + +use Bio::EnsEMBL::BaseAlignFeature; use vars qw(@ISA); -use strict; use Bio::SimpleAlign; use Bio::LocatableSeq; use Bio::EnsEMBL::Utils::Argument qw(rearrange); diff --git a/modules/Bio/EnsEMBL/DnaPepAlignFeature.pm b/modules/Bio/EnsEMBL/DnaPepAlignFeature.pm index 3952b5ae35a7fdba5328cfa19541bf0aac7bee3d..8443b6cb9429a58a60d696a8049e6d54d6b1f190 100644 --- a/modules/Bio/EnsEMBL/DnaPepAlignFeature.pm +++ b/modules/Bio/EnsEMBL/DnaPepAlignFeature.pm @@ -1,11 +1,22 @@ -package Bio::EnsEMBL::DnaPepAlignFeature; +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html -# EnsEMBL module for storing dna-dna pairwise alignments -# -# Cared for by Michele Clamp <michele@sanger.ac.uk> -# -# You may distribute this module under the same terms as perl itself -# +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -18,10 +29,13 @@ package Bio::EnsEMBL::DnaPepAlignFeature; =cut +package Bio::EnsEMBL::DnaPepAlignFeature; + +use strict; + use Bio::EnsEMBL::BaseAlignFeature; use vars qw(@ISA); -use strict; @ISA = qw( Bio::EnsEMBL::BaseAlignFeature ); diff --git a/modules/Bio/EnsEMBL/Exon.pm b/modules/Bio/EnsEMBL/Exon.pm index 8034877cb910b71f5c04608679cf9358a5ea68e4..68ffe9be2900b882df6df053a03e71088f7ef7b3 100755 --- a/modules/Bio/EnsEMBL/Exon.pm +++ b/modules/Bio/EnsEMBL/Exon.pm @@ -1,55 +1,62 @@ -package Bio::EnsEMBL::Exon; +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -# -# EnsEMBL module for Bio::EnsEMBL::Exon -# -# -# Copyright Ewan Birney -# -# You may distribute this module under the same terms as perl itself + This software is distributed under a modified Apache license. + For license details, please see -# POD documentation - main docs before the code + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT -=pod + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut -=head1 NAME Bio::EnsEMBL::Exon - A class representing an Exon +=head1 NAME + +Bio::EnsEMBL::Exon - A class representing an Exon =head1 SYNOPSIS - $ex = new Bio::EnsEMBL::Exon(-START => 100, - -END => 200, - -STRAND => 1, - -SLICE => $slice, - -DBID => $dbID, - -ANALYSIS => $analysis, - -STABLE_ID => 'ENSE000000123', - -VERSION => 2 - ); + $ex = new Bio::EnsEMBL::Exon( + -START => 100, + -END => 200, + -STRAND => 1, + -SLICE => $slice, + -DBID => $dbID, + -ANALYSIS => $analysis, + -STABLE_ID => 'ENSE000000123', + -VERSION => 2 + ); - #seq returns a Bio::Seq - my $seq = $exon->seq->seq(); + # seq() returns a Bio::Seq + my $seq = $exon->seq->seq(); - #peptide only makes sense within transcript context - my $pep = $exon->peptide($transcript)->seq(); + # Peptide only makes sense within transcript context + my $pep = $exon->peptide($transcript)->seq(); - #normal feature operations can be performed: - $exon = $exon->transform('clone'); - $exon->move($new_start, $new_end, $new_strand); - print $exon->slice->seq_region_name(); + # Normal feature operations can be performed: + $exon = $exon->transform('clone'); + $exon->move( $new_start, $new_end, $new_strand ); + print $exon->slice->seq_region_name(); =head1 DESCRIPTION This is a class which represents an exon which is part of a transcript. See Bio::EnsEMBL:Transcript -=head1 CONTACT - -Post questions to the EnsEMBL developer list: <ensembl-dev@ebi.ac.uk> - =head1 METHODS =cut +package Bio::EnsEMBL::Exon; + use strict; use Bio::EnsEMBL::Feature; diff --git a/modules/Bio/EnsEMBL/External/BlastAdaptor.pm b/modules/Bio/EnsEMBL/External/BlastAdaptor.pm index 9dfd9574cc53dbca14a149adcb5b77d17c247da7..5132ab56f88387f309e8a10bcc9ced7e75d62f73 100644 --- a/modules/Bio/EnsEMBL/External/BlastAdaptor.pm +++ b/modules/Bio/EnsEMBL/External/BlastAdaptor.pm @@ -1,4 +1,23 @@ -# Let the code begin... +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut + package Bio::EnsEMBL::External::BlastAdaptor; use strict; diff --git a/modules/Bio/EnsEMBL/External/ExternalFeatureAdaptor.pm b/modules/Bio/EnsEMBL/External/ExternalFeatureAdaptor.pm index c42611108be0f5fe3faee0dcf00ad11adb886a9a..e0eabc5bd254eff396f6c5dd2b4eb6be6f70be79 100644 --- a/modules/Bio/EnsEMBL/External/ExternalFeatureAdaptor.pm +++ b/modules/Bio/EnsEMBL/External/ExternalFeatureAdaptor.pm @@ -1,9 +1,22 @@ -# -# EnsEMBL module for Bio::EnsEMBL::External::ExternalFeatureAdaptor -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -11,63 +24,69 @@ Bio::EnsEMBL::External::ExternalFeatureAdaptor =head 1 SUMMARY -Allows features created externally from Ensembl in a single coordinate system -to be retrieved in several other (Ensembl-style) coordinate systems. This is -intended to be a replacement for the old +Allows features created externally from Ensembl in a single +coordinate system to be retrieved in several other (Ensembl-style) +coordinate systems. This is intended to be a replacement for the old Bio::EnsEMBL::DB::ExternalFeatureFactoryI interface. =head1 SYNOPSIS - $database_adaptor = - new Bio::EnsEMBL::DBSQL::DBAdaptor( -host => 'kaka.sanger.ac.uk', - -dbname => 'homo_sapiens_core_9_30', - -pass => 'anonymous' ); + $database_adaptor = new Bio::EnsEMBL::DBSQL::DBAdaptor( + -host => 'kaka.sanger.ac.uk', + -dbname => 'homo_sapiens_core_9_30', + -pass => 'anonymous' + ); $xf_adaptor = new ExternalFeatureAdaptorSubClass; - #Connect the Ensembl core database: + # Connect the Ensembl core database: $xf_adaptor->db($database_adaptor); - #get some features in vontig coords - @feats = @{$xf_adaptor->fetch_all_by_contig_name('AC000087.2.1.42071')}; + # get some features in vontig coords + @feats = + @{ $xf_adaptor->fetch_all_by_contig_name('AC000087.2.1.42071') }; - #get some features in assembly coords - @feats = @{$xf_adaptor->fetch_all_by_chr_start_end('X', 100000, 200000)}; + # get some features in assembly coords + @feats = + @{ $xf_adaptor->fetch_all_by_chr_start_end( 'X', 100000, 200000 ) }; - #get some features in clone coords - @feats = @{$xf_adaptor->fetch_all_by_clone_accession('AC000087')}; + # get some features in clone coords + @feats = @{ $xf_adaptor->fetch_all_by_clone_accession('AC000087') }; - #Add the adaptor to the ensembl core dbadaptor (implicitly sets db attribute) + # Add the adaptor to the ensembl core dbadaptor (implicitly sets db + # attribute) $database_adaptor->add_ExternalFeatureAdaptor($xf_adaptor); - #get some features in Slice coords + # get some features in Slice coords $slice_adaptor = $database_adaptor->get_SliceAdaptor; - $slice = $slice_adaptor->fetch_all_by_chr_start_end(1,100000,200000); - @feats = @{$xf_adaptor->fetch_all_by_Slice($slice)}; + $slice = + $slice_adaptor->fetch_all_by_chr_start_end( 1, 100000, 200000 ); + @feats = @{ $xf_adaptor->fetch_all_by_Slice($slice) }; - #now features can be retrieved directly from Slice - @feats = @{$slice->get_all_ExternalFeatures}; - + # now features can be retrieved directly from Slice + @feats = @{ $slice->get_all_ExternalFeatures }; =head1 DESCRIPTION -This class is intended to be used as a method of getting external features into -EnsEMBL. To work, this class must be extended and must implement the -the coordinate_systems method. As well, the subclass is required to implement -a single fetch method so that the external features may be retrieved. -By implementing a single fetch_method in a single coordinate system all -of the other ExternalFeatureAdaptor fetch methods become available for -retrieving the data in several different coordinate systems. - -The coordinate_systems method should return a list of strings indicating which -coordinate system(s) have been implemented. If a given string is returned -from the coordinate_systems method then the corresponding fetch method must be -implemented. The reverse is also true: if a fetch method is implemented then -coordinate_systems must return the appropriate string in its list of return -values. The following are the valid coordinate system values and the -corresponding fetch methods that must be implemented: - - COORD SYSTEM STRING FETCH_METHOD +This class is intended to be used as a method of getting external +features into EnsEMBL. To work, this class must be extended and must +implement the the coordinate_systems method. As well, the subclass +is required to implement a single fetch method so that the external +features may be retrieved. By implementing a single fetch_method in a +single coordinate system all of the other ExternalFeatureAdaptor fetch +methods become available for retrieving the data in several different +coordinate systems. + +The coordinate_systems method should return a list of strings indicating +which coordinate system(s) have been implemented. If a given string is +returned from the coordinate_systems method then the corresponding fetch +method must be implemented. The reverse is also true: if a fetch method +is implemented then coordinate_systems must return the appropriate +string in its list of return values. The following are the valid +coordinate system values and the corresponding fetch methods that must +be implemented: + + COORD SYSTEM STRING FETCH_METHOD ------------------- ------------ 'ASSEMBLY' fetch_all_by_chr_start_end 'CLONE' fetch_all_by_clone_accession @@ -75,37 +94,26 @@ corresponding fetch methods that must be implemented: 'SUPERCONTIG' fetch_all_by_supercontig_name 'SLICE' fetch_all_by_Slice -The objects returned by the fetch methods should be EnsEMBL or BioPerl style -Feature objects. These objects MUST have start, end and strand methods. - -Before the non-overridden ExternalFeatureAdaptor fetch methods may be called -an EnsEMBL core database adaptor must be attached to the ExternalFeatureAdaptor -. This database adaptor is required to perform the remappings between various -coordinate system. This may be done implicitly by adding the -ExternalFeatureAdaptor to the database adaptor through a call to the -DBAdaptor add_ExternalFeatureAdaptor method or explicitly by calling the -ExternalFeatureAdaptor ensembl_db method. +The objects returned by the fetch methods should be EnsEMBL or BioPerl +style Feature objects. These objects MUST have start, end and strand +methods. +Before the non-overridden ExternalFeatureAdaptor fetch methods may +be called an EnsEMBL core database adaptor must be attached to the +ExternalFeatureAdaptor . This database adaptor is required to perform +the remappings between various coordinate system. This may be done +implicitly by adding the ExternalFeatureAdaptor to the database adaptor +through a call to the DBAdaptor add_ExternalFeatureAdaptor method or +explicitly by calling the ExternalFeatureAdaptor ensembl_db method. -=head1 CONTACT - -Post questions to the EnsEMBL developer list: <ensembl-dev@ebi.ac.uk> - -=head1 AUTHOR - -Graham McVicker - -=head1 APPENDIX - -The rest of the documentation details each of the object methods. -Internal methods are usually preceded with a _ +=head1 METHODS =cut -use strict; - package Bio::EnsEMBL::External::ExternalFeatureAdaptor; +use strict; + use Bio::EnsEMBL::Utils::Exception qw(warning throw); diff --git a/modules/Bio/EnsEMBL/Feature.pm b/modules/Bio/EnsEMBL/Feature.pm index c3c12818222ec34e532cd4f99b561d0505d5da99..e04c1baa0fdaacfe6ab60bb347e4ddca8ac8e982 100644 --- a/modules/Bio/EnsEMBL/Feature.pm +++ b/modules/Bio/EnsEMBL/Feature.pm @@ -1,8 +1,22 @@ -# Ensembl module for Bio::EnsEMBL::Feature -# -# Copyright (c) 2003 Ensembl -# +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -10,50 +24,48 @@ Bio::EnsEMBL::Feature - Ensembl specific sequence feature. =head1 SYNOPSIS - my $feat = new Bio::EnsEMBL::Feature(-start => 100, - -end => 220, - -strand => -1, - -slice => $slice - -analysis => $analysis - ); + my $feat = new Bio::EnsEMBL::Feature( + -start => 100, + -end => 220, + -strand => -1, + -slice => $slice -analysis => $analysis + ); - my $start = $feat->start; - my $end = $feat->end; - my $strand = $feat->strand; + my $start = $feat->start(); + my $end = $feat->end(); + my $strand = $feat->strand(); - #move the feature to the chromosomal coordinate system + # Move the feature to the chromosomal coordinate system $feature = $feature->transform('chromosome'); - #move the feature to a different slice (possibly on another coord system) + # Move the feature to a different slice (possibly on another coord + # system) $feature = $feature->transfer($new_slice); - #project the feature onto another coordinate system possibly across - #boundaries: - @projection = @{$feature->project('contig')}; + # Project the feature onto another coordinate system possibly across + # boundaries: + @projection = @{ $feature->project('contig') }; - #change the start, end, and strand of the feature in place - $feature->move($new_start, $new_end, $new_strand); + # Change the start, end, and strand of the feature in place + $feature->move( $new_start, $new_end, $new_strand ); =head1 DESCRIPTION -This is the Base feature class from which all Ensembl features inherit. It -provides a bare minimum functionality that all features require. It basically -describes a location on a sequence in an arbitrary coordinate system. - -=head1 CONTACT - -Post questions to the Ensembl development list: ensembl-dev@ebi.ac.uk +This is the Base feature class from which all Ensembl features inherit. +It provides a bare minimum functionality that all features require. It +basically describes a location on a sequence in an arbitrary coordinate +system. =head1 METHODS =cut +package Bio::EnsEMBL::Feature; + use strict; use warnings; -package Bio::EnsEMBL::Feature; - use Bio::EnsEMBL::Storable; use Bio::EnsEMBL::Utils::Argument qw(rearrange); use Bio::EnsEMBL::Utils::Exception qw(throw deprecate warning); diff --git a/modules/Bio/EnsEMBL/FeaturePair.pm b/modules/Bio/EnsEMBL/FeaturePair.pm index 8a693f86a27e26bd253cda1eb21310ce438e5999..d39e04aefa4b72c375eaeecde857d24f62e03901 100755 --- a/modules/Bio/EnsEMBL/FeaturePair.pm +++ b/modules/Bio/EnsEMBL/FeaturePair.pm @@ -1,11 +1,22 @@ -# -# BioPerl module for Bio::EnsEMBL::FeaturePair -# -# Cared for by Ewan Birney <birney@sanger.ac.uk> -# -# Copyright Ewan Birney -# -# You may distribute this module under the same terms as perl +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -14,17 +25,19 @@ themselves hits to other sequence features. =head1 SYNOPSIS - my $feat = Bio::EnsEMBL::FeaturePair->new(-start => 132_231, - -end => 132_321, - -strand => -1, - -slice => $slice, - -hstart => 10, - -hend => 100, - -hstrand => 1, - -score => 100, - -percent_id => 92.0, - -hseqname => 'ALUSX10.1', - -analysis => $analysis); + my $feat = Bio::EnsEMBL::FeaturePair->new( + -start => 132_231, + -end => 132_321, + -strand => -1, + -slice => $slice, + -hstart => 10, + -hend => 100, + -hstrand => 1, + -score => 100, + -percent_id => 92.0, + -hseqname => 'ALUSX10.1', + -analysis => $analysis + ); my $hit_start = $feat->hstart(); my $hit_end = $feat->hend(); @@ -33,32 +46,29 @@ themselves hits to other sequence features. =head1 DESCRIPTION -A sequence feature object where the feature is itself a feature on another -sequence - e.g. a blast hit where residues 1-40 of a protein sequence -SW:HBA_HUMAN has hit to bases 100 - 220 on a genomic sequence HS120G22. -The genomic sequence coordinates are represented by the start, end, strand -attributes while the protein (hit) coordinates are represented by the hstart, -hend, hstrand attributes. - - $clone = $slice_adpator->fetch_by_region('clone', 'HS120G22'); - - $fp = Bio::EnsEMBL::FeaturePair(-start => 100, - -end => 220, - -strand => 1, - -slice => $clone, - -hstart => 1, - -hend => 40, - -hstrand => 1, - -percent_id => 92.0, - -score => 100, - -hseqname => 'SW:HBA_HUMAN', - -species => 'Homo sapiens', - -hspecies => 'Homo sapiens'); - - -=head1 CONTACT - -Post comments/questions to the EnsEMBL developer list: ensembl-dev@ebi.ac.uk +A sequence feature object where the feature is itself a feature on +another sequence - e.g. a blast hit where residues 1-40 of a protein +sequence SW:HBA_HUMAN has hit to bases 100 - 220 on a genomic sequence +HS120G22. The genomic sequence coordinates are represented by the +start, end, strand attributes while the protein (hit) coordinates are +represented by the hstart, hend, hstrand attributes. + + $clone = $slice_adpator->fetch_by_region( 'clone', 'HS120G22' ); + + $fp = Bio::EnsEMBL::FeaturePair( + -start => 100, + -end => 220, + -strand => 1, + -slice => $clone, + -hstart => 1, + -hend => 40, + -hstrand => 1, + -percent_id => 92.0, + -score => 100, + -hseqname => 'SW:HBA_HUMAN', + -species => 'Homo sapiens', + -hspecies => 'Homo sapiens' + ); =head1 METHODS diff --git a/modules/Bio/EnsEMBL/Gene.pm b/modules/Bio/EnsEMBL/Gene.pm index 3cada903dbf37e654292c290f42a353f4b6bc63a..bcbb0b7df3e80518f2fb137911cacd58c3a255b5 100755 --- a/modules/Bio/EnsEMBL/Gene.pm +++ b/modules/Bio/EnsEMBL/Gene.pm @@ -1,4 +1,22 @@ -package Bio::EnsEMBL::Gene; +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -7,15 +25,16 @@ Bio::EnsEMBL::Gene - Object representing a genes =head1 SYNOPSIS my $gene = Bio::EnsEMBL::Gene->new( - -START => 123, - -END => 1045, - -STRAND => 1, - -SLICE => $slice + -START => 123, + -END => 1045, + -STRAND => 1, + -SLICE => $slice ); # print gene information - print "gene start:end:strand is " . join(":", map { $gene->$_ } - qw(start end strand)) . "\n"; + print("gene start:end:strand is " + . join( ":", map { $gene->$_ } qw(start end strand) ) + . "\n" ); # set some additional attributes $gene->stable_id('ENSG000001'); @@ -26,22 +45,12 @@ Bio::EnsEMBL::Gene - Object representing a genes A representation of a Gene within the Ensembl system. A gene is a set of one or more alternative transcripts. -=head1 LICENCE - -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. - -=head1 AUTHOR - -Ensembl core API team - -=head1 CONTACT - -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> +=head1 METHODS =cut +package Bio::EnsEMBL::Gene; + use strict; use POSIX; diff --git a/modules/Bio/EnsEMBL/GoXref.pm b/modules/Bio/EnsEMBL/GoXref.pm index 7bff9ca9dec769b377b7f84bb399fb5658f8d435..88281868f06cf20859b1c75a86541ac042a945e4 100644 --- a/modules/Bio/EnsEMBL/GoXref.pm +++ b/modules/Bio/EnsEMBL/GoXref.pm @@ -1,8 +1,22 @@ -# Copyright EnsEMBL 2000-2003 -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -41,10 +55,6 @@ identifier but with different evidence tags. For this reason a single print "$evtag\n"; } -=head1 CONTACT - -Post questions to the Ensembl development list: <ensembl-dev@ebi.ac.uk> - =head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/IdMapping/Archiver.pm b/modules/Bio/EnsEMBL/IdMapping/Archiver.pm index 0cb6cc79ddaddcf1a90fd3c3d715922621a3467a..a90e3b2ac013f9e62406d83c5316a4a01cf817fa 100644 --- a/modules/Bio/EnsEMBL/IdMapping/Archiver.pm +++ b/modules/Bio/EnsEMBL/IdMapping/Archiver.pm @@ -1,60 +1,68 @@ -package Bio::EnsEMBL::IdMapping::Archiver; +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::IdMapping::Archiver - create gene_archive and peptide_archive + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html -my $archiver = Bio::EnsEMBL::IdMapping::Archiver->new( - -LOGGER => $logger, - -CONF => $conf, - -CACHE => $cache -); +=head1 CONTACT -# create gene and peptide archive -$archiver->create_archive($mapping_session_id); + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -# dump existing archive tables to file -my $num_entries = $archiver->dump_table_to_file('source', 'gene_archive', - 'gene_archive_existing.txt', 1); + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 DESCRIPTION +=cut + +=head1 NAME -This module creates the gene_archive and peptide_archive tables. Data is written -to a file as tab-delimited text for loading into a MySQL database (this can be -done manually, or using StableIdmapper->upload_file_into_table()). +Bio::EnsEMBL::IdMapping::Archiver - create gene_archive and peptide_archive -An archive entry for a given source gene is created if no target gene exists, or -if any of its transcripts or their translations changed. Non-coding transcripts -only have an entry in gene_archive (i.e. without a corresponding peptide_archive -entry). +=head1 SYNOPSIS -=head1 METHODS + my $archiver = Bio::EnsEMBL::IdMapping::Archiver->new( + -LOGGER => $logger, + -CONF => $conf, + -CACHE => $cache + ); -create_archive -dump_gene -dump_tuple -dump_nc_row -mapping_session_id + # create gene and peptide archive + $archiver->create_archive($mapping_session_id); -=head1 LICENCE + # dump existing archive tables to file + my $num_entries = + $archiver->dump_table_to_file( 'source', 'gene_archive', + 'gene_archive_existing.txt', 1 ); -This code is distributed under an Apache style licence. Please see -http:#www.ensembl.org/info/about/code_licence.html for details. +=head1 DESCRIPTION -=head1 AUTHOR +This module creates the gene_archive and peptide_archive +tables. Data is written to a file as tab-delimited text for +loading into a MySQL database (this can be done manually, or using +StableIdmapper->upload_file_into_table()). -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team +An archive entry for a given source gene is created if no target +gene exists, or if any of its transcripts or their translations +changed. Non-coding transcripts only have an entry in gene_archive (i.e. +without a corresponding peptide_archive entry). -=head1 CONTACT +=head1 METHODS -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> + create_archive + dump_gene + dump_tuple + dump_nc_row + mapping_session_id =cut +package Bio::EnsEMBL::IdMapping::Archiver; + use strict; use warnings; no warnings 'uninitialized'; diff --git a/modules/Bio/EnsEMBL/IdMapping/BaseObject.pm b/modules/Bio/EnsEMBL/IdMapping/BaseObject.pm index 57acb7b3e4d9deee9c2d8be73102fedfbaf7c8bb..a6161a74e6819db34b9f057b527d05006a4e8c1a 100644 --- a/modules/Bio/EnsEMBL/IdMapping/BaseObject.pm +++ b/modules/Bio/EnsEMBL/IdMapping/BaseObject.pm @@ -1,4 +1,22 @@ -package Bio::EnsEMBL::IdMapping::BaseObject; +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -6,48 +24,36 @@ Bio::EnsEMBL::IdMapping::BaseObject - base object for IdMapping objects =head1 SYNOPSIS -# this object isn't instantiated directly but rather extended -use Bio::EnsEMBL::IdMapping::BaseObject; -our @ISA = qw(Bio::EnsEMBL::IdMapping::BaseObject); + # this object isn't instantiated directly but rather extended + use Bio::EnsEMBL::IdMapping::BaseObject; + our @ISA = qw(Bio::EnsEMBL::IdMapping::BaseObject); =head1 DESCRIPTION This is the base object for some of the objects used in the IdMapping -application. An object that extends BaseObject will have a ConfParser, Logger -and Cache object. BaseObject also implements some useful utility functions -related to file and db access. +application. An object that extends BaseObject will have a ConfParser, +Logger and Cache object. BaseObject also implements some useful utility +functions related to file and db access. This isn't very clean OO design but it's efficient and easy to use... =head1 METHODS -new -get_filehandle -file_exists -fetch_value_from_db -dump_table_to_file -upload_file_into_table -logger -conf -cache - -=head1 LICENCE - -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. - -=head1 AUTHOR - -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team - -=head1 CONTACT - -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> + new + get_filehandle + file_exists + fetch_value_from_db + dump_table_to_file + upload_file_into_table + logger + conf + cache =cut +package Bio::EnsEMBL::IdMapping::BaseObject; + use strict; use warnings; no warnings 'uninitialized'; diff --git a/modules/Bio/EnsEMBL/IdMapping/Cache.pm b/modules/Bio/EnsEMBL/IdMapping/Cache.pm index 6ff8fc5e861034a0718563417d66d0d5f3f5b758..6aa62ce4beb1ef53123345fc8944f8bd773c30f7 100644 --- a/modules/Bio/EnsEMBL/IdMapping/Cache.pm +++ b/modules/Bio/EnsEMBL/IdMapping/Cache.pm @@ -1,36 +1,39 @@ -package Bio::EnsEMBL::IdMapping::Cache; - -=head1 NAME - -Bio::EnsEMBL::IdMapping::Cache - a cache to hold data objects used by the -IdMapping application +=head1 LICENSE -=head1 SYNOPSIS + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + This software is distributed under a modified Apache license. + For license details, please see -=head1 DESCRIPTION + http://www.ensembl.org/info/about/code_licence.html +=head1 CONTACT -=head1 METHODS + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 LICENCE +=cut -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. +=head1 NAME -=head1 AUTHOR +Bio::EnsEMBL::IdMapping::Cache - a cache to hold data objects used by the +IdMapping application -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team +=head1 SYNOPSIS -=head1 CONTACT +=head1 DESCRIPTION -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> +=head1 METHODS =cut +package Bio::EnsEMBL::IdMapping::Cache; + use strict; use warnings; no warnings 'uninitialized'; diff --git a/modules/Bio/EnsEMBL/IdMapping/Entry.pm b/modules/Bio/EnsEMBL/IdMapping/Entry.pm index a78be390f699efce13132fb065bc3080b8649a40..d8d7d77d5f0c232fd584e253c85bdb1ff3c7b0b1 100644 --- a/modules/Bio/EnsEMBL/IdMapping/Entry.pm +++ b/modules/Bio/EnsEMBL/IdMapping/Entry.pm @@ -1,42 +1,48 @@ -package Bio::EnsEMBL::IdMapping::Entry; +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::IdMapping::Entry - object representing a ScoredMappingMatrix entry + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html +=head1 CONTACT -=head1 DESCRIPTION + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -This object represents a ScoredMappingMatrix entry. It is defined by a pair of a -source and target object's internal Id and a score for this mapping. + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 METHODS +=cut -new -new_fast -source -target -score -to_string +=head1 NAME -=head1 LICENCE +Bio::EnsEMBL::IdMapping::Entry - object representing a ScoredMappingMatrix entry -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. +=head1 SYNOPSIS -=head1 AUTHOR +=head1 DESCRIPTION -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team +This object represents a ScoredMappingMatrix entry. It is defined by a +pair of a source and target object's internal Id and a score for this +mapping. -=head1 CONTACT +=head1 METHODS -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> + new + new_fast + source + target + score + to_string =cut +package Bio::EnsEMBL::IdMapping::Entry; + use strict; use warnings; no warnings 'uninitialized'; diff --git a/modules/Bio/EnsEMBL/IdMapping/ExonScoreBuilder.pm b/modules/Bio/EnsEMBL/IdMapping/ExonScoreBuilder.pm index 7f421591fbb12f29c9b89dd353fdb071e8f0aa94..67a718cdf53732c15c609a1fb45a476206b742bf 100644 --- a/modules/Bio/EnsEMBL/IdMapping/ExonScoreBuilder.pm +++ b/modules/Bio/EnsEMBL/IdMapping/ExonScoreBuilder.pm @@ -1,35 +1,37 @@ -package Bio::EnsEMBL::IdMapping::ExonScoreBuilder; - -=head1 NAME - +=head1 LICENSE -=head1 SYNOPSIS + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + This software is distributed under a modified Apache license. + For license details, please see -=head1 DESCRIPTION + http://www.ensembl.org/info/about/code_licence.html -Combines ExonScoreBuilder, ExonDirectMapper and ExonerateRunner from Java -application. +=head1 CONTACT -=head1 METHODS + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 LICENCE +=cut -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. +=head1 NAME -=head1 AUTHOR +=head1 SYNOPSIS -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team +=head1 DESCRIPTION -=head1 CONTACT +Combines ExonScoreBuilder, ExonDirectMapper and ExonerateRunner from +Java application. -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> +=head1 METHODS =cut +package Bio::EnsEMBL::IdMapping::ExonScoreBuilder; use strict; use warnings; diff --git a/modules/Bio/EnsEMBL/IdMapping/GeneScoreBuilder.pm b/modules/Bio/EnsEMBL/IdMapping/GeneScoreBuilder.pm index b55b30d49c7213a158251fbb3f39904e66477f6b..5403106f84fdcaf4aae3c40f8c171b2847b1869d 100644 --- a/modules/Bio/EnsEMBL/IdMapping/GeneScoreBuilder.pm +++ b/modules/Bio/EnsEMBL/IdMapping/GeneScoreBuilder.pm @@ -1,35 +1,37 @@ -package Bio::EnsEMBL::IdMapping::GeneScoreBuilder; - -=head1 NAME - +=head1 LICENSE -=head1 SYNOPSIS + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + This software is distributed under a modified Apache license. + For license details, please see -=head1 DESCRIPTION + http://www.ensembl.org/info/about/code_licence.html -Combines ExonScoreBuilder, ExonDirectMapper and ExonerateRunner from Java -application. +=head1 CONTACT -=head1 METHODS + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 LICENCE +=cut -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. +=head1 NAME -=head1 AUTHOR +=head1 SYNOPSIS -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team +=head1 DESCRIPTION -=head1 CONTACT +Combines ExonScoreBuilder, ExonDirectMapper and ExonerateRunner from +Java application. -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> +=head1 METHODS =cut +package Bio::EnsEMBL::IdMapping::GeneScoreBuilder; use strict; use warnings; diff --git a/modules/Bio/EnsEMBL/IdMapping/InternalIdMapper.pm b/modules/Bio/EnsEMBL/IdMapping/InternalIdMapper.pm index 449b584369eb8b56917a2b891a46e0cb0656e08d..8ab74575bb6ccfb35deecddec67437de864e61b0 100644 --- a/modules/Bio/EnsEMBL/IdMapping/InternalIdMapper.pm +++ b/modules/Bio/EnsEMBL/IdMapping/InternalIdMapper.pm @@ -1,34 +1,36 @@ -package Bio::EnsEMBL::IdMapping::InternalIdMapper; +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html +=head1 CONTACT -=head1 DESCRIPTION - - -=head1 METHODS - + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 LICENCE + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -This code is distributed under an Apache style licence. Please see -http:#www.ensembl.org/info/about/code_licence.html for details. +=cut -=head1 AUTHOR +=head1 NAME -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team +=head1 SYNOPSIS -=head1 CONTACT +=head1 DESCRIPTION -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> +=head1 METHODS =cut +package Bio::EnsEMBL::IdMapping::InternalIdMapper; + use strict; use warnings; no warnings 'uninitialized'; diff --git a/modules/Bio/EnsEMBL/IdMapping/InternalIdMapper/BaseMapper.pm b/modules/Bio/EnsEMBL/IdMapping/InternalIdMapper/BaseMapper.pm index 77a6c8208f235616ab9c0c50e1479ed3da02a015..e70ca80c76cb22bac9fcae81d0de166d563e7c92 100644 --- a/modules/Bio/EnsEMBL/IdMapping/InternalIdMapper/BaseMapper.pm +++ b/modules/Bio/EnsEMBL/IdMapping/InternalIdMapper/BaseMapper.pm @@ -1,33 +1,34 @@ -package Bio::EnsEMBL::IdMapping::InternalIdMapper::BaseMapper; - -=head1 NAME - - -=head1 SYNOPSIS +=head1 LICENSE + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 DESCRIPTION + This software is distributed under a modified Apache license. + For license details, please see + http://www.ensembl.org/info/about/code_licence.html -=head1 METHODS +=head1 CONTACT + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 LICENCE + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -This code is distributed under an Apache style licence. Please see -http:#www.ensembl.org/info/about/code_licence.html for details. +=cut -=head1 AUTHOR +=head1 NAME -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team +=head1 SYNOPSIS -=head1 CONTACT +=head1 DESCRIPTION -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> +=head1 METHODS =cut +package Bio::EnsEMBL::IdMapping::InternalIdMapper::BaseMapper; use strict; use warnings; diff --git a/modules/Bio/EnsEMBL/IdMapping/InternalIdMapper/EnsemblExonGeneric.pm b/modules/Bio/EnsEMBL/IdMapping/InternalIdMapper/EnsemblExonGeneric.pm index 7caae11a377c4ae693a212a59048ebbeb77cd1bf..6f311ea54b9bef8334204ff5baa4ff19c1aaa057 100644 --- a/modules/Bio/EnsEMBL/IdMapping/InternalIdMapper/EnsemblExonGeneric.pm +++ b/modules/Bio/EnsEMBL/IdMapping/InternalIdMapper/EnsemblExonGeneric.pm @@ -1,33 +1,34 @@ -package Bio::EnsEMBL::IdMapping::InternalIdMapper::EnsemblExonGeneric; - -=head1 NAME - - -=head1 SYNOPSIS +=head1 LICENSE + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 DESCRIPTION + This software is distributed under a modified Apache license. + For license details, please see + http://www.ensembl.org/info/about/code_licence.html -=head1 METHODS +=head1 CONTACT + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 LICENCE + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -This code is distributed under an Apache style licence. Please see -http:#www.ensembl.org/info/about/code_licence.html for details. +=cut -=head1 AUTHOR +=head1 NAME -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team +=head1 SYNOPSIS -=head1 CONTACT +=head1 DESCRIPTION -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> +=head1 METHODS =cut +package Bio::EnsEMBL::IdMapping::InternalIdMapper::EnsemblExonGeneric; use strict; use warnings; diff --git a/modules/Bio/EnsEMBL/IdMapping/InternalIdMapper/EnsemblGeneGeneric.pm b/modules/Bio/EnsEMBL/IdMapping/InternalIdMapper/EnsemblGeneGeneric.pm index 8d5d1c6b3760c6472b12ef6d0b6da5bb661d4c73..72c7484ecaab07de5264febcdba9c12547fca284 100644 --- a/modules/Bio/EnsEMBL/IdMapping/InternalIdMapper/EnsemblGeneGeneric.pm +++ b/modules/Bio/EnsEMBL/IdMapping/InternalIdMapper/EnsemblGeneGeneric.pm @@ -1,35 +1,37 @@ -package Bio::EnsEMBL::IdMapping::InternalIdMapper::EnsemblGeneGeneric; - -=head1 NAME - -Bio::EnsEMBL::IdMapping::InternalIdMapper::EnsemblGeneGeneric - default Ensembl -InternalIdMapper implementation for genes +=head1 LICENSE -=head1 SYNOPSIS + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + This software is distributed under a modified Apache license. + For license details, please see -=head1 DESCRIPTION + http://www.ensembl.org/info/about/code_licence.html +=head1 CONTACT -=head1 METHODS + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 LICENCE +=cut -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. +=head1 NAME -=head1 AUTHOR +Bio::EnsEMBL::IdMapping::InternalIdMapper::EnsemblGeneGeneric - default Ensembl +InternalIdMapper implementation for genes -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team +=head1 SYNOPSIS -=head1 CONTACT +=head1 DESCRIPTION -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> +=head1 METHODS =cut +package Bio::EnsEMBL::IdMapping::InternalIdMapper::EnsemblGeneGeneric; use strict; use warnings; diff --git a/modules/Bio/EnsEMBL/IdMapping/InternalIdMapper/EnsemblTranscriptGeneric.pm b/modules/Bio/EnsEMBL/IdMapping/InternalIdMapper/EnsemblTranscriptGeneric.pm index 8c7ad9ab3373c78c33ae5b1d236040b47f740878..ad769b6937a0d7a84a18b25c37664f9a89311c1f 100644 --- a/modules/Bio/EnsEMBL/IdMapping/InternalIdMapper/EnsemblTranscriptGeneric.pm +++ b/modules/Bio/EnsEMBL/IdMapping/InternalIdMapper/EnsemblTranscriptGeneric.pm @@ -1,34 +1,36 @@ -package Bio::EnsEMBL::IdMapping::InternalIdMapper::EnsemblTranscriptGeneric; +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html +=head1 CONTACT -=head1 DESCRIPTION - - -=head1 METHODS - + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 LICENCE + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -This code is distributed under an Apache style licence. Please see -http:#www.ensembl.org/info/about/code_licence.html for details. +=cut -=head1 AUTHOR +=head1 NAME -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team +=head1 SYNOPSIS -=head1 CONTACT +=head1 DESCRIPTION -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> +=head1 METHODS =cut +package Bio::EnsEMBL::IdMapping::InternalIdMapper::EnsemblTranscriptGeneric; + use strict; use warnings; no warnings 'uninitialized'; diff --git a/modules/Bio/EnsEMBL/IdMapping/MappingList.pm b/modules/Bio/EnsEMBL/IdMapping/MappingList.pm index 300a107cd9fd22d37cc0baf18bed466096428c41..6ae40e80eef064eb1da64de7cceb4fccc4475479 100644 --- a/modules/Bio/EnsEMBL/IdMapping/MappingList.pm +++ b/modules/Bio/EnsEMBL/IdMapping/MappingList.pm @@ -1,63 +1,68 @@ -package Bio::EnsEMBL::IdMapping::MappingList; +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::IdMapping::MappingList - object holding a list of Entries + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html -# create a new MappingList -my $mappings = Bio::EnsEMBL::IdMapping::MappingList->new( - -DUMP_PATH => $dump_path, - -CACHE_FILE => 'gene_mappings.ser', -); +=head1 CONTACT -# add entries -my $mappings->add_Entry($entry1); -my $mappings->add_all($entry2, $entry3); + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -# serialise to file -$mappings->write_to_file; + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -# later, read these mappings from file -my $mappings1 = Bio::EnsEMBL::IdMapping::MappingList->new( - -DUMP_PATH => $dump_path, - -CACHE_FILE => 'gene_mappings.ser', -); -$mappings1->read_from_file; +=cut -=head1 DESCRIPTION +=head1 NAME -This object represents a list of Bio::EnsEMBL::IdMapping::Entry objects. It's -essentially an OO wrapper for an array with some type checking and convenience -methods. +Bio::EnsEMBL::IdMapping::MappingList - object holding a list of Entries -=head1 METHODS +=head1 SYNOPSIS + + # create a new MappingList + my $mappings = Bio::EnsEMBL::IdMapping::MappingList->new( + -DUMP_PATH => $dump_path, + -CACHE_FILE => 'gene_mappings.ser', + ); -new -add_Entry -get_all_Entries -add_all -get_entry_count -log -to_string + # add entries + my $mappings->add_Entry($entry1); + my $mappings->add_all( $entry2, $entry3 ); -=head1 LICENCE + # serialise to file + $mappings->write_to_file; -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. + # later, read these mappings from file + my $mappings1 = Bio::EnsEMBL::IdMapping::MappingList->new( + -DUMP_PATH => $dump_path, + -CACHE_FILE => 'gene_mappings.ser', + ); + $mappings1->read_from_file; -=head1 AUTHOR +=head1 DESCRIPTION -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team +This object represents a list of Bio::EnsEMBL::IdMapping::Entry +objects. It's essentially an OO wrapper for an array with some type +checking and convenience methods. -=head1 CONTACT +=head1 METHODS -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> + new + add_Entry + get_all_Entries + add_all + get_entry_count + log + to_string =cut +package Bio::EnsEMBL::IdMapping::MappingList; use strict; use warnings; diff --git a/modules/Bio/EnsEMBL/IdMapping/ResultAnalyser.pm b/modules/Bio/EnsEMBL/IdMapping/ResultAnalyser.pm index b96542d91c6a1e8966c4d66078175c560c9ba628..450206b0cfaff2d2292e505386d0f9a64bd14402 100644 --- a/modules/Bio/EnsEMBL/IdMapping/ResultAnalyser.pm +++ b/modules/Bio/EnsEMBL/IdMapping/ResultAnalyser.pm @@ -1,4 +1,22 @@ -package Bio::EnsEMBL::IdMapping::ResultAnalyser; +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -6,69 +24,57 @@ Bio::EnsEMBL::IdMapping::ResultAnalyser - analyse stable Id mapping results =head1 SYNOPSIS -# get a result analyser -my $analyser = Bio::EnsEMBL::IdMapping::ResultAnalyser->new( - -LOGGER => $logger, - -CONF => $conf, - -CACHE => $cache -); + # get a result analyser + my $analyser = Bio::EnsEMBL::IdMapping::ResultAnalyser->new( + -LOGGER => $logger, + -CONF => $conf, + -CACHE => $cache + ); -# analyse results -$analyser->analyse($gene_mappings, - $stable_id_mapper->get_all_stable_id_events('similarity')); + # analyse results + $analyser->analyse( $gene_mappings, + $stable_id_mapper->get_all_stable_id_events('similarity') ); -# write results to file -$analyser->write_results_to_file; + # write results to file + $analyser->write_results_to_file; -# create click lists -$analyser->create_clicklist; + # create click lists + $analyser->create_clicklist; -# summary email -$analyser->create_summary_email; + # summary email + $analyser->create_summary_email; =head1 DESCRIPTION -This is a utility module which analyses the stable Id mapping results by -providing various sorts of mapping statistics. It also creates clicklists and a -summary email. +This is a utility module which analyses the stable Id mapping results +by providing various sorts of mapping statistics. It also creates +clicklists and a summary email. =head1 METHODS -analyse -analyse_db -classify_source_genes_by_type -classify_genes_by_mapping_simple -classify_genes_by_mapping -add -get -get_all_by_subclass -get_all_by_class -get_count_by_subclass -get_count_by_class -get_all_classes -class_key -write_results_to_file -create_clicklist -create_summary_email -read_from_file - -=head1 LICENCE - -This code is distributed under an Apache style licence. Please see -http:#www.ensembl.org/info/about/code_licence.html for details. - -=head1 AUTHOR - -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team - -=head1 CONTACT - -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> + analyse + analyse_db + classify_source_genes_by_type + classify_genes_by_mapping_simple + classify_genes_by_mapping + add + get + get_all_by_subclass + get_all_by_class + get_count_by_subclass + get_count_by_class + get_all_classes + class_key + write_results_to_file + create_clicklist + create_summary_email + read_from_file =cut +package Bio::EnsEMBL::IdMapping::ResultAnalyser; + use strict; use warnings; no warnings 'uninitialized'; diff --git a/modules/Bio/EnsEMBL/IdMapping/ScoreBuilder.pm b/modules/Bio/EnsEMBL/IdMapping/ScoreBuilder.pm index 015db1a63051f7fbf8c584103c2f4cbfe6555749..626961be784cd0f1956abfd5bd726835b44cff42 100644 --- a/modules/Bio/EnsEMBL/IdMapping/ScoreBuilder.pm +++ b/modules/Bio/EnsEMBL/IdMapping/ScoreBuilder.pm @@ -1,41 +1,47 @@ -package Bio::EnsEMBL::IdMapping::ScoreBuilder; +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::IdMapping::ScoreBuilder - score builder base class + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html -This class is not instantiated. Please see subclasses for usage examples (e.g. -GeneScoreBuilder). +=head1 CONTACT -=head1 DESCRIPTION + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -This is the base class for the score builders used in the stable Id mapping -application. It contains methods which are used by more than one ScoreBuilder. + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 METHODS +=cut -create_shrinked_matrix -internal_id_rescore -log_matrix_stats +=head1 NAME + +Bio::EnsEMBL::IdMapping::ScoreBuilder - score builder base class -=head1 LICENCE +=head1 SYNOPSIS -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. +This class is not instantiated. Please see subclasses for usage examples +(e.g. GeneScoreBuilder). -=head1 AUTHOR +=head1 DESCRIPTION -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team +This is the base class for the score builders used in the stable Id +mapping application. It contains methods which are used by more than one +ScoreBuilder. -=head1 CONTACT +=head1 METHODS -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> + create_shrinked_matrix + internal_id_rescore + log_matrix_stats =cut +package Bio::EnsEMBL::IdMapping::ScoreBuilder; use strict; use warnings; diff --git a/modules/Bio/EnsEMBL/IdMapping/ScoredMappingMatrix.pm b/modules/Bio/EnsEMBL/IdMapping/ScoredMappingMatrix.pm index a9f3ba1c6cc32a7a17847f6d46026b8bdc0272d4..d27274f9b527a2b9a7d3d458a766a0a84d36bc9d 100644 --- a/modules/Bio/EnsEMBL/IdMapping/ScoredMappingMatrix.pm +++ b/modules/Bio/EnsEMBL/IdMapping/ScoredMappingMatrix.pm @@ -1,4 +1,22 @@ -package Bio::EnsEMBL::IdMapping::ScoredMappingMatrix; +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -7,80 +25,68 @@ Entries =head1 SYNOPSIS -# create a new ScoredMappingMatrix -my $gene_scores = Bio::EnsEMBL::IdMapping::ScoredMappingMatrix->new( - -DUMP_PATH => $dump_path, - -CACHE_FILE => 'gene_scores.ser', -); + # create a new ScoredMappingMatrix + my $gene_scores = Bio::EnsEMBL::IdMapping::ScoredMappingMatrix->new( + -DUMP_PATH => $dump_path, + -CACHE_FILE => 'gene_scores.ser', + ); -# add entries -my $gene_scores->add_Entry($entry1); + # add entries + my $gene_scores->add_Entry($entry1); -# serialise to file -$gene_scores->write_to_file; + # serialise to file + $gene_scores->write_to_file; -# later, read these gene_scores from file -my $gene_scores1 = Bio::EnsEMBL::IdMapping::ScoredMappingMatrix->new( - -DUMP_PATH => $dump_path, - -CACHE_FILE => 'gene_gene_scores.ser', -); -$gene_scores1->read_from_file; + # later, read these gene_scores from file + my $gene_scores1 = Bio::EnsEMBL::IdMapping::ScoredMappingMatrix->new( + -DUMP_PATH => $dump_path, + -CACHE_FILE => 'gene_gene_scores.ser', + ); + $gene_scores1->read_from_file; =head1 DESCRIPTION -This object represents a collection of scores between source and target objects. -It holds a list of Bio::EnsEMBL::IdMapping::Entry objects and has methods to -retrieve indiviual or all Entries, as well as derived data like number of unique -sources or targets, or various counts and averages. +This object represents a collection of scores between source and target +objects. It holds a list of Bio::EnsEMBL::IdMapping::Entry objects and +has methods to retrieve indiviual or all Entries, as well as derived +data like number of unique sources or targets, or various counts and +averages. -It is the main collection for dealing with scored relationships in the stable Id -mapping application. +It is the main collection for dealing with scored relationships in the +stable Id mapping application. =head1 METHODS -new -flush -sub_matrix -add_Entry -update_Entry -remove_Entry -add_score -set_score -get_Entry -get_score -get_targets_for_source -get_Entries_for_source -get_sources_for_target -get_Entries_for_target -get_all_Entries -get_all_sources -get_all_targets -get_entry_count -size -get_source_count -get_target_count -get_min_max_scores -get_average_score -merge -log -to_string - -=head1 LICENCE - -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. - -=head1 AUTHOR - -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team - -=head1 CONTACT - -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> + new + flush + sub_matrix + add_Entry + update_Entry + remove_Entry + add_score + set_score + get_Entry + get_score + get_targets_for_source + get_Entries_for_source + get_sources_for_target + get_Entries_for_target + get_all_Entries + get_all_sources + get_all_targets + get_entry_count + size + get_source_count + get_target_count + get_min_max_scores + get_average_score + merge + log + to_string =cut +package Bio::EnsEMBL::IdMapping::ScoredMappingMatrix; use strict; use warnings; diff --git a/modules/Bio/EnsEMBL/IdMapping/Serialisable.pm b/modules/Bio/EnsEMBL/IdMapping/Serialisable.pm index f0949db626864cc9dab47f57c03d8bb162400348..0471dd62650ee1791de93109884f0015308004ec 100644 --- a/modules/Bio/EnsEMBL/IdMapping/Serialisable.pm +++ b/modules/Bio/EnsEMBL/IdMapping/Serialisable.pm @@ -1,67 +1,74 @@ -package Bio::EnsEMBL::IdMapping::Serialisable; +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::IdMapping::Serialisable - base class for serialisable objects + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html -# instantiate an object which extends Serialisable -my $object = YourObject->new( - -DUMP_PATH => '/tmp', - -CACHE_FILE => 'object_cache.ser', -); +=head1 CONTACT -# serialise object to file -my $filesize = $object->write_to_file; -print LOG "Serialised object to file of size $filesize.\n"; + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -# later, create another object defining the same serialisation location. -# specifying -LOAD_AUTO will automatically load it from the serialisation file. -my $object1 = YourObject->new( - -DUMP_PATH => '/tmp', - -CACHE_FILE => 'object_cache.ser', - -LOAD_AUTO => 1, -); + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -# alternatively, manually load the object from file -$object1->load_from_file; +=cut -=head1 DESCRIPTION +=head1 NAME -This is the base class for serialisable objects used by the stable Id mapping. -It's essentially an OO wrapper for Storable, providing a method to store -(write_to_file(()) and one to retrieve (read_from_file()) serialised objects. +Bio::EnsEMBL::IdMapping::Serialisable - base class for serialisable objects + +=head1 SYNOPSIS -This class is not instantiated itself, but rather extended by implementing -classes. + # instantiate an object which extends Serialisable + my $object = YourObject->new( + -DUMP_PATH => '/tmp', + -CACHE_FILE => 'object_cache.ser', + ); -=head1 METHODS + # serialise object to file + my $filesize = $object->write_to_file; + print LOG "Serialised object to file of size $filesize.\n"; -new -write_to_file -read_from_file -dump_path -cache_file_name -cache_file -loaded + # later, create another object defining the same serialisation + # location. specifying -LOAD_AUTO will automatically load it from the + # serialisation file. + my $object1 = YourObject->new( + -DUMP_PATH => '/tmp', + -CACHE_FILE => 'object_cache.ser', + -LOAD_AUTO => 1, + ); -=head1 LICENCE + # alternatively, manually load the object from file + $object1->load_from_file; -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. +=head1 DESCRIPTION -=head1 AUTHOR +This is the base class for serialisable objects used by the +stable Id mapping. It's essentially an OO wrapper for Storable, +providing a method to store (write_to_file(()) and one to retrieve +(read_from_file()) serialised objects. -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team +This class is not instantiated itself, but rather extended by +implementing classes. -=head1 CONTACT +=head1 METHODS -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> + new + write_to_file + read_from_file + dump_path + cache_file_name + cache_file + loaded =cut +package Bio::EnsEMBL::IdMapping::Serialisable; use strict; use warnings; diff --git a/modules/Bio/EnsEMBL/IdMapping/StableIdGenerator/AedesAegypti.pm b/modules/Bio/EnsEMBL/IdMapping/StableIdGenerator/AedesAegypti.pm index c026e7892105036cfbd6d49bc8e34b7b6d408e71..25c123193a9525e5bcbbd4236f30205a16dd2d06 100644 --- a/modules/Bio/EnsEMBL/IdMapping/StableIdGenerator/AedesAegypti.pm +++ b/modules/Bio/EnsEMBL/IdMapping/StableIdGenerator/AedesAegypti.pm @@ -1,3 +1,23 @@ +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut + package Bio::EnsEMBL::IdMapping::StableIdGenerator::AedesAegypti; # Package that implements incrementing and verification of Aedes aegypti @@ -26,11 +46,9 @@ sub increment_stable_id { my $number_as_string = "$2"; my $number = $2 + 1; - $stable_id = sprintf( "%s" - . sprintf( "%%0%dd", length($number_as_string) - ) - . "%s", - $1, $number, $3 ); + $stable_id = sprintf( + "%s" . sprintf( "%%0%dd", length($number_as_string) ) . "%s", + $1, $number, $3 ); return $stable_id; } diff --git a/modules/Bio/EnsEMBL/IdMapping/StableIdGenerator/EnsemblGeneric.pm b/modules/Bio/EnsEMBL/IdMapping/StableIdGenerator/EnsemblGeneric.pm index 488ca04faf6bcfb65102c53211d033adc89c064f..5d1d86ec676298bb45c725bdb64a6cbb034ad3eb 100644 --- a/modules/Bio/EnsEMBL/IdMapping/StableIdGenerator/EnsemblGeneric.pm +++ b/modules/Bio/EnsEMBL/IdMapping/StableIdGenerator/EnsemblGeneric.pm @@ -1,4 +1,22 @@ -package Bio::EnsEMBL::IdMapping::StableIdGenerator::EnsemblGeneric; +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -7,52 +25,56 @@ StableIdGenerator implementation =head1 SYNOPSIS -# inject the confiured StableIdGenerator plugin -my $stable_id_generator = $conf->param('plugin_stable_id_generator'); -inject($stable_id_generator); + # inject the confiured StableIdGenerator plugin + my $stable_id_generator = $conf->param('plugin_stable_id_generator'); + inject($stable_id_generator); -# create a new StableIdGenerator object -my $generator_instance = $stable_id_generator->new( - -LOGGER => $self->logger, - -CONF => $self->conf, - -CACHE => $self->cache -); + # create a new StableIdGenerator object + my $generator_instance = $stable_id_generator->new( + -LOGGER => $self->logger, + -CONF => $self->conf, + -CACHE => $self->cache + ); -# determine starting stable ID for new assignments -my $new_stable_id = $generator_instance->initial_stable_id('gene'); + # determine starting stable ID for new assignments + my $new_stable_id = $generator_instance->initial_stable_id('gene'); -# loop over genes -foreach my $target_gene (@all_target_genes) { + # loop over genes + foreach my $target_gene (@all_target_genes) { - # if the stable Id for this gene was mapped, assign it - if ($mapping_exists{$target_gene->id}) { - my $source_gene = $mappings{$target_gene->id}; - $target_gene->stable_id($source_gene->stable_id); + # if the stable Id for this gene was mapped, assign it + if ( $mapping_exists{ $target_gene->id } ) { + my $source_gene = $mappings{ $target_gene->id }; + $target_gene->stable_id( $source_gene->stable_id ); - # calculate and set version - my $version = $generator_instance->calculate_version($source_gene, - $target_gene); - $target_gene->version($version); + # calculate and set version + my $version = + $generator_instance->calculate_version( $source_gene, + $target_gene ); + $target_gene->version($version); - # no mapping exists, assign a new stable Id - } else { - $target_gene->stable_id($new_stable_id); - $target_gene->version('1'); + # no mapping exists, assign a new stable Id + } else { + $target_gene->stable_id($new_stable_id); + $target_gene->version('1'); # increment the stable Id (to be assigned to the next unmapped gene) - $new_stable_id = $generator_instance->increment_stable_id($new_stable_id); + $new_stable_id = + $generator_instance->increment_stable_id($new_stable_id); + } } -} =head1 DESCRIPTION -This is the default implementation for a StableIdGenerator, which is used by -Bio::EnsEMBL::IdMapping::StableIdMapper to generate new stable Ids and increment -versions on mapped stable Ids. Refer to the documentation in this module if you -would like to implement your own StableIdGenerator. +This is the default implementation for a StableIdGenerator, which +is used by Bio::EnsEMBL::IdMapping::StableIdMapper to generate new +stable Ids and increment versions on mapped stable Ids. Refer to the +documentation in this module if you would like to implement your own +StableIdGenerator. -The stable Id mapping application allows you to plugin your own implementation -by specifying it with the --plugin_stable_id_generator configuration parameter. +The stable Id mapping application allows you to plugin your own +implementation by specifying it with the --plugin_stable_id_generator +configuration parameter. Requirements for a StableIdGenerator plugin: @@ -62,26 +84,13 @@ Requirements for a StableIdGenerator plugin: =head1 METHODS -initial_stable_id -increment_stable_id -calculate_version - -=head1 LICENCE - -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. - -=head1 AUTHOR - -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team - -=head1 CONTACT - -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> + initial_stable_id + increment_stable_id + calculate_version =cut +package Bio::EnsEMBL::IdMapping::StableIdGenerator::EnsemblGeneric; use strict; use warnings; diff --git a/modules/Bio/EnsEMBL/IdMapping/StableIdMapper.pm b/modules/Bio/EnsEMBL/IdMapping/StableIdMapper.pm index f9d08a4b291aaa5e0c367aa9f49166d6376d3d5a..ea57ac856dd3d8cef0517514903982091b66866e 100644 --- a/modules/Bio/EnsEMBL/IdMapping/StableIdMapper.pm +++ b/modules/Bio/EnsEMBL/IdMapping/StableIdMapper.pm @@ -1,33 +1,34 @@ -package Bio::EnsEMBL::IdMapping::StableIdMapper; - -=head1 NAME - - -=head1 SYNOPSIS +=head1 LICENSE + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 DESCRIPTION + This software is distributed under a modified Apache license. + For license details, please see + http://www.ensembl.org/info/about/code_licence.html -=head1 METHODS +=head1 CONTACT + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 LICENCE + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -This code is distributed under an Apache style licence. Please see -http:#www.ensembl.org/info/about/code_licence.html for details. +=cut -=head1 AUTHOR +=head1 NAME -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team +=head1 SYNOPSIS -=head1 CONTACT +=head1 DESCRIPTION -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> +=head1 METHODS =cut +package Bio::EnsEMBL::IdMapping::StableIdMapper; use strict; use warnings; diff --git a/modules/Bio/EnsEMBL/IdMapping/SyntenyFramework.pm b/modules/Bio/EnsEMBL/IdMapping/SyntenyFramework.pm index df58482f0940c9910f3157b49d1ffd4f4a4eb449..ac81407e626d3080cbc57578f609f4c028e7d23b 100644 --- a/modules/Bio/EnsEMBL/IdMapping/SyntenyFramework.pm +++ b/modules/Bio/EnsEMBL/IdMapping/SyntenyFramework.pm @@ -1,69 +1,71 @@ -package Bio::EnsEMBL::IdMapping::SyntenyFramework; - -=head1 NAME +=head1 LICENSE -Bio::EnsEMBL::IdMapping::SyntenyFramework - framework representing syntenic -regions across the genome + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 SYNOPSIS + This software is distributed under a modified Apache license. + For license details, please see -# build the SyntenyFramework from unambiguous gene mappings -my $sf = Bio::EnsEMBL::IdMapping::SyntenyFramework->new( - -DUMP_PATH => $dump_path, - -CACHE_FILE => 'synteny_framework.ser', - -LOGGER => $self->logger, - -CONF => $self->conf, - -CACHE => $self->cache, -); -$sf->build_synteny($gene_mappings); + http://www.ensembl.org/info/about/code_licence.html -# use it to rescore the genes -$gene_scores = $sf->rescore_gene_matrix_lsf($gene_scores); +=head1 CONTACT -=head1 DESCRIPTION + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -The SyntenyFramework is a set of SyntenyRegions. These are pairs of locations -very analoguous to the information in the assembly table (the locations dont -have to be the same length though). They are built from genes that map uniquely -between source and target. + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -Once built, the SyntenyFramework is used to score source and target gene pairs -to determine whether they are similar. This process is slow (it involves testing -all gene pairs against all SyntenyRegions), this module therefor has built-in -support to run the process in parallel via LSF. +=cut -=head1 METHODS +=head1 NAME -new -build_synteny -_by_overlap -add_SyntenyRegion -get_all_SyntenyRegions -rescore_gene_matrix_lsf -rescore_gene_matrix -logger -conf -cache +Bio::EnsEMBL::IdMapping::SyntenyFramework - framework representing syntenic +regions across the genome -=head1 REALTED MODULES +=head1 SYNOPSIS + # build the SyntenyFramework from unambiguous gene mappings + my $sf = Bio::EnsEMBL::IdMapping::SyntenyFramework->new( + -DUMP_PATH => $dump_path, + -CACHE_FILE => 'synteny_framework.ser', + -LOGGER => $self->logger, + -CONF => $self->conf, + -CACHE => $self->cache, + ); + $sf->build_synteny($gene_mappings); -=head1 LICENCE + # use it to rescore the genes + $gene_scores = $sf->rescore_gene_matrix_lsf($gene_scores); -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. +=head1 DESCRIPTION -=head1 AUTHOR +The SyntenyFramework is a set of SyntenyRegions. These are pairs of +locations very analoguous to the information in the assembly table (the +locations dont have to be the same length though). They are built from +genes that map uniquely between source and target. -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team +Once built, the SyntenyFramework is used to score source and target gene +pairs to determine whether they are similar. This process is slow (it +involves testing all gene pairs against all SyntenyRegions), this module +therefor has built-in support to run the process in parallel via LSF. -=head1 CONTACT +=head1 METHODS -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> + new + build_synteny + _by_overlap + add_SyntenyRegion + get_all_SyntenyRegions + rescore_gene_matrix_lsf + rescore_gene_matrix + logger + conf + cache =cut +package Bio::EnsEMBL::IdMapping::SyntenyFramework; use strict; use warnings; diff --git a/modules/Bio/EnsEMBL/IdMapping/SyntenyRegion.pm b/modules/Bio/EnsEMBL/IdMapping/SyntenyRegion.pm index 59cccf4775f2e92364e4a8f6ed28c36f63391718..7861563df1e7a52ce4768c668b0a69e960bbb0a0 100644 --- a/modules/Bio/EnsEMBL/IdMapping/SyntenyRegion.pm +++ b/modules/Bio/EnsEMBL/IdMapping/SyntenyRegion.pm @@ -1,69 +1,72 @@ -package Bio::EnsEMBL::IdMapping::SyntenyRegion; +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::IdMapping::SyntenyRegion - object representing syntenic regions + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT -# create a new SyntenyRegion from a source and a target gene -my $sr = Bio::EnsEMBL::IdMapping::SyntenyRegion->new_fast([ - $source_gene->start, - $source_gene->end, - $source_gene->strand, - $source_gene->seq_region_name, - $target_gene->start, - $target_gene->end, - $target_gene->strand, - $target_gene->seq_region_name, - $entry->score, -]); - -# merge with another SyntenyRegion -my $merged_sr = $sr->merge($sr1); - -# score a gene pair against this SyntenyRegion -my $score = $sr->score_location_relationship($source_gene1, $target_gene1); + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 DESCRIPTION + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -This object represents a synteny between a source and a target location. -SyntenyRegions are built from mapped genes, and the their score is defined as -the score of the gene mapping. For merged SyntenyRegions, scores are combined. +=cut -=head1 METHODS +=head1 NAME -new_fast -source_start -source_end -source_strand -source_seq_region_name -target_start -target_end -target_strand -target_seq_region_name -score -merge -stretch -score_location_relationship -to_string +Bio::EnsEMBL::IdMapping::SyntenyRegion - object representing syntenic regions -=head1 LICENCE +=head1 SYNOPSIS -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. + # create a new SyntenyRegion from a source and a target gene + my $sr = Bio::EnsEMBL::IdMapping::SyntenyRegion->new_fast( [ + $source_gene->start, $source_gene->end, + $source_gene->strand, $source_gene->seq_region_name, + $target_gene->start, $target_gene->end, + $target_gene->strand, $target_gene->seq_region_name, + $entry->score, + ] ); -=head1 AUTHOR + # merge with another SyntenyRegion + my $merged_sr = $sr->merge($sr1); -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team + # score a gene pair against this SyntenyRegion + my $score = + $sr->score_location_relationship( $source_gene1, $target_gene1 ); -=head1 CONTACT +=head1 DESCRIPTION -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> +This object represents a synteny between a source and a target location. +SyntenyRegions are built from mapped genes, and the their score is +defined as the score of the gene mapping. For merged SyntenyRegions, +scores are combined. + +=head1 METHODS + + new_fast + source_start + source_end + source_strand + source_seq_region_name + target_start + target_end + target_strand + target_seq_region_name + score + merge + stretch + score_location_relationship + to_string =cut +package Bio::EnsEMBL::IdMapping::SyntenyRegion; use strict; use warnings; diff --git a/modules/Bio/EnsEMBL/IdMapping/TinyExon.pm b/modules/Bio/EnsEMBL/IdMapping/TinyExon.pm index 7fc69887267965e0b0aed3981eb84525e26927e4..f0ede0abe25e61e75e3f25be3c5aee48e6c980d3 100644 --- a/modules/Bio/EnsEMBL/IdMapping/TinyExon.pm +++ b/modules/Bio/EnsEMBL/IdMapping/TinyExon.pm @@ -1,70 +1,78 @@ -package Bio::EnsEMBL::IdMapping::TinyExon; +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::IdMapping::TinyExon - lightweight exon object + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html -# fetch an exon from the db and create a lightweight exon object from it -my $exon = $exon_adaptor->fetch_by_stable_id('ENSE000345437'); -my $lightweight_exon = Bio::EnsEMBL::IdMapping::TinyExon->new_fast([ - $exon->dbID, - $exon->stable_id, - $exon->version, - $exon->created_date, - $exon->modified_date, - $exon->start, - $exon->end, - $exon->strand, - $exon->slice->seq_region_name, - $exon->slice->coord_system_name, - $exon->slice->coord_system->version, - $exon->slice->subseq($exon->start, $exon->end, $exon->strand), - $exon->phase, - $need_project, -]); +=head1 CONTACT -=head1 DESCRIPTION + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -This is a lightweight exon object for the stable Id mapping. See the -documentation in TinyFeature for general considerations about its design. + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 METHODS +=cut -start -end -strand -seq_region_name -coord_system_name -coord_system_version -seq -phase -need_project -common_start -common_end -common_strand -common_sr_name -length -is_known +=head1 NAME -=head1 LICENCE +Bio::EnsEMBL::IdMapping::TinyExon - lightweight exon object -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. +=head1 SYNOPSIS -=head1 AUTHOR + # fetch an exon from the db and create a lightweight exon object + # from it + my $exon = $exon_adaptor->fetch_by_stable_id('ENSE000345437'); + my $lightweight_exon = Bio::EnsEMBL::IdMapping::TinyExon->new_fast( [ + $exon->dbID, + $exon->stable_id, + $exon->version, + $exon->created_date, + $exon->modified_date, + $exon->start, + $exon->end, + $exon->strand, + $exon->slice->seq_region_name, + $exon->slice->coord_system_name, + $exon->slice->coord_system->version, + $exon->slice->subseq( $exon->start, $exon->end, $exon->strand ), + $exon->phase, + $need_project, + ] ); -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team +=head1 DESCRIPTION -=head1 CONTACT +This is a lightweight exon object for the stable Id mapping. See the +documentation in TinyFeature for general considerations about its +design. -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> +=head1 METHODS + + start + end + strand + seq_region_name + coord_system_name + coord_system_version + seq + phase + need_project + common_start + common_end + common_strand + common_sr_name + length + is_known =cut +package Bio::EnsEMBL::IdMapping::TinyExon; + # internal data structure (array indices): # # 0-4 see TinyFeature diff --git a/modules/Bio/EnsEMBL/IdMapping/TinyFeature.pm b/modules/Bio/EnsEMBL/IdMapping/TinyFeature.pm index 9811cf6656ec3f7dea79f0aefc0337cb39ce61b3..ea17604eeee8c4d1d50f1b71fc6be987284f8cb1 100644 --- a/modules/Bio/EnsEMBL/IdMapping/TinyFeature.pm +++ b/modules/Bio/EnsEMBL/IdMapping/TinyFeature.pm @@ -1,55 +1,62 @@ -package Bio::EnsEMBL::IdMapping::TinyFeature; +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::IdMapping::TinyFeature - lightweight feature object + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html -This object isn't instantiated. See objects which inherit from it (TinyGene, -TinyTranscript, etc.) for examples. +=head1 CONTACT -=head1 DESCRIPTION + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -This is the base class for the lightweight feature objects used by the stable Id -maping application. For performance reasons, these objects are instantiated -using a new_fast() method. The internal implementation is an arrayref (rather -than the more common hashref), which optimises memory usage. + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut -There are no adaptors to fetch TinyFeatures from the database. You rather use -the normal feature adaptors and then create the TinyFeatures from the heavy -objects you get. The memory saving will therefore mainly take effect when -serialising and reloading these objects. +=head1 NAME -Also note that TinyFeatures don't have a slice attached to them - all location -information (where required) is stored on the feature object directly. +Bio::EnsEMBL::IdMapping::TinyFeature - lightweight feature object -=head1 METHODS +=head1 SYNOPSIS -new_fast -id -stable_id -version -created_date -modified_date -to_string +This object isn't instantiated. See objects which inherit from it +(TinyGene, TinyTranscript, etc.) for examples. -=head1 LICENCE +=head1 DESCRIPTION -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. +This is the base class for the lightweight feature objects used by the +stable Id maping application. For performance reasons, these objects +are instantiated using a new_fast() method. The internal implementation +is an arrayref (rather than the more common hashref), which optimises +memory usage. -=head1 AUTHOR +There are no adaptors to fetch TinyFeatures from the database. You +rather use the normal feature adaptors and then create the TinyFeatures +from the heavy objects you get. The memory saving will therefore mainly +take effect when serialising and reloading these objects. -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team +Also note that TinyFeatures don't have a slice attached to them - all +location information (where required) is stored on the feature object +directly. -=head1 CONTACT +=head1 METHODS -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> + new_fast + id + stable_id + version + created_date + modified_date + to_string =cut +package Bio::EnsEMBL::IdMapping::TinyFeature; # internal data structure (array indices): # diff --git a/modules/Bio/EnsEMBL/IdMapping/TinyGene.pm b/modules/Bio/EnsEMBL/IdMapping/TinyGene.pm index 5e69ffa15925bd30c0d600ca674b69967fd94734..b37868ad4d604bfe63ce499cb89b3db1696a42a7 100644 --- a/modules/Bio/EnsEMBL/IdMapping/TinyGene.pm +++ b/modules/Bio/EnsEMBL/IdMapping/TinyGene.pm @@ -1,64 +1,64 @@ -package Bio::EnsEMBL::IdMapping::TinyGene; +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::IdMapping::TinyGene - lightweight gene object + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html -# fetch a gene from the db and create a lightweight gene object from it -my $gene = $gene_adaptor->fetch_by_stable_id('ENSG000345437'); -my $lightweight_gene = Bio::EnsEMBL::IdMapping::TinyGene->new_fast([ - $gene->dbID, - $gene->stable_id, - $gene->version, - $gene->created_date, - $gene->modified_date, - $gene->start, - $gene->end, - $gene->strand, - $gene->slice->seq_region_name, - $gene->biotype, - $gene->status, - $gene->analysis->logic_name, - ($gene->is_known ? 1 : 0), -]); +=head1 CONTACT -=head1 DESCRIPTION + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -This is a lightweight gene object for the stable Id mapping. See the -documentation in TinyFeature for general considerations about its design. + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 METHODS +=cut -start -end -strand -seq_region_name -biotype -status -logic_name -is_known -add_Transcript -get_all_Transcripts -length +=head1 NAME -=head1 LICENCE +Bio::EnsEMBL::IdMapping::TinyGene - lightweight gene object -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. +=head1 SYNOPSIS -=head1 AUTHOR + # fetch a gene from the db and create a lightweight gene object from it + my $gene = $gene_adaptor->fetch_by_stable_id('ENSG000345437'); + my $lightweight_gene = Bio::EnsEMBL::IdMapping::TinyGene->new_fast( [ + $gene->dbID, $gene->stable_id, + $gene->version, $gene->created_date, + $gene->modified_date, $gene->start, + $gene->end, $gene->strand, + $gene->slice->seq_region_name, $gene->biotype, + $gene->status, $gene->analysis->logic_name, + ( $gene->is_known ? 1 : 0 ), + ] ); -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team +=head1 DESCRIPTION -=head1 CONTACT +This is a lightweight gene object for the stable Id mapping. See the +documentation in TinyFeature for general considerations about its +design. + +=head1 METHODS -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> + start + end + strand + seq_region_name + biotype + status + logic_name + is_known + add_Transcript + get_all_Transcripts + length =cut +package Bio::EnsEMBL::IdMapping::TinyGene; # internal data structure (array indices): # diff --git a/modules/Bio/EnsEMBL/IdMapping/TinyTranscript.pm b/modules/Bio/EnsEMBL/IdMapping/TinyTranscript.pm index a62a2effe28e7918a19e706af9839606e968264b..00f9eea2dbfd6505dc512d1c49da7abd44afd2ae 100644 --- a/modules/Bio/EnsEMBL/IdMapping/TinyTranscript.pm +++ b/modules/Bio/EnsEMBL/IdMapping/TinyTranscript.pm @@ -1,62 +1,64 @@ -package Bio::EnsEMBL::IdMapping::TinyTranscript; +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::IdMapping::TinyTranscript - lightweight transcript object + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html -# fetch a transcript from the db and create a lightweight transcript object from -# it -my $tr = $transcript_adaptor->fetch_by_stable_id('ENST000345437'); -my $lightweight_tr = Bio::EnsEMBL::IdMapping::TinyTranscript->new_fast([ - $tr->dbID, - $tr->stable_id, - $tr->version, - $tr->created_date, - $tr->modified_date, - $tr->start, - $tr->end, - $tr->strand, - $tr->length, - md5_hex($tr->spliced_seq), - ($tr->is_known ? 1 : 0), -]); +=head1 CONTACT -=head1 DESCRIPTION + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -This is a lightweight transcript object for the stable Id mapping. See the -documentation in TinyFeature for general considerations about its design. + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 METHODS +=cut -start -end -strand -length -seq_md5_sum -is_known -add_Translation -translation -add_Exon -get_all_Exons +=head1 NAME + +Bio::EnsEMBL::IdMapping::TinyTranscript - lightweight transcript object -=head1 LICENCE +=head1 SYNOPSIS -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. + # fetch a transcript from the db and create a lightweight + # transcript object from it + my $tr = $transcript_adaptor->fetch_by_stable_id('ENST000345437'); + my $lightweight_tr = + Bio::EnsEMBL::IdMapping::TinyTranscript->new_fast( [ + $tr->dbID, $tr->stable_id, + $tr->version, $tr->created_date, + $tr->modified_date, $tr->start, + $tr->end, $tr->strand, + $tr->length, md5_hex( $tr->spliced_seq ), + ( $tr->is_known ? 1 : 0 ), + ] ); -=head1 AUTHOR +=head1 DESCRIPTION -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team +This is a lightweight transcript object for the stable Id mapping. See +the documentation in TinyFeature for general considerations about its +design. -=head1 CONTACT +=head1 METHODS -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> + start + end + strand + length + seq_md5_sum + is_known + add_Translation + translation + add_Exon + get_all_Exons =cut +package Bio::EnsEMBL::IdMapping::TinyTranscript; # internal data structure (array indices): # diff --git a/modules/Bio/EnsEMBL/IdMapping/TinyTranslation.pm b/modules/Bio/EnsEMBL/IdMapping/TinyTranslation.pm index 365242a904ec31563b04620efb43df66e1ed9e80..2395ad40eaeeefcc3d3826eae0aa54787875c804 100644 --- a/modules/Bio/EnsEMBL/IdMapping/TinyTranslation.pm +++ b/modules/Bio/EnsEMBL/IdMapping/TinyTranslation.pm @@ -1,51 +1,54 @@ -package Bio::EnsEMBL::IdMapping::TinyTranslation; +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::IdMapping::TinyTranslation - lightweight translation object + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html -if (my $tl = $tr->translation) { - my $lightweight_tl = Bio::EnsEMBL::IdMapping::TinyTranslation->new_fast([ - $tl->dbID, - $tl->stable_id, - $tl->version, - $tl->created_date, - $tl->modified_date, - $tr->dbID, - $tr->translate->seq, - ($tr->is_known ? 1 : 0), - ]); -} +=head1 CONTACT -=head1 DESCRIPTION + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -This is a lightweight translation object for the stable Id mapping. See the -documentation in TinyFeature for general considerations about its design. + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 METHODS +=cut -transcript_id -seq -is_known +=head1 NAME + +Bio::EnsEMBL::IdMapping::TinyTranslation - lightweight translation object -=head1 LICENCE +=head1 SYNOPSIS -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. + if ( my $tl = $tr->translation ) { + my $lightweight_tl = + Bio::EnsEMBL::IdMapping::TinyTranslation->new_fast( [ + $tl->dbID, $tl->stable_id, + $tl->version, $tl->created_date, + $tl->modified_date, $tr->dbID, + $tr->translate->seq, ( $tr->is_known ? 1 : 0 ), + ] ); + } -=head1 AUTHOR +=head1 DESCRIPTION -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team +This is a lightweight translation object for the stable Id mapping. See +the documentation in TinyFeature for general considerations about its +design. -=head1 CONTACT +=head1 METHODS -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> + transcript_id + seq + is_known =cut +package Bio::EnsEMBL::IdMapping::TinyTranslation; # internal data structure (array indices): # diff --git a/modules/Bio/EnsEMBL/IdMapping/TranscriptScoreBuilder.pm b/modules/Bio/EnsEMBL/IdMapping/TranscriptScoreBuilder.pm index 7d2ee79a7f29a6bb037ff2ce348cd6c0969405ea..32acfe2dcf9dddf1db1866b6ceda8065f0514ca7 100644 --- a/modules/Bio/EnsEMBL/IdMapping/TranscriptScoreBuilder.pm +++ b/modules/Bio/EnsEMBL/IdMapping/TranscriptScoreBuilder.pm @@ -1,35 +1,39 @@ -package Bio::EnsEMBL::IdMapping::TranscriptScoreBuilder; +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html +=head1 CONTACT -=head1 DESCRIPTION + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -Combines ExonScoreBuilder, ExonDirectMapper and ExonerateRunner from Java -application. + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 METHODS +=cut +=head1 NAME -=head1 LICENCE -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. +=head1 SYNOPSIS -=head1 AUTHOR -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team +=head1 DESCRIPTION -=head1 CONTACT +Combines ExonScoreBuilder, ExonDirectMapper and ExonerateRunner from +Java application. -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> +=head1 METHODS =cut +package Bio::EnsEMBL::IdMapping::TranscriptScoreBuilder; use strict; use warnings; diff --git a/modules/Bio/EnsEMBL/IdentityXref.pm b/modules/Bio/EnsEMBL/IdentityXref.pm index b972506cb60b5c33dd2d3c619ee6899fe0fa8c20..f1fd18b3f808bf96c1899b28d6c9a3b9c4cd341a 100644 --- a/modules/Bio/EnsEMBL/IdentityXref.pm +++ b/modules/Bio/EnsEMBL/IdentityXref.pm @@ -1,39 +1,44 @@ -# -# -# EnsEMBL module for IdentityXref -# -# Copyright Emmanuel Mongin -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 NAME + This software is distributed under a modified Apache license. + For license details, please see -Bio::EnsEMBL::IdentiyXref + http://www.ensembl.org/info/about/code_licence.html -=head1 SYNOPSIS +=head1 CONTACT -my $xref = Bio::EnsEMBL::IdentityXref->new - (-XREF_IDENTITY => 80.4, - -ENSEMBL_IDENTITY => 90.1, - -SCORE => 90, - -EVALUE => 12, - -CIGAR_LINE => '23MD3M2I40M', - -XREF_START => 1, - -XREF_END => 68, - -ENSEMBL_START => 10, - -ENSEMBL_END => 77, - -ANALYSIS => $analysis, - -ADAPTOR => $adaptor, - -PRIMARY_ID => $primary_id, - -DBNAME => 'SwissProt'); - - + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 CONTACT + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut + +=head1 NAME + +Bio::EnsEMBL::IdentityXref + +=head1 SYNOPSIS -Post questions to the ensembl development list: <ensembl-dev@ebi.ac.uk> + my $xref = Bio::EnsEMBL::IdentityXref->new( + -XREF_IDENTITY => 80.4, + -ENSEMBL_IDENTITY => 90.1, + -SCORE => 90, + -EVALUE => 12, + -CIGAR_LINE => '23MD3M2I40M', + -XREF_START => 1, + -XREF_END => 68, + -ENSEMBL_START => 10, + -ENSEMBL_END => 77, + -ANALYSIS => $analysis, + -ADAPTOR => $adaptor, + -PRIMARY_ID => $primary_id, + -DBNAME => 'SwissProt' + ); =head1 METHODS diff --git a/modules/Bio/EnsEMBL/IndividualSlice.pm b/modules/Bio/EnsEMBL/IndividualSlice.pm index 7c19f5f2a577e59e51ed44eb38f5444dd8956d1c..16a871ad789e5200e1a1d1dd1f654b6b8975c510 100644 --- a/modules/Bio/EnsEMBL/IndividualSlice.pm +++ b/modules/Bio/EnsEMBL/IndividualSlice.pm @@ -1,52 +1,66 @@ -# -# Ensembl module for Bio::EnsEMBL::IndividualSlice -# -# -# Copyright Team Ensembl -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 NAME + This software is distributed under a modified Apache license. + For license details, please see -Bio::EnsEMBL::IndividualSlice - SubClass of the Slice. Represents the slice of the genome -for a certain individual (applying the alleles for this individual) + http://www.ensembl.org/info/about/code_licence.html -=head1 SYNOPSIS +=head1 CONTACT - $sa = $db->get_SliceAdaptor; + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. - $slice = $sa->fetch_by_region('chromosome', 'X', 1_000_000, 2_000_000); + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. - $individualSlice = $slice->get_by_Individual($individual_name); +=cut - #get the sequence from the Individual Slice: will contain IUPAC codes for SNPs and Ensembl ambiguity codes for indels - my $seq = $individualSlice->seq(); - print $seq; +=head1 NAME - #get a subSlice of the Strain - my $subSlice_individual = $individualSlice->sub_Slice(5_000,8_000,1) +Bio::EnsEMBL::IndividualSlice - SubClass of the Slice. Represents the +slice of the genome for a certain individual (applying the alleles for +this individual) - #compare two different individuals in the same Slice - my $sliceIndividual2 = $slice->get_by_Individual($individual_name2); - my $differences = $individualSlice->get_all_differences_IndividualSlice($sliceIndividual2); - foreach my $af (@{$differences}){ - print "There is a difference between $individual_name and $individual_name2 at ", $af->start,"-",$af->end, - " with allele ", $af->allele_string(),"\n"; - } +=head1 SYNOPSIS -=head1 DESCRIPTION + $sa = $db->get_SliceAdaptor; -A IndividualSlice object represents a region of a genome for a certain individual. It can be used to retrieve -sequence or features from a individual. + $slice = + $sa->fetch_by_region( 'chromosome', 'X', 1_000_000, 2_000_000 ); -=head1 CONTACT + $individualSlice = $slice->get_by_Individual($individual_name); + + # Get the sequence from the Individual Slice: will contain IUPAC codes + # for SNPs and Ensembl ambiguity codes for indels + my $seq = $individualSlice->seq(); + print $seq; + + # Get a subSlice of the Strain + my $subSlice_individual = + $individualSlice->sub_Slice( 5_000, 8_000, 1 ) + + # Compare two different individuals in the same Slice + my $sliceIndividual2 = $slice->get_by_Individual($individual_name2); + my $differences = + $individualSlice->get_all_differences_IndividualSlice( + $sliceIndividual2); -This modules is part of the Ensembl project http://www.ensembl.org + foreach my $af ( @{$differences} ) { + print + "There is a difference between $individual_name " + . "and $individual_name2 at ", + $af->start, "-", $af->end, + " with allele ", $af->allele_string(), "\n"; + } + +=head1 DESCRIPTION -Questions can be posted to the ensembl-dev mailing list: -ensembl-dev@ebi.ac.uk +A IndividualSlice object represents a region of a genome for a certain +individual. It can be used to retrieve sequence or features from a +individual. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/IndividualSliceFactory.pm b/modules/Bio/EnsEMBL/IndividualSliceFactory.pm index 3794224cf5885f3d02a915ac42c339a14db46020..6ab8a7d1d047d3704cacb7a73b881b5e04e020f6 100644 --- a/modules/Bio/EnsEMBL/IndividualSliceFactory.pm +++ b/modules/Bio/EnsEMBL/IndividualSliceFactory.pm @@ -1,3 +1,23 @@ +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut + package Bio::EnsEMBL::IndividualSliceFactory; use strict; diff --git a/modules/Bio/EnsEMBL/Intron.pm b/modules/Bio/EnsEMBL/Intron.pm index 595b40df4d2ff290d7568f53083a0b69af9b5461..a1cf4afcee43d403cd373902d1d1821771c8eea2 100644 --- a/modules/Bio/EnsEMBL/Intron.pm +++ b/modules/Bio/EnsEMBL/Intron.pm @@ -1,20 +1,28 @@ -# -# EnsEMBL module for Bio::EnsEMBL::Intron -# -# -# Copyright Ian Longden -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=pod + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME Bio::EnsEMBL::Intron - A class representing an Intron =head1 SYNOPSIS - $ex = new Bio::EnsEMBL::Intron(exon e1, exon e2); + $ex = new Bio::EnsEMBL::Intron( exon1, exon2 ); =cut diff --git a/modules/Bio/EnsEMBL/KaryotypeBand.pm b/modules/Bio/EnsEMBL/KaryotypeBand.pm index be88d7ad4abd7aad8e2bea3aa53feb607660e301..283748ab89661ba26affdb02f4163c2f6bf515fb 100644 --- a/modules/Bio/EnsEMBL/KaryotypeBand.pm +++ b/modules/Bio/EnsEMBL/KaryotypeBand.pm @@ -1,56 +1,63 @@ -# -# Ensembl module for Bio::EnsEMBL::DBSQL::KaryotypeBand -# -# -# Copyright James Stalker -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::DBSQL::KaryotypeBand + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html -use Bio::EnsEMBL::KaryotypeBand; +=head1 CONTACT -# create and populate a karyotype band (normally done by adaptor) -$kb = Bio::EnsEMBL::KaryotyeBand(-START => 1, - -END => 1_000_000, - -SLICE => $chrX_slice, - -NAME => 'q31', - -STAIN => 'gpos50', - -ADAPTOR => $db->get_KaryotypeBandAdaptor, - -DBID => 10); + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -#can tranform this band into other coord systems, just like other features -$kb = $kb->transform('supercontig'); + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -$start = $kb->start(); -$end = $kb->end(); -$seq_region = $kb->slice->seq_region_name(); +=cut -#karyotypes have internal ids as well -$kary_id = $kb->dbID(); +=head1 NAME +Bio::EnsEMBL::DBSQL::KaryotypeBand -=head1 DESCRIPTION +=head1 SYNOPSIS -KaryotypeBand objects encapsulate data pertaining to a single karyotype band. -Access these objects through a Bio::EnsEMBL::DBSQL::KaryotypeBandAdaptor. + use Bio::EnsEMBL::KaryotypeBand; -KarytoypeBand inherits from Bio::EnsEMBL::Feature and can be used just as -any other feature can be. + # Create and populate a karyotype band (normally done by adaptor) + $kb = Bio::EnsEMBL::KaryotyeBand( + -START => 1, + -END => 1_000_000, + -SLICE => $chrX_slice, + -NAME => 'q31', + -STAIN => 'gpos50', + -ADAPTOR => $db->get_KaryotypeBandAdaptor(), + -DBID => 10 + ); -=head1 AUTHOR + # Can tranform this band into other coord systems, just like other + # features + $kb = $kb->transform('supercontig'); -James Stalker + $start = $kb->start(); + $end = $kb->end(); + $seq_region = $kb->slice->seq_region_name(); -This modules is part of the Ensembl project http://www.ensembl.org + # Karyotypes have internal ids as well + $kary_id = $kb->dbID(); -=head1 CONTACT +=head1 DESCRIPTION + +KaryotypeBand objects encapsulate data pertaining to a +single karyotype band. Access these objects through a +Bio::EnsEMBL::DBSQL::KaryotypeBandAdaptor. + +KarytoypeBand inherits from Bio::EnsEMBL::Feature and can be used just +as any other feature can be. -Post questions to the EnsEMBL developer mailing list <ensembl-dev@ebi.ac.uk> +=head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/Lite/DBAdaptor.pm b/modules/Bio/EnsEMBL/Lite/DBAdaptor.pm index 04b66364f82637a0d7a8ba85c1f94a232d2736a0..2f42e9f89032ca9b81b78fc567fbd16cb9839acf 100755 --- a/modules/Bio/EnsEMBL/Lite/DBAdaptor.pm +++ b/modules/Bio/EnsEMBL/Lite/DBAdaptor.pm @@ -1,30 +1,47 @@ +=head1 LICENSE -=Head1 NAME - Bio::EnsEMBL::Lite::DBAdaptor + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut + +=head1 NAME + +Bio::EnsEMBL::Lite::DBAdaptor =head1 SYNOPSIS - $db = Bio::EnsEMBL::DBSQL::DBAdaptor->new( - -user => 'anonymous', - -dbname => 'homo_sapiens_lite_20_34c', - -host => 'ensembldb.ensembl.org', - -driver => 'mysql'); + $db = Bio::EnsEMBL::DBSQL::DBAdaptor->new( + -user => 'anonymous', + -dbname => 'homo_sapiens_lite_20_34c', + -host => 'ensembldb.ensembl.org', + -driver => 'mysql' + ); - $snp_adaptor = $db->get_SNPAdaptor(); + $snp_adaptor = $db->get_SNPAdaptor(); - @snps = @{$snp_adaptor->fetch_all_by_Slice($slice)} + @snps = @{ $snp_adaptor->fetch_all_by_Slice($slice) } =head1 DESCRIPTION -This is a database connection to the denormalised lite database. -It allows for the rapid creation of drawable objects that are too slow +This is a database connection to the denormalised lite database. It +allows for the rapid creation of drawable objects that are too slow to retreive from normalised data sources. Formerly this included many -Ensembl objects such as genes, transcript, exons, etc. but is now limited -to just SNPs. - -=head1 CONTACT - -This module is part of the Ensembl project: www.ensembl.org -Post questions to the Ensembl development list: <ensembl-dev@ebi.ac.uk> +Ensembl objects such as genes, transcript, exons, etc. but is now +limited to just SNPs. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/Lite/SNPAdaptor.pm b/modules/Bio/EnsEMBL/Lite/SNPAdaptor.pm index ae8488c7aeda2f5d47c7b7265681c3f75806f20f..8c6ac29717b0862b35b999e42c0de8a08b2ec469 100644 --- a/modules/Bio/EnsEMBL/Lite/SNPAdaptor.pm +++ b/modules/Bio/EnsEMBL/Lite/SNPAdaptor.pm @@ -1,11 +1,22 @@ -# EnsEMBL Gene reading writing adaptor for mySQL -# -# Copyright EMBL-EBI 2001 -# -# Author: Arne Stabenau -# -# Date : 15.07.2002 -# +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -14,19 +25,14 @@ MySQL Database queries to retrieve genes quickly from denormalized tables. =head1 SYNOPSIS -=head1 CONTACT - - Arne Stabenau: stabenau@ebi.ac.uk - Ewan Birney : birney@ebi.ac.uk - -=head1 APPENDIX +=head1 METHODS =cut -use strict; package Bio::EnsEMBL::Lite::SNPAdaptor; +use strict; use Bio::EnsEMBL::DBSQL::BaseAdaptor; use Bio::EnsEMBL::DBEntry; use Bio::EnsEMBL::SNP; diff --git a/modules/Bio/EnsEMBL/Map/DBSQL/DitagAdaptor.pm b/modules/Bio/EnsEMBL/Map/DBSQL/DitagAdaptor.pm index 97cccc2766799fa88b4f7db6127ede2f12cdc4f9..e1ebdf4342c1b9d571ba22d51729ca037476cfe6 100644 --- a/modules/Bio/EnsEMBL/Map/DBSQL/DitagAdaptor.pm +++ b/modules/Bio/EnsEMBL/Map/DBSQL/DitagAdaptor.pm @@ -1,12 +1,22 @@ -# EnsEMBL module for DitagAdaptor -# -# Copyright EMBL-EBI/Wellcome Trust Sanger Center 2006 -# -# You may distribute this module under the same terms as perl itself -# -# Cared for by EnsEMBL (ensembl-dev@ebi.ac.uk) +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -14,13 +24,15 @@ Bio::EnsEMBL::Map::DBSQL::DitagAdaptor =head1 SYNOPSIS -my $ditagadaptor = $db->get_DitagAdaptor(); -my @ditags = @{ $ditagadaptor->fetch_by_type("ZZ11") }; + my $ditagadaptor = $db->get_DitagAdaptor(); + my @ditags = @{ $ditagadaptor->fetch_by_type("ZZ11") }; =head1 DESCRIPTION Provides database interaction for the Bio::EnsEMBL::Map::Ditag object +=head1 METHODS + =cut package Bio::EnsEMBL::Map::DBSQL::DitagAdaptor; diff --git a/modules/Bio/EnsEMBL/Map/DBSQL/DitagFeatureAdaptor.pm b/modules/Bio/EnsEMBL/Map/DBSQL/DitagFeatureAdaptor.pm index 17aa649fd16e946d6ceb8da63f13dde0dcca1ce1..43ff4735a6f2e0d971e578935f070a2568331971 100644 --- a/modules/Bio/EnsEMBL/Map/DBSQL/DitagFeatureAdaptor.pm +++ b/modules/Bio/EnsEMBL/Map/DBSQL/DitagFeatureAdaptor.pm @@ -1,12 +1,22 @@ -# EnsEMBL module for DitagFeatureAdaptor -# -# Copyright EMBL-EBI/Wellcome Trust Sanger Center 2006 -# -# You may distribute this module under the same terms as perl itself -# -# Cared for by EnsEMBL (ensembl-dev@ebi.ac.uk) +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -14,18 +24,23 @@ Bio::EnsEMBL::Map::DBSQL::DitagFeatureAdaptor =head1 SYNOPSIS -my $dfa = $db->get_DitagFeatureAdaptor; -my $ditagFeatures = $dfa->fetch_all_by_Slice($slice, "SME005"); + my $dfa = $db->get_DitagFeatureAdaptor; + my $ditagFeatures = $dfa->fetch_all_by_Slice( $slice, "SME005" ); -foreach my $ditagFeature (@$ditagFeatures){ - print $ditagFeature->ditag_id . " " . - $ditagFeature->slice . " " . $ditagFeature->start . "-" . - $ditagFeature->end . " " . $ditagFeature->strand; -} + foreach my $ditagFeature (@$ditagFeatures) { + print $ditagFeature->ditag_id . " " + . $ditagFeature->slice . " " + . $ditagFeature->start . "-" + . $ditagFeature->end . " " + . $ditagFeature->strand; + } =head1 DESCRIPTION -Provides database interaction for the Bio::EnsEMBL::Map::DitagFeature object +Provides database interaction for the Bio::EnsEMBL::Map::DitagFeature +object + +=head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/Map/DBSQL/MarkerAdaptor.pm b/modules/Bio/EnsEMBL/Map/DBSQL/MarkerAdaptor.pm index 4a38a112b1f41101e2f3dd70604b9c9f42d09a83..2dcb8d5561123927beb1f44335e663e74d28de6c 100644 --- a/modules/Bio/EnsEMBL/Map/DBSQL/MarkerAdaptor.pm +++ b/modules/Bio/EnsEMBL/Map/DBSQL/MarkerAdaptor.pm @@ -1,11 +1,22 @@ -# EnsEMBL module for MarkerAdaptor -# Copyright EMBL-EBI/Sanger center 2002 -# -# -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -13,11 +24,12 @@ Bio::EnsEMBL::Map::DBSQL::MarkerAdaptor =head1 SYNOPSIS - =head1 DESCRIPTION Provides database interaction for the Bio::EnsEMBL::Map::Marker object +=head1 METHODS + =cut package Bio::EnsEMBL::Map::DBSQL::MarkerAdaptor; diff --git a/modules/Bio/EnsEMBL/Map/DBSQL/MarkerFeatureAdaptor.pm b/modules/Bio/EnsEMBL/Map/DBSQL/MarkerFeatureAdaptor.pm index 7a65ec03a4930de736584869152160592cda6e3b..fc124111fc29c223736e33d676098a9e9372ecb7 100644 --- a/modules/Bio/EnsEMBL/Map/DBSQL/MarkerFeatureAdaptor.pm +++ b/modules/Bio/EnsEMBL/Map/DBSQL/MarkerFeatureAdaptor.pm @@ -1,11 +1,22 @@ -# EnsEMBL module for MarkerFeatureAdaptor -# Copyright EMBL-EBI/Sanger center 2003 -# -# -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -13,15 +24,15 @@ Bio::EnsEMBL::Map::DBSQL::MarkerFeatureAdaptor =head1 SYNOPSIS - =head1 DESCRIPTION This object is responisble for all database interaction involving marker features including the fetching and storing of marker features. -The bulk of this objects methods are inherited from +The bulk of this objects' methods are inherited from Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor +=head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/Map/DBSQL/QtlAdaptor.pm b/modules/Bio/EnsEMBL/Map/DBSQL/QtlAdaptor.pm index 7373c1fecb7363e8e9ba46cb0e12768c151921c8..610ae273aac21f713d4fcde36352279705d070f3 100644 --- a/modules/Bio/EnsEMBL/Map/DBSQL/QtlAdaptor.pm +++ b/modules/Bio/EnsEMBL/Map/DBSQL/QtlAdaptor.pm @@ -1,11 +1,22 @@ -# EnsEMBL module for QtlAdaptor -# Copyright EMBL-EBI/Sanger center 2003 -# -# -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -13,12 +24,11 @@ Bio::EnsEMBL::Map::DBSQL::QtlAdaptor =head1 SYNOPSIS - =head1 DESCRIPTION -This module is responsible of retrieving Qtl s -from the database. +This module is responsible of retrieving QTLs from the database. +=head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/Map/DBSQL/QtlFeatureAdaptor.pm b/modules/Bio/EnsEMBL/Map/DBSQL/QtlFeatureAdaptor.pm index 92363ae1bb51174b26a7874dc2b4cab8fff26092..42ed0b55f1256cbe1cdb4ca7e42aeedad93d815e 100644 --- a/modules/Bio/EnsEMBL/Map/DBSQL/QtlFeatureAdaptor.pm +++ b/modules/Bio/EnsEMBL/Map/DBSQL/QtlFeatureAdaptor.pm @@ -1,11 +1,22 @@ -# EnsEMBL module for QtlFeatureAdaptor -# Copyright EMBL-EBI/Sanger center 2003 -# -# -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -16,12 +27,13 @@ Bio::EnsEMBL::Map::DBSQL::QtlFeatureAdaptor =head1 DESCRIPTION -This module is responsible of retrieving QtlFeatures (and their associated Qtls) -from the database. +This module is responsible of retrieving QtlFeatures (and their +associated Qtls) from the database. -The bulk of this objects methods are inherited from +The bulk of this objects' methods are inherited from Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor +=head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/Map/Ditag.pm b/modules/Bio/EnsEMBL/Map/Ditag.pm index a77038ac182f6a627c48f05eae1767aa3f16294b..fa3ae200de778e4e8bbc93c0e6967db4aa497de3 100644 --- a/modules/Bio/EnsEMBL/Map/Ditag.pm +++ b/modules/Bio/EnsEMBL/Map/Ditag.pm @@ -1,12 +1,22 @@ -# EnsEMBL module for Ditags -# -# Copyright EMBL-EBI/Wellcome Trust Sanger Center 2006 -# -# You may distribute this module under the same terms as perl itself -# -# Cared for by EnsEMBL (ensembl-dev@ebi.ac.uk) +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -14,21 +24,23 @@ Bio::EnsEMBL::Map::Ditag =head1 SYNOPSIS - my $feature = Bio::EnsEMBL::Map::Ditag->new ( - -dbID => $tag_id, - -name => $name, - -type => $type, - -tag_count => $tag_count, - -sequence => $sequence, - -adaptor => $dbAdaptor - ); + my $feature = Bio::EnsEMBL::Map::Ditag->new( + -dbID => $tag_id, + -name => $name, + -type => $type, + -tag_count => $tag_count, + -sequence => $sequence, + -adaptor => $dbAdaptor + ); =head1 DESCRIPTION -Represents an unmapped ditag object in the EnsEMBL database. -Corresponds to original tag containing the full sequence. This can be a single -piece of sequence like CAGE tags or a ditag with concatenated sequence from -5' and 3' end like GIS or GSC tags. +Represents an unmapped ditag object in the EnsEMBL database. +Corresponds to original tag containing the full sequence. This can be +a single piece of sequence like CAGE tags or a ditag with concatenated +sequence from 5' and 3' end like GIS or GSC tags. + +=head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/Map/DitagFeature.pm b/modules/Bio/EnsEMBL/Map/DitagFeature.pm index 8a35951e94d787808940bcb2c357a114ba09ecd0..ddb0c4198fdd8e0c69fb7a46b5e44c0e0874a7e2 100644 --- a/modules/Bio/EnsEMBL/Map/DitagFeature.pm +++ b/modules/Bio/EnsEMBL/Map/DitagFeature.pm @@ -1,11 +1,22 @@ -# EnsEMBL module for DitagFeatures -# -# Copyright EMBL-EBI/Wellcome Trust Sanger Institute 2006 -# -# You may distribute this module under the same terms as perl itself -# -# Cared for by EnsEMBL (ensembl-dev@ebi.ac.uk) +=head1 LICENSE + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -13,27 +24,30 @@ Bio::EnsEMBL::Map::DitagFeature =head1 SYNOPSIS - my $feature = Bio::EnsEMBL::Map::DitagFeature->new( - -slice => $slice, - -start => $qstart, - -end => $qend, - -strand => $qstrand, - -hit_start => $tstart, - -hit_end => $tend, - -hit_strand => $tstrand, - -ditag_id => $ditag_id, - -ditag_side => $ditag_side, - -ditag_pair_id => $ditag_pair_id, - -cigar_line => $cigar_line, - -analysis => $analysis, - ); +my $feature = Bio::EnsEMBL::Map::DitagFeature->new( + -slice => $slice, + -start => $qstart, + -end => $qend, + -strand => $qstrand, + -hit_start => $tstart, + -hit_end => $tend, + -hit_strand => $tstrand, + -ditag_id => $ditag_id, + -ditag_side => $ditag_side, + -ditag_pair_id => $ditag_pair_id, + -cigar_line => $cigar_line, + -analysis => $analysis, +); =head1 DESCRIPTION -Represents a mapped ditag object in the EnsEMBL database. -These are the original tags separated into start ("L") and end ("R") parts if applicable, -successfully aligned to the genome. Two DitagFeatures usually relate to one parent Ditag. -Alternatively there are CAGE tags e.g. which only have a 5\'tag ("F"). +Represents a mapped ditag object in the EnsEMBL database. These are +the original tags separated into start ("L") and end ("R") parts if +applicable, successfully aligned to the genome. Two DitagFeatures +usually relate to one parent Ditag. Alternatively there are CAGE tags +e.g. which only have a 5\'tag ("F"). + +=head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/Map/MapLocation.pm b/modules/Bio/EnsEMBL/Map/MapLocation.pm index 51292d07abc8a94a90ec672e34f338a1c9938bb6..b5db591e2db268fb195771fdac676cf37dad4779 100644 --- a/modules/Bio/EnsEMBL/Map/MapLocation.pm +++ b/modules/Bio/EnsEMBL/Map/MapLocation.pm @@ -1,11 +1,22 @@ -# EnsEMBL module for MapLocation -# Copyright EMBL-EBI/Sanger center 2003 -# -# -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -13,10 +24,12 @@ Bio::EnsEMBL::Map::MapLocation =head1 SYNOPSIS - =head1 DESCRIPTION -Represents a location on a genetic map, yac map, radition hybrid map, etc. +Represents a location on a genetic map, yac map, radition hybrid map, +etc. + +=head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/Map/Marker.pm b/modules/Bio/EnsEMBL/Map/Marker.pm index 426f822a072db8baa5e0ab8c4bba78f471fd48ee..f6e4bb93360d88799c50e5022e3fffaa392587a9 100644 --- a/modules/Bio/EnsEMBL/Map/Marker.pm +++ b/modules/Bio/EnsEMBL/Map/Marker.pm @@ -1,11 +1,22 @@ -# EnsEMBL module for Marker -# Copyright EMBL-EBI/Sanger center 2003 -# -# -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -13,12 +24,13 @@ Bio::EnsEMBL::Map::Marker =head1 SYNOPSIS - =head1 DESCRIPTION -Represents a marker in the EnsEMBL database. The marker object is unpositioned -on the genome. Markers which are positioned are represented by the -MarkerFeature object. +Represents a marker in the EnsEMBL database. The marker object +is unpositioned on the genome. Markers which are positioned are +represented by the MarkerFeature object. + +=head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/Map/MarkerFeature.pm b/modules/Bio/EnsEMBL/Map/MarkerFeature.pm index 26d3248cc1af777a7a161bed31491c415ba40c78..1483ab335473d9796b931907c020f531ebc36ebb 100644 --- a/modules/Bio/EnsEMBL/Map/MarkerFeature.pm +++ b/modules/Bio/EnsEMBL/Map/MarkerFeature.pm @@ -1,11 +1,22 @@ -# EnsEMBL module for MarkerFeature -# Copyright EMBL-EBI/Sanger center 2002 -# -# -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -13,12 +24,13 @@ Bio::EnsEMBL::Map::MarkerFeature =head1 SYNOPSIS - =head1 DESCRIPTION -Represents a marker feature in the EnsEMBL database. A marker feature is a -marker which has been mapped to the genome by ePCR. Each marker has one -marker feature per mapped location. +Represents a marker feature in the EnsEMBL database. A marker feature +is a marker which has been mapped to the genome by ePCR. Each marker +has one marker feature per mapped location. + +=head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/Map/MarkerSynonym.pm b/modules/Bio/EnsEMBL/Map/MarkerSynonym.pm index c6f073e81f0fd82a92dbcdd33f6a975f3ab2158b..1897fbeff07f63b72c9d0741ae40abfdb9cf96b9 100644 --- a/modules/Bio/EnsEMBL/Map/MarkerSynonym.pm +++ b/modules/Bio/EnsEMBL/Map/MarkerSynonym.pm @@ -1,11 +1,22 @@ -# EnsEMBL module for MarkerSynonym -# Copyright EMBL-EBI/Sanger center 2002 -# -# -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -13,11 +24,12 @@ Bio::EnsEMBL::Map::MarkerSynonym =head1 SYNOPSIS - =head1 DESCRIPTION Represents an alias for a marker in the EnsEMBL database. +=head1 METHODS + =cut package Bio::EnsEMBL::Map::MarkerSynonym; diff --git a/modules/Bio/EnsEMBL/Map/Qtl.pm b/modules/Bio/EnsEMBL/Map/Qtl.pm index dbdeeb58f9a1e8e6a3788645101615ed484a1bf0..3935fc95a85d2a1bc5e6599ad6c46087f371fcea 100644 --- a/modules/Bio/EnsEMBL/Map/Qtl.pm +++ b/modules/Bio/EnsEMBL/Map/Qtl.pm @@ -1,34 +1,38 @@ -# EnsEMBL module for Qtl -# Copyright EMBL-EBI/Sanger center 2003 -# -# -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 NAME + This software is distributed under a modified Apache license. + For license details, please see -Bio::EnsEMBL::Map::Qtl + http://www.ensembl.org/info/about/code_licence.html -=head1 SYNOPSIS +=head1 CONTACT + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 AUTHOR + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -Arne Stabenau stabenau@ebi.ac.uk +=cut -=head1 CONTACT +=head1 NAME + +Bio::EnsEMBL::Map::Qtl -ensembl-dev@ebi.ac.uk +=head1 SYNOPSIS =head1 DESCRIPTION -Represents a Qtl in the EnsEMBL database. A quantitative trait locus is +Represents a Qtl in the EnsEMBL database. A quantitative trait locus is defined by three markers, two flanking and one peak (optional) marker. Its a region (or more often a group of regions) which is likely to affect the phenotype (trait) described in this Qtl. - + +=head1 METHODS + =cut package Bio::EnsEMBL::Map::Qtl; diff --git a/modules/Bio/EnsEMBL/Map/QtlFeature.pm b/modules/Bio/EnsEMBL/Map/QtlFeature.pm index 7678c53d08bc9af3f8cc44885cef780ff11f52f2..6e27088734ecea34c1df572de17e820545604dc2 100644 --- a/modules/Bio/EnsEMBL/Map/QtlFeature.pm +++ b/modules/Bio/EnsEMBL/Map/QtlFeature.pm @@ -1,32 +1,37 @@ -# EnsEMBL module for QtlFeature -# Copyright EMBL-EBI/Sanger center 2003 -# -# -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 NAME + This software is distributed under a modified Apache license. + For license details, please see -Bio::EnsEMBL::Map::QtlFeature + http://www.ensembl.org/info/about/code_licence.html -=head1 SYNOPSIS +=head1 CONTACT + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 AUTHOR + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -Arne Stabenau stabenau@ebi.ac.uk +=cut -=head1 CONTACT +=head1 NAME -ensembl-dev@ebi.ac.uk +Bio::EnsEMBL::Map::QtlFeature + +=head1 SYNOPSIS =head1 DESCRIPTION -Represents a QtlFeature in the EnsEMBL database. QtlFeatures are generally very -long and its not clear wether a representation in Contig coordinates -actually makes sense. In the database they will have chromosomal coordinates. +Represents a QtlFeature in the EnsEMBL database. QtlFeatures are +generally very long and its not clear wether a representation in Contig +coordinates actually makes sense. In the database they will have +chromosomal coordinates. + +=head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/MappedSlice.pm b/modules/Bio/EnsEMBL/MappedSlice.pm index eba92bdb6fba11c376521dabe7f6d0bc3742c5f7..91bdf7ba4600044ac452872ef64d9ce0ce146cd9 100644 --- a/modules/Bio/EnsEMBL/MappedSlice.pm +++ b/modules/Bio/EnsEMBL/MappedSlice.pm @@ -1,4 +1,22 @@ -package Bio::EnsEMBL::MappedSlice; +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -6,45 +24,44 @@ Bio::EnsEMBL::MappedSlice - an object representing a mapped slice =head1 SYNOPSIS -# get a reference slice -my $slice = $slice_adaptor->fetch_by_region('chromosome', 14, 900000, 950000); + # get a reference slice + my $slice = + $slice_adaptor->fetch_by_region( 'chromosome', 14, 900000, 950000 ); -# create MappedSliceContainer based on the reference slice -my $msc = Bio::EnsEMBL::MappedSliceContainer->new( - -SLICE => $slice -); + # create MappedSliceContainer based on the reference slice + my $msc = Bio::EnsEMBL::MappedSliceContainer->new( -SLICE => $slice ); -# set the adaptor for fetching AssemblySlices -my $asa = $slice->adaptor->db->get_AssemblySliceAdaptor; -$msc->set_AssemblySliceAdaptor($asa); + # set the adaptor for fetching AssemblySlices + my $asa = $slice->adaptor->db->get_AssemblySliceAdaptor; + $msc->set_AssemblySliceAdaptor($asa); -# add an AssemblySlice to your MappedSliceContainer -$msc->attach_AssemblySlice('NCBIM36'); + # add an AssemblySlice to your MappedSliceContainer + $msc->attach_AssemblySlice('NCBIM36'); -foreach my $mapped_slice (@{ $msc->get_all_MappedSlices }) { - print $mapped_slice->name, "\n"; - - foreach my $sf (@{ $mapped_slice->get_all_SimpleFeatures }) { - print " ", &to_string($sf), "\n"; + foreach my $mapped_slice ( @{ $msc->get_all_MappedSlices } ) { + print $mapped_slice->name, "\n"; + + foreach my $sf ( @{ $mapped_slice->get_all_SimpleFeatures } ) { + print " ", &to_string($sf), "\n"; + } } -} =head1 DESCRIPTION -NOTE: this code is under development and not fully functional nor tested yet. -Use only for development. +NOTE: this code is under development and not fully functional nor tested +yet. Use only for development. -This object represents a mapped slice, i.e. a slice that's attached to a -reference slice and a mapper to convert coordinates to/from the reference. The -attachment is done via a MappedSliceContainer which has the reference slice and -the "container slice" defining the common coordinate system for all -MappedSlices. +This object represents a mapped slice, i.e. a slice that's attached +to a reference slice and a mapper to convert coordinates to/from the +reference. The attachment is done via a MappedSliceContainer which +has the reference slice and the "container slice" defining the common +coordinate system for all MappedSlices. -A MappedSlice is supposed to behave as close to a Bio::EnsEMBL::Slice as -possible. Most Slice methods are implemented in MappedSlice and will return an -equivalent value to what Slice does. There are some exceptions of unimplemented -methods, either because there is no useful equivalent for a MappedSlice to do, -or they are too complicated. +A MappedSlice is supposed to behave as close to a Bio::EnsEMBL::Slice +as possible. Most Slice methods are implemented in MappedSlice and will +return an equivalent value to what Slice does. There are some exceptions +of unimplemented methods, either because there is no useful equivalent +for a MappedSlice to do, or they are too complicated. Not supported Bio::EnsEMBL::Slice methods: @@ -64,62 +81,49 @@ Not currently supported but maybe should/could: get_by_strain invert -Internally, a MappedSlice is a collection of Bio::EnsEMBL::Slices and associated -Bio::EnsEMBL::Mappers which map the slices to the common container coordinate -system. +Internally, a MappedSlice is a collection of Bio::EnsEMBL::Slices and +associated Bio::EnsEMBL::Mappers which map the slices to the common +container coordinate system. -MappedSlices are usually created and attached to a MappedSliceContainer by an -adaptor/factory. +MappedSlices are usually created and attached to a MappedSliceContainer +by an adaptor/factory. =head1 METHODS -new -add_Slice_Mapper_pair -get_all_Slice_Mapper_pairs -adaptor -container -name -seq_region_name -start -end -strand -length -seq_region_length -centrepoint -coord_system -coord_system_name -is_toplevel -seq (not implemented yet) -subseq (not implemented yet) -get_repeatmasked_seq (not implemented yet) -sub_MappedSlice (not implemented yet) -project (not implemented yet) - -=head1 REALTED MODULES - -Bio::EnsEMBL::MappedSlice -Bio::EnsEMBL::DBSQL::AssemblySliceAdaptor -Bio::EnsEMBL::Compara::AlignSlice -Bio::EnsEMBL::Compara::AlignSlice::Slice -Bio::EnsEMBL::AlignStrainSlice -Bio::EnsEMBL::StrainSlice - -=head1 LICENCE - -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. - -=head1 AUTHOR - -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team - -=head1 CONTACT - -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> + new + add_Slice_Mapper_pair + get_all_Slice_Mapper_pairs + adaptor + container + name + seq_region_name + start + end + strand + length + seq_region_length + centrepoint + coord_system + coord_system_name + is_toplevel + seq (not implemented yet) + subseq (not implemented yet) + get_repeatmasked_seq (not implemented yet) + sub_MappedSlice (not implemented yet) + project (not implemented yet) + +=head1 RELATED MODULES + + Bio::EnsEMBL::MappedSlice + Bio::EnsEMBL::DBSQL::AssemblySliceAdaptor + Bio::EnsEMBL::Compara::AlignSlice + Bio::EnsEMBL::Compara::AlignSlice::Slice + Bio::EnsEMBL::AlignStrainSlice + Bio::EnsEMBL::StrainSlice =cut +package Bio::EnsEMBL::MappedSlice; use strict; use warnings; diff --git a/modules/Bio/EnsEMBL/MappedSliceContainer.pm b/modules/Bio/EnsEMBL/MappedSliceContainer.pm index 550facc6c57d7dfb9b50545ac8766d53a3d1aa10..19a2d500e7381d1b1bf203a41f1d94c006bf9644 100644 --- a/modules/Bio/EnsEMBL/MappedSliceContainer.pm +++ b/modules/Bio/EnsEMBL/MappedSliceContainer.pm @@ -1,4 +1,22 @@ -package Bio::EnsEMBL::MappedSliceContainer; +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -6,100 +24,88 @@ Bio::EnsEMBL::MappedSliceContainer - container for mapped slices =head1 SYNOPSIS -# get a reference slice -my $slice = $slice_adaptor->fetch_by_region('chromosome', 14, 900000, 950000); + # get a reference slice + my $slice = + $slice_adaptor->fetch_by_region( 'chromosome', 14, 900000, 950000 ); -# create MappedSliceContainer based on the reference slice -my $msc = Bio::EnsEMBL::MappedSliceContainer->new( - -SLICE => $slice -); + # create MappedSliceContainer based on the reference slice + my $msc = Bio::EnsEMBL::MappedSliceContainer->new( -SLICE => $slice ); -# set the adaptor for fetching AssemblySlices -my $asa = $slice->adaptor->db->get_AssemblySliceAdaptor; -$msc->set_AssemblySliceAdaptor($asa); + # set the adaptor for fetching AssemblySlices + my $asa = $slice->adaptor->db->get_AssemblySliceAdaptor; + $msc->set_AssemblySliceAdaptor($asa); -# add an AssemblySlice to your MappedSliceContainer -$msc->attach_AssemblySlice('NCBIM36'); + # add an AssemblySlice to your MappedSliceContainer + $msc->attach_AssemblySlice('NCBIM36'); -foreach my $mapped_slice (@{ $msc->get_all_MappedSlices }) { - print $mapped_slice->name, "\n"; - - foreach my $sf (@{ $mapped_slice->get_all_SimpleFeatures }) { - print " ", &to_string($sf), "\n"; + foreach my $mapped_slice ( @{ $msc->get_all_MappedSlices } ) { + print $mapped_slice->name, "\n"; + + foreach my $sf ( @{ $mapped_slice->get_all_SimpleFeatures } ) { + print " ", &to_string($sf), "\n"; + } } -} =head1 DESCRIPTION -NOTE: this code is under development and not fully functional nor tested yet. -Use only for development. +NOTE: this code is under development and not fully functional nor tested +yet. Use only for development. A MappedSliceContainer holds a collection of one or more -Bio::EnsEMBL::MappedSlices. It is based on a real reference slice and contains -an artificial "container slice" which defines the common coordinate system used -by all attached MappedSlices. There is also a mapper to convert coordinates -between the reference and the container slice. - -Attaching MappedSlices to the container is delegated to adaptors (which act more -as object factories than as traditional Ensembl db adaptors). The adaptors will -also modify the container slice and associated mapper if required. This design -allows us to keep the MappedSliceContainer generic and encapsulate the data -source specific code in the adaptor/factory module. +Bio::EnsEMBL::MappedSlices. It is based on a real reference slice and +contains an artificial "container slice" which defines the common +coordinate system used by all attached MappedSlices. There is also a +mapper to convert coordinates between the reference and the container +slice. + +Attaching MappedSlices to the container is delegated to adaptors +(which act more as object factories than as traditional Ensembl db +adaptors). The adaptors will also modify the container slice and +associated mapper if required. This design allows us to keep the +MappedSliceContainer generic and encapsulate the data source specific +code in the adaptor/factory module. In the simplest use case, all required MappedSlices are attached to the -MappedSliceContainer at once (by a single call to the adaptor). This object -should also allow "hot-plugging" of MappedSlices (e.g. attach a MappedSlice -representing a strain to a container that already contains a multi-species -alignment). The methods for attaching new MappedSlice will be responsable to -perform the necessary adjustments to coordinates and mapper on the existing -MappedSlices. +MappedSliceContainer at once (by a single call to the adaptor). This +object should also allow "hot-plugging" of MappedSlices (e.g. attach a +MappedSlice representing a strain to a container that already contains a +multi-species alignment). The methods for attaching new MappedSlice will +be responsable to perform the necessary adjustments to coordinates and +mapper on the existing MappedSlices. =head1 METHODS -new -set_adaptor -get_adaptor -set_AssemblySliceAdaptor -get_AssemblySliceAdaptor -set_AlignSliceAdaptor (not implemented yet) -get_AlignSliceAdaptor (not implemented yet) -set_StrainSliceAdaptor (not implemented yet) -get_StrainSliceAdaptor (not implemented yet) -attach_AssemblySlice -attach_AlignSlice (not implemented yet) -attach_StrainSlice (not implemented yet) -get_all_MappedSlices -sub_MappedSliceContainer (not implemented yet) -ref_slice -container_slice -mapper -expanded - -=head1 REALTED MODULES - -Bio::EnsEMBL::MappedSlice -Bio::EnsEMBL::DBSQL::AssemblySliceAdaptor -Bio::EnsEMBL::Compara::AlignSlice -Bio::EnsEMBL::Compara::AlignSlice::Slice -Bio::EnsEMBL::AlignStrainSlice -Bio::EnsEMBL::StrainSlice - -=head1 LICENCE - -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. - -=head1 AUTHOR - -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team - -=head1 CONTACT - -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> + new + set_adaptor + get_adaptor + set_AssemblySliceAdaptor + get_AssemblySliceAdaptor + set_AlignSliceAdaptor (not implemented yet) + get_AlignSliceAdaptor (not implemented yet) + set_StrainSliceAdaptor (not implemented yet) + get_StrainSliceAdaptor (not implemented yet) + attach_AssemblySlice + attach_AlignSlice (not implemented yet) + attach_StrainSlice (not implemented yet) + get_all_MappedSlices + sub_MappedSliceContainer (not implemented yet) + ref_slice + container_slice + mapper + expanded + +=head1 RELATED MODULES + + Bio::EnsEMBL::MappedSlice + Bio::EnsEMBL::DBSQL::AssemblySliceAdaptor + Bio::EnsEMBL::Compara::AlignSlice + Bio::EnsEMBL::Compara::AlignSlice::Slice + Bio::EnsEMBL::AlignStrainSlice + Bio::EnsEMBL::StrainSlice =cut +package Bio::EnsEMBL::MappedSliceContainer; use strict; use warnings; diff --git a/modules/Bio/EnsEMBL/Mapper.pm b/modules/Bio/EnsEMBL/Mapper.pm index 329f07d13a876bbc85c63babc3ff9bea1f709fdb..94395233614e164cfb1c755d4f68544a54be3143 100644 --- a/modules/Bio/EnsEMBL/Mapper.pm +++ b/modules/Bio/EnsEMBL/Mapper.pm @@ -1,13 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::Mapper -# -# Written by Ewan Birney <birney@ebi.ac.uk> -# -# Copyright GRL/EBI -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html -# POD documentation - main docs before the code +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -15,30 +24,24 @@ Bio::EnsEMBL::Mapper =head1 SYNOPSIS - $map = Bio::EnsEMBL::Mapper->new('rawcontig', 'chromosome'); + $map = Bio::EnsEMBL::Mapper->new( 'rawcontig', 'chromosome' ); # add a coodinate mapping - supply two pairs or coordinates $map->add_map_coordinates( $contig_id, $contig_start, $contig_end, $contig_ori, - $chr_name, chr_start, $chr_end + $chr_name, chr_start, $chr_end ); # map from one coordinate system to another - my @coordlist = $mapper->map_coordinates(627012, 2, 5, -1, "rawcontig"); + my @coordlist = + $mapper->map_coordinates( 627012, 2, 5, -1, "rawcontig" ); =head1 DESCRIPTION -Generic mapper to provide coordinate transforms between two -disjoint coordinate systems. This mapper is intended to be -'context neutral' - in that it does not contain any code -relating to any particular coordinate system. This is -provided in, for example, Bio::EnsEMBL::AssemblyMapper. - -=head1 AUTHOR - Ewan Birney - -This module is part of the Ensembl project http://www.ensembl.org - -Post general queries to B<ensembl-dev@ebi.ac.uk> +Generic mapper to provide coordinate transforms between two disjoint +coordinate systems. This mapper is intended to be 'context neutral' - in +that it does not contain any code relating to any particular coordinate +system. This is provided in, for example, Bio::EnsEMBL::AssemblyMapper. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/Mapper/Coordinate.pm b/modules/Bio/EnsEMBL/Mapper/Coordinate.pm index df42bc860fc9510eb99cf5dca0d2aab00f240ffb..59e8b81e13dce0162458a268c329a2b91afed45e 100644 --- a/modules/Bio/EnsEMBL/Mapper/Coordinate.pm +++ b/modules/Bio/EnsEMBL/Mapper/Coordinate.pm @@ -1,14 +1,22 @@ +=head1 LICENSE -# -# Ensembl module for Bio::EnsEMBL::MapperCoordinate -# -# Written by Ewan Birney <birney@ebi.ac.uk> -# -# Copyright GRL and EBI -# -# You may distribute this module under the same terms as perl itself + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -# POD documentation - main docs before the code + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -18,14 +26,8 @@ Bio::EnsEMBL::Mapper::Coordinate =head1 DESCRIPTION -Representation of a mapped region in a sequence; returned from -Mapper.pm when the target region maps on to valid sequence. - -=head1 CONTACT - -This module is part of the Ensembl project http://www.ensembl.org - -Post general queries to B<ensembl-dev@ebi.ac.uk> +Representation of a mapped region in a sequence; returned from Mapper.pm +when the target region maps on to valid sequence. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/Mapper/Gap.pm b/modules/Bio/EnsEMBL/Mapper/Gap.pm index 87f324864d62bfe0cd87ff80082e4279075da5c9..0dae6e208468c7e57d90d6a9ac9a34b8cb5b28ff 100644 --- a/modules/Bio/EnsEMBL/Mapper/Gap.pm +++ b/modules/Bio/EnsEMBL/Mapper/Gap.pm @@ -1,13 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::Mapper::Gap -# -# Written by Ewan Birney <birney@ebi.ac.uk> -# -# Copyright GRL and EBI -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -17,14 +26,8 @@ Bio::EnsEMBL::Mapper::Gap =head1 DESCRIPTION -Representation of a gap in a sequence; returned from -Mapper.pm when the target region is in a gap. - -=head1 AUTHOR - Ewan Birney - -This modules is part of the Ensembl project http://www.ensembl.org - -Post general queries to B<ensembl-dev@ebi.ac.uk> +Representation of a gap in a sequence; returned from Mapper.pm when the +target region is in a gap. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/Mapper/IndelCoordinate.pm b/modules/Bio/EnsEMBL/Mapper/IndelCoordinate.pm index 273d3f64e03e0f4a257e85159f17d7572867f781..767d2afc61799d06d4ad2ab1830727fa45e60961 100644 --- a/modules/Bio/EnsEMBL/Mapper/IndelCoordinate.pm +++ b/modules/Bio/EnsEMBL/Mapper/IndelCoordinate.pm @@ -1,13 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::Mapper::IndelCoordinate -# -# Written by Ewan Birney <birney@ebi.ac.uk> -# -# Copyright GRL and EBI -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -17,14 +26,8 @@ Bio::EnsEMBL::Mapper::IndelCoordinate =head1 DESCRIPTION -Representation of a indel in a sequence; returned from -Mapper.pm when the target region is in a deletion. - -=head1 AUTHOR - Ewan Birney - -This modules is part of the Ensembl project http://www.ensembl.org - -Post general queries to B<ensembl-dev@ebi.ac.uk> +Representation of a indel in a sequence; returned from Mapper.pm when +the target region is in a deletion. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/Mapper/IndelPair.pm b/modules/Bio/EnsEMBL/Mapper/IndelPair.pm index 8c35b4fb518a624982be3a5b5d2e0d80fca4acdc..b8b7b2890dfc3a35527bf2732338e90edd96ba32 100644 --- a/modules/Bio/EnsEMBL/Mapper/IndelPair.pm +++ b/modules/Bio/EnsEMBL/Mapper/IndelPair.pm @@ -1,13 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::Mapper::IndelPair -# -# Written by Ewan Birney <birney@ebi.ac.uk> -# -# Copyright GRL and EBI -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -17,16 +26,9 @@ Bio::EnsEMBL::Mapper::IndelPair =head1 DESCRIPTION -Two regions mapped between different coordinate systems are -each represented by a Bio::EnsEMBL::Mapper::Unit and joined -together as a Bio::EnsEMBL::Mapper::Pair, when one of the -regions is an indel. - -=head1 AUTHOR - Ewan Birney - -This module is part of the Ensembl project http://www.ensembl.org - -Post general queries to B<ensembl-dev@ebi.ac.uk> +Two regions mapped between different coordinate systems are each +represented by a Bio::EnsEMBL::Mapper::Unit and joined together as a +Bio::EnsEMBL::Mapper::Pair, when one of the regions is an indel. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/Mapper/Pair.pm b/modules/Bio/EnsEMBL/Mapper/Pair.pm index 1020046033fddec8e541e3675324254bb8d41f72..6a76d315eb880f9164d0739427a9b6d9e59860d0 100644 --- a/modules/Bio/EnsEMBL/Mapper/Pair.pm +++ b/modules/Bio/EnsEMBL/Mapper/Pair.pm @@ -1,14 +1,22 @@ +=head1 LICENSE -# -# Ensembl module for Bio::EnsEMBL::Mapper::Pair -# -# Written by Ewan Birney <birney@ebi.ac.uk> -# -# Copyright GRL and EBI -# -# You may distribute this module under the same terms as perl itself + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -# POD documentation - main docs before the code + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -18,15 +26,9 @@ Bio::EnsEMBL::Mapper::Pair =head1 DESCRIPTION -Two regions mapped between different coordinate systems are -each represented by a Bio::EnsEMBL::Mapper::Unit and joined -together as a Bio::EnsEMBL::Mapper::Pair. - -=head1 AUTHOR - Ewan Birney - -This module is part of the Ensembl project http://www.ensembl.org - -Post general queries to B<ensembl-dev@ebi.ac.uk> +Two regions mapped between different coordinate systems are each +represented by a Bio::EnsEMBL::Mapper::Unit and joined together as a +Bio::EnsEMBL::Mapper::Pair. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/Mapper/RangeRegistry.pm b/modules/Bio/EnsEMBL/Mapper/RangeRegistry.pm index 54152e8a6979a8d0c56b1d209c4e79c9d5332ce6..a21b19c3dbbdf5870348d09fbb40617c59a45695 100644 --- a/modules/Bio/EnsEMBL/Mapper/RangeRegistry.pm +++ b/modules/Bio/EnsEMBL/Mapper/RangeRegistry.pm @@ -1,8 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::Mapper::RangeRegistry -# -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -10,58 +24,54 @@ Bio::EnsEMBL::Mapper::RangeRegistry =head1 SYNOPSIS - use Bio::EnsEMBL::Mapper::RangeRegistry; + use Bio::EnsEMBL::Mapper::RangeRegistry; - $rr = Bio::EnsEMBL::Mapper::RangeRegistry->new(); + $rr = Bio::EnsEMBL::Mapper::RangeRegistry->new(); - #get a fixed width chunk around the range of intereset - #this will be used if any registration is actually necessary - $chunk_start = ($start >> 20) << 20 + 1; - $chunk_end = (($end >> 20) + 1) << 20; + # Get a fixed width chunk around the range of intereset. This + # will be used if any registration is actually necessary. + $chunk_start = ( $start >> 20 ) << 20 + 1; + $chunk_end = ( ( $end >> 20 ) + 1 ) << 20; - #check if any registration is necessary for the range. - #if it is register a large chunked area instead and return a listref - #of unregistered areas that need to be loaded. - if($pairs=$rr->check_and_register($id,$start,$end,$chunk_start,$chunk_end)) { + # Check if any registration is necessary for the range. If it is + # register a large chunked area instead and return a listref of + # unregistered areas that need to be loaded. + if ( + $pairs = $rr->check_and_register( + $id, $start, $end, $chunk_start, $chunk_end + ) ) + { foreach my $pair (@$pairs) { - my ($pair_start, $pair_end) = @$pair; - #fetch mappings for these regions from the assembly table and load them - #into the mapper - ... + my ( $pair_start, $pair_end ) = @$pair; + # Fetch mappings for these regions from the assembly table and + # load them into the mapper. + ...; } } else { - #the range ($start - $end) is already registered - ... + # The range ($start - $end) is already registered + ...; } - - #check if any registration is necessary - #if it is register the region and return a listref of pairs that - #need to be loaded. - if($pairs = $rr->check_and_register($id, $start,$end)) { + # Check if any registration is necessary. If it is register the + # region and return a listref of pairs that need to be loaded. + if ( $pairs = $rr->check_and_register( $id, $start, $end ) ) { + ...; } - =head1 DESCRIPTION -This module maintains an internal list of registered regions and is used to -quickly ascertain if and what regions of a provided range need registration. - -=head1 AUTHOR - Graham McVicker - -=head1 CONTACT - -This modules is part of the Ensembl project http://www.ensembl.org +This module maintains an internal list of registered regions and is +used to quickly ascertain if and what regions of a provided range need +registration. -Questions can be posted to the ensembl-dev mailing list: -ensembl-dev@ebi.ac.uk +=head1 METHODS =cut -use strict; - package Bio::EnsEMBL::Mapper::RangeRegistry; +use strict; + use Bio::EnsEMBL::Utils::Exception qw(throw); use integer; diff --git a/modules/Bio/EnsEMBL/Mapper/Unit.pm b/modules/Bio/EnsEMBL/Mapper/Unit.pm index 671f8c2763b66469674dc3431043b3a4814f490d..752bb1907ae3e470b8523fe9dc90ed0327267f43 100644 --- a/modules/Bio/EnsEMBL/Mapper/Unit.pm +++ b/modules/Bio/EnsEMBL/Mapper/Unit.pm @@ -1,14 +1,22 @@ +=head1 LICENSE -# -# Ensembl module for Bio::EnsEMBL::Mapper::Unit -# -# Written by Ewan Birney <birney@ebi.ac.uk> -# -# Copyright GRL and EBI -# -# You may distribute this module under the same terms as perl itself + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -# POD documentation - main docs before the code + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -17,16 +25,10 @@ Bio::EnsEMBL::Mapper::Unit - One side of a map pair =head1 SYNOPSIS =head1 DESCRIPTION - -Two regions mapped between different coordinate systems are -each represented by a Bio::EnsEMBL::Mapper::Unit and joined -together as a Bio::EnsEMBL::Mapper::Pair. - -=head1 AUTHOR - Ewan Birney - -This module is part of the Ensembl project http://www.ensembl.org -Post general queries to B<ensembl-dev@ebi.ac.uk> +Two regions mapped between different coordinate systems are each +represented by a Bio::EnsEMBL::Mapper::Unit and joined together as a +Bio::EnsEMBL::Mapper::Pair. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/MiscFeature.pm b/modules/Bio/EnsEMBL/MiscFeature.pm index 93abddd7fd935fe397559c3e49fba383d16f95c5..032c75a5e213b2c30709d997b22bd754ae8c9628 100644 --- a/modules/Bio/EnsEMBL/MiscFeature.pm +++ b/modules/Bio/EnsEMBL/MiscFeature.pm @@ -1,11 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::MiscFeature -# -# Copyright (c) 2003 EnsEMBL -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -18,32 +29,43 @@ associations. use Bio::EnsEMBL::MiscSet; use Bio::EnsEMBL::Attribute; - my $mfeat = Bio::EnsEMBL::MiscFeature->new(-START => 1200, - -END => 100_000, - -STRAND => 1, - -SLICE => $slice); - - # Can add attributes to the misc feature and associate with various sets - my $clone_set = Bio::EnsEMBL::MiscSet->new(-CODE => 'clone', - -NAME => '1MB clone set', - -DESCRIPTION => '1MB CloneSet'); - - - my $tiling_path_set = Bio::EnsEMBL::MiscSet->new(-CODE => 'tilingpath', - -NAME => 'tiling path set'); - - - my $attrib1 = Bio::EnsEMBL::Attribute->new(-VALUE => 'RLX12451', - -CODE => 'name', - -NAME => 'name'); - - my $attrib2 = Bio::EnsEMBL::Attribute->new(-VALUE => '4', - -CODE => 'version', - -NAME => 'version'); - - my $attrib3 = Bio::EnsEMBL::Attribute->new(-VALUE => 'AL42131.4', - -CODE => 'synonym', - -NAME => 'synonym'); + my $mfeat = Bio::EnsEMBL::MiscFeature->new( + -START => 1200, + -END => 100_000, + -STRAND => 1, + -SLICE => $slice + ); + + # Can add attributes to the misc feature and associate with various + # sets + my $clone_set = Bio::EnsEMBL::MiscSet->new( + -CODE => 'clone', + -NAME => '1MB clone set', + -DESCRIPTION => '1MB CloneSet' + ); + + my $tiling_path_set = Bio::EnsEMBL::MiscSet->new( + -CODE => 'tilingpath', + -NAME => 'tiling path set' + ); + + my $attrib1 = Bio::EnsEMBL::Attribute->new( + -VALUE => 'RLX12451', + -CODE => 'name', + -NAME => 'name' + ); + + my $attrib2 = Bio::EnsEMBL::Attribute->new( + -VALUE => '4', + -CODE => 'version', + -NAME => 'version' + ); + + my $attrib3 = Bio::EnsEMBL::Attribute->new( + -VALUE => 'AL42131.4', + -CODE => 'synonym', + -NAME => 'synonym' + ); # can associate a misc feature with any number of sets @@ -56,42 +78,36 @@ associations. $mfeat->add_Attribute($attrib2); $mfeat->add_Attribute($attrib3); - my ($name_attrib) = @{$mfeat->get_all_Attributes('name')}; - my @all_attribs = @{$mfeat->get_all_Attributes()}; + my ($name_attrib) = @{ $mfeat->get_all_Attributes('name') }; + my @all_attribs = @{ $mfeat->get_all_Attributes() }; - my @all_sets = @{$mfeat->get_all_MiscSets()}; - my ($clone_set) = @{$mfeat->get_all_CloneSets('clone')}; + my @all_sets = @{ $mfeat->get_all_MiscSets() }; + my ($clone_set) = @{ $mfeat->get_all_CloneSets('clone') }; # Can do normal feature operations as well $mfeat = $mfeat->transform('supercontig'); - print $mfeat->slice->seq_region_name, ' ', $mfeat->start, '-', $mfeat->end; + print $mfeat->slice->seq_region_name, ' ', $mfeat->start, '-', + $mfeat->end; =head1 DESCRIPTION -MiscFeatures are extremely general features with a location, and an -arbitrary group of attributes. They are grouped with other features of the -same 'type' through the use of MiscSets (see Bio::EnsEMBL::MiscSet). +MiscFeatures are extremely general features with a location, and an +arbitrary group of attributes. They are grouped with other features of +the same 'type' through the use of MiscSets (see Bio::EnsEMBL::MiscSet). Attributes are attached in the fom of Bio::EnsEMBL::Attribute objects. See Bio::EnsEMBL::DBSQL::MiscFeatureAdaptor for ways to fetch or store MiscFeatures. -=head1 CONTACT - -This modules is part of the Ensembl project http://www.ensembl.org - -Questions can be posted to the ensembl-dev mailing list: -ensembl-dev@ebi.ac.uk - =cut +package Bio::EnsEMBL::MiscFeature; + use strict; use warnings; -package Bio::EnsEMBL::MiscFeature; - use Bio::EnsEMBL::Feature; use Bio::EnsEMBL::Utils::Exception qw(throw); diff --git a/modules/Bio/EnsEMBL/MiscSet.pm b/modules/Bio/EnsEMBL/MiscSet.pm index c1b04f88dd3d5e32be3e469a44411ef59b935223..a702fa0c22c501e4de00970033500a02c355037a 100644 --- a/modules/Bio/EnsEMBL/MiscSet.pm +++ b/modules/Bio/EnsEMBL/MiscSet.pm @@ -1,11 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::MiscSet -# -# Copyright (c) 2003 EnsEMBL -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -16,39 +27,33 @@ a group of miscellaneuos features. use Bio::EnsEMBL::MiscSet; - ... - - my $misc_set = Bio::EnsEMBL::MiscSet->new(1234, $adaptor, - 'tilepath', - 'Assembly Tiling Path', - 'The tiling path of clones', - 1e6); + my $misc_set = Bio::EnsEMBL::MiscSet->new( + 1234, $adaptor, 'tilepath', + 'Assembly Tiling Path', + 'The tiling path of clones', 1e6 + ); my $misc_feature->add_set($misc_set); - =head1 DESCRIPTION -MiscSets represent classsifications or groupings of MiscFeatures. Features are -classified into sets essentially to define what they are and how they may be -used. Generally MiscFeatures are retrieved on the basis of their associated -sets. See Bio::EnsEMBL::MiscFeature, Bio::EnsEMBL::DBSQL::MiscFeatureAdaptor. - -Note that MiscSets and MiscFeatures were formerly known as MapSets and MapFrags - -=head1 CONTACT +MiscSets represent classsifications or groupings of MiscFeatures. +Features are classified into sets essentially to define what they are +and how they may be used. Generally MiscFeatures are retrieved on +the basis of their associated sets. See Bio::EnsEMBL::MiscFeature, +Bio::EnsEMBL::DBSQL::MiscFeatureAdaptor. -This modules is part of the Ensembl project http://www.ensembl.org +Note that MiscSets and MiscFeatures were formerly known as MapSets and +MapFrags -Questions can be posted to the ensembl-dev mailing list: -ensembl-dev@ebi.ac.uk +=head1 METHODS =cut -use strict; - package Bio::EnsEMBL::MiscSet; +use strict; + use Bio::EnsEMBL::Storable; use Bio::EnsEMBL::Utils::Argument qw(rearrange); diff --git a/modules/Bio/EnsEMBL/OligoArray.pm b/modules/Bio/EnsEMBL/OligoArray.pm index 8f70c30b09a79c8b81dd8632c346b891220f9585..6fd2342d1051f31e42076f68ff31aa7706ce632c 100644 --- a/modules/Bio/EnsEMBL/OligoArray.pm +++ b/modules/Bio/EnsEMBL/OligoArray.pm @@ -1,56 +1,60 @@ -# -# Ensembl module for Bio::EnsEMBL::OligoArray -# -# You may distribute this module under the same terms as Perl itself +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::OligoArray - A module to represent an oligonucleotide microarray. + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html -use Bio::EnsEMBL::OligoArray; +=head1 CONTACT -my $array = Bio::EnsEMBL::OligoArray->new( - -NAME => 'Array-1', - -INCLUDED_IN => $another_array, - -SETSIZE => 1, - -TYPE => 'OLIGO', -); + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 DESCRIPTION + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -An OligoArray object represents an oligonucleotide microarray. The data -(currently the name, probeset size, parent array and type of array) are stored -in the oligo_array table. +=cut + +=head1 NAME -OligoArray objects can currently be of type AFFY or OLIGO. Arrays of type OLIGO -will usually have a probeset size of 1 (i.e. the probes are not grouped into -probesets, unlike Affy arrays). +Bio::EnsEMBL::OligoArray - A module to represent an oligonucleotide microarray. -Each array can have a parent array (another array that contains all the probes -of this array). This is rarely (if ever) used. +=head1 SYNOPSIS -=head1 AUTHOR + use Bio::EnsEMBL::OligoArray; -This module was created by Ian Sealy, but is almost entirely based on the -AffyArray module written by Arne Stabenau. + my $array = Bio::EnsEMBL::OligoArray->new( + -NAME => 'Array-1', + -INCLUDED_IN => $another_array, + -SETSIZE => 1, + -TYPE => 'OLIGO', + ); -This module is part of the Ensembl project: http://www.ensembl.org/ +=head1 DESCRIPTION -=head1 CONTACT +An OligoArray object represents an oligonucleotide microarray. The data +(currently the name, probeset size, parent array and type of array) are +stored in the oligo_array table. -Post comments or questions to the Ensembl development list: ensembl-dev@ebi.ac.uk +OligoArray objects can currently be of type AFFY or OLIGO. Arrays of +type OLIGO will usually have a probeset size of 1 (i.e. the probes are +not grouped into probesets, unlike Affy arrays). + +Each array can have a parent array (another array that contains all the +probes of this array). This is rarely (if ever) used. =head1 METHODS =cut +package Bio::EnsEMBL::OligoArray; + use strict; use warnings; -package Bio::EnsEMBL::OligoArray; - use Bio::EnsEMBL::Utils::Argument qw( rearrange ); use Bio::EnsEMBL::Utils::Exception qw( throw warning ); use Bio::EnsEMBL::Storable; diff --git a/modules/Bio/EnsEMBL/OligoFeature.pm b/modules/Bio/EnsEMBL/OligoFeature.pm index b0bc215d8c3bd1cbc9795f60c6b68eb856afd3b2..8aaf37cd024f051c0ed261573059a2439ee9a809 100644 --- a/modules/Bio/EnsEMBL/OligoFeature.pm +++ b/modules/Bio/EnsEMBL/OligoFeature.pm @@ -1,7 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::OligoFeature -# -# You may distribute this module under the same terms as Perl itself +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -10,42 +25,31 @@ genomic mapping. =head1 SYNOPSIS -use Bio::EnsEMBL::OligoFeature; + use Bio::EnsEMBL::OligoFeature; -my $feature = Bio::EnsEMBL::OligoFeature->new( - -PROBE => $probe, - -MISMATCHCOUNT => 0, - -SLICE => $chr_1_slice, - -START => 1_000_000, - -END => 1_000_024, - -STRAND => -1, -); + my $feature = Bio::EnsEMBL::OligoFeature->new( + -PROBE => $probe, + -MISMATCHCOUNT => 0, + -SLICE => $chr_1_slice, + -START => 1_000_000, + -END => 1_000_024, + -STRAND => -1, + ); =head1 DESCRIPTION An OligoFeature object represents the genomic placement of an OligoProbe object. The data are stored in the oligo_feature table. -=head1 AUTHOR - -This module was created by Ian Sealy, but is almost entirely based on the -AffyFeature module written by Arne Stabenau. - -This module is part of the Ensembl project: http://www.ensembl.org/ - -=head1 CONTACT - -Post comments or questions to the Ensembl development list: ensembl-dev@ebi.ac.uk - =head1 METHODS =cut +package Bio::EnsEMBL::OligoFeature; + use strict; use warnings; -package Bio::EnsEMBL::OligoFeature; - use Bio::EnsEMBL::Utils::Argument qw( rearrange ); use Bio::EnsEMBL::Utils::Exception qw( throw ); use Bio::EnsEMBL::Feature; diff --git a/modules/Bio/EnsEMBL/OligoProbe.pm b/modules/Bio/EnsEMBL/OligoProbe.pm index bdf129ed02f03db0438d8448b47ff4e85d90f7c2..3dfda563e31b510a4f78c8b759443ebd56bf58fd 100644 --- a/modules/Bio/EnsEMBL/OligoProbe.pm +++ b/modules/Bio/EnsEMBL/OligoProbe.pm @@ -1,57 +1,63 @@ -# -# Ensembl module for Bio::EnsEMBL::OligoProbe -# -# You may distribute this module under the same terms as Perl itself +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::OligoProbe - A module to represent an oligonucleotide probe. + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT -use Bio::EnsEMBL::OligoProbe; + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -my $probe = Bio::EnsEMBL::OligoProbe->new( - -PROBENAME => 'Probe-1', - -ARRAY => $array, -); + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 DESCRIPTION +=cut -An OligoProbe object represents an oligonucleotide probe on a microarray. The -data (currently the name, array, length, probeset and description) are stored -in the oligo_probe table. Probeset is only really relevant for Affy probes. -The complete name of a probe is the concatenation of the array name, the -probeset (if relevant) and the probe name. +=head1 NAME -For Affy arrays, a probe can be part of more than one array, but only part of -one probeset. On each Affy array the probe has a slightly different name. For -example, two different complete names for the same probe might be -DrosGenome1:AFFX-LysX-5_at:535:35; and Drosophila_2:AFFX-LysX-5_at:460:51;. In -the database, these two probes will have the same oligo_probe_id. Thus the same -Affy probe can have a number of different names and complete names depending on -which array it's on. +Bio::EnsEMBL::OligoProbe - A module to represent an oligonucleotide probe. -=head1 AUTHOR +=head1 SYNOPSIS -This module was created by Ian Sealy, but is almost entirely based on the -AffyProbe module written by Arne Stabenau. + use Bio::EnsEMBL::OligoProbe; -This module is part of the Ensembl project: http://www.ensembl.org/ + my $probe = Bio::EnsEMBL::OligoProbe->new( + -PROBENAME => 'Probe-1', + -ARRAY => $array, + ); -=head1 CONTACT +=head1 DESCRIPTION -Post comments or questions to the Ensembl development list: ensembl-dev@ebi.ac.uk +An OligoProbe object represents an oligonucleotide probe on a +microarray. The data (currently the name, array, length, probeset and +description) are stored in the oligo_probe table. Probeset is only +really relevant for Affy probes. The complete name of a probe is the +concatenation of the array name, the probeset (if relevant) and the +probe name. + +For Affy arrays, a probe can be part of more than one array, but +only part of one probeset. On each Affy array the probe has a +slightly different name. For example, two different complete names +for the same probe might be DrosGenome1:AFFX-LysX-5_at:535:35; and +Drosophila_2:AFFX-LysX-5_at:460:51;. In the database, these two probes +will have the same oligo_probe_id. Thus the same Affy probe can have a +number of different names and complete names depending on which array +it's on. =head1 METHODS =cut +package Bio::EnsEMBL::OligoProbe; + use strict; use warnings; -package Bio::EnsEMBL::OligoProbe; - use Bio::EnsEMBL::Utils::Argument qw( rearrange ) ; use Bio::EnsEMBL::Utils::Exception qw( throw warning ); use Bio::EnsEMBL::Storable; diff --git a/modules/Bio/EnsEMBL/PepDnaAlignFeature.pm b/modules/Bio/EnsEMBL/PepDnaAlignFeature.pm index 3a2dbd4d0178d20247fb651ee5b579be46e480e3..809b0098bb98213e2dbc699eebe51351a5b68fbf 100644 --- a/modules/Bio/EnsEMBL/PepDnaAlignFeature.pm +++ b/modules/Bio/EnsEMBL/PepDnaAlignFeature.pm @@ -1,11 +1,22 @@ -package Bio::EnsEMBL::PepDnaAlignFeature; +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -# EnsEMBL module for storing dna-dna pairwise alignments -# -# Cared for by Michele Clamp <michele@sanger.ac.uk> -# -# You may distribute this module under the same terms as perl itself -# + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -15,8 +26,12 @@ package Bio::EnsEMBL::PepDnaAlignFeature; See BaseAlignFeature +=head1 METHODS + =cut +package Bio::EnsEMBL::PepDnaAlignFeature; + use Bio::EnsEMBL::BaseAlignFeature; use vars qw(@ISA); diff --git a/modules/Bio/EnsEMBL/PredictionExon.pm b/modules/Bio/EnsEMBL/PredictionExon.pm index cfdd0083b0f637c3ae3f1ea43779607a1510c4bf..d4a6b8d1d5b07b374a541068563423286a5cf87a 100644 --- a/modules/Bio/EnsEMBL/PredictionExon.pm +++ b/modules/Bio/EnsEMBL/PredictionExon.pm @@ -1,53 +1,57 @@ -# -# EnsEMBL module for Bio::EnsEMBL::PredictionExon -# -# -# Copyright Ewan Birney -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=pod + This software is distributed under a modified Apache license. + For license details, please see -=head1 NAME Bio::EnsEMBL::PredictionExon - A class representing an Exon from an -ab initio prediction method + http://www.ensembl.org/info/about/code_licence.html -=head1 SYNOPSIS +=head1 CONTACT - $exon = new Bio::EnsEMBL::PredictionExon(-START => 100, - -END => 200, - -STRAND => 1, - -SLICE => $slice, - -DBID => $dbID, - -P_VALUE => 23.5, - -SCORE => 99 - ); + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. - #seq returns a Bio::Seq - my $seq = $exon->seq->seq(); + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. - #peptide only makes sense within transcript context - my $pep = $exon->peptide($transcript)->seq(); +=cut - #normal feature operations can be performed: - $exon = $exon->transform('clone'); - $exon->move($new_start, $new_end, $new_strand); - print $exon->slice->seq_region_name(); +=head1 NAME -=head1 DESCRIPTION +Bio::EnsEMBL::PredictionExon - A class representing an Exon from an ab +initio prediction method -This is a class which represents an prediction exon which is part of a -predcition transcript. See Bio::EnsEMBL:PredictionTranscript +=head1 SYNOPSIS -=head1 CONTACT + $exon = new Bio::EnsEMBL::PredictionExon( + -START => 100, + -END => 200, + -STRAND => 1, + -SLICE => $slice, + -DBID => $dbID, + -P_VALUE => 23.5, + -SCORE => 99 + ); + + # seq() returns a Bio::Seq + my $seq = $exon->seq->seq(); + + # peptide() only makes sense within transcript context + my $pep = $exon->peptide($transcript)->seq(); -Post questions to the EnsEMBL developer list: <ensembl-dev@ebi.ac.uk> + # Normal feature operations can be performed: + $exon = $exon->transform('clone'); + $exon->move( $new_start, $new_end, $new_strand ); + print $exon->slice->seq_region_name(); -=head1 APPENDIX +=head1 DESCRIPTION + +This is a class which represents an prediction exon which is part of a +predcition transcript. See Bio::EnsEMBL:PredictionTranscript -The rest of the documentation details each of the object methods. Internal -methods are usually preceded with a_ +=head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/PredictionTranscript.pm b/modules/Bio/EnsEMBL/PredictionTranscript.pm index 10e2412b1020e50b057fcd31628ef835df212130..1624b990b1a46588e6bcd3bf3c1f79daff9452c4 100644 --- a/modules/Bio/EnsEMBL/PredictionTranscript.pm +++ b/modules/Bio/EnsEMBL/PredictionTranscript.pm @@ -1,12 +1,22 @@ -# EnsEMBL module for Transcript -# Copyright EMBL-EBI/Sanger center 2002 -# -# Cared for by Arne Stabenau -# -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -14,38 +24,37 @@ PredictionTranscript =head1 SYNOPSIS - =head1 DESCRIPTION -Container for single transcript ab initio gene prediction such as GenScan or -SNAP. Is directly storable/retrievable in Ensembl using +Container for single transcript ab initio gene prediction such as +GenScan or SNAP. Is directly storable/retrievable in Ensembl using PredictionTranscriptAdaptor. Creation: - my $tran = new Bio::EnsEMBL::PredictionTranscript(); - $tran->add_Exon( $pred_exon ); + my $tran = new Bio::EnsEMBL::PredictionTranscript(); + $tran->add_Exon($pred_exon); - my $tran = new Bio::EnsEMBL::PredictionTranscript(-EXONS => @pred_exons); + my $tran = + new Bio::EnsEMBL::PredictionTranscript( -EXONS => @pred_exons ); Manipulation: - # Returns an array of PredictionExon objects - my @pred_exons = @{$tran->get_all_Exons}; + # Returns an array of PredictionExon objects + my @pred_exons = @{ $tran->get_all_Exons }; - # Returns the peptide translation as string - my $pep = $tran->translate()->seq(); + # Returns the peptide translation as string + my $pep = $tran->translate()->seq(); - # Get the exon cdna sequence. - my $cdna = $trans->spliced_seq(); + # Get the exon cdna sequence. + my $cdna = $trans->spliced_seq(); -=head1 CONTACT - -Contact the Ensembl development list <ensembl-dev@ebi.ac.uk> for information +=head1 METHODS =cut package Bio::EnsEMBL::PredictionTranscript; + use vars qw(@ISA); use strict; diff --git a/modules/Bio/EnsEMBL/ProjectionSegment.pm b/modules/Bio/EnsEMBL/ProjectionSegment.pm index 03f64a321e39f0d895d8ccdbf26f46676f2ec45f..52b5d422f6368ce961b38d86fbb70a022d4f1026 100644 --- a/modules/Bio/EnsEMBL/ProjectionSegment.pm +++ b/modules/Bio/EnsEMBL/ProjectionSegment.pm @@ -1,48 +1,48 @@ -# -# Ensembl module for Bio::EnsEMBL::ProjectionSegment -# -# -# Copyright Team Ensembl -# -# You may distribute this module under the same terms as perl itself - -# POD documentation - main docs before the code +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::ProjectionSegment - part of the list that is returned from -project function calls + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html +=head1 CONTACT - $slice = $sa->fetch_by_region('chromosome', 'X', 1_000_000, 2_000_000); + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. - my $projection = $slice->project( "clone" ); + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. - foreach my $projection_segment ( @$projection ) { +=cut - print " from_start ",$projection_segment->from_start(), "\n"; - print " from_end ",$projection_segment->from_end(), "\n"; - print " to_Slice ",$projection_segment->to_Slice()->name(), "\n"; - } +=head1 NAME +Bio::EnsEMBL::ProjectionSegment - part of the list that is returned from +project function calls -=head1 DESCRIPTION +=head1 SYNOPSIS -The ProjectionSegment is a helper object to make the arrays returned by -project more accessible. Instead of writing $segment->[0], $segment->[1] or -$segment->[2] its possible to use the more descriptive notation of -$segment->from_start(), $segement->from_end(), $segment->to_Slice(). + $slice = + $sa->fetch_by_region( 'chromosome', 'X', 1_000_000, 2_000_000 ); -=head1 AUTHOR - Arne Stabenau + my $projection = $slice->project("clone"); -=head1 CONTACT + foreach my $projection_segment (@$projection) { + print( " from_start ", $projection_segment->from_start(), "\n" ); + print( " from_end ", $projection_segment->from_end(), "\n" ); + print( " to_Slice ", + $projection_segment->to_Slice()->name(), "\n" ); + } -This modules is part of the Ensembl project http://www.ensembl.org +=head1 DESCRIPTION -Questions can be posted to the ensembl-dev mailing list: -ensembl-dev@ebi.ac.uk +The ProjectionSegment is a helper object to make the arrays returned by +project more accessible. Instead of writing $segment->[0], $segment->[1] +or $segment->[2] its possible to use the more descriptive notation of +$segment->from_start(), $segement->from_end(), $segment->to_Slice(). =head1 METHODS diff --git a/modules/Bio/EnsEMBL/ProteinFeature.pm b/modules/Bio/EnsEMBL/ProteinFeature.pm index ddc09f3f05c0367702d697a10ccf76d0648a206f..9c56bb09656bbedf19220b71162788091cfac80e 100755 --- a/modules/Bio/EnsEMBL/ProteinFeature.pm +++ b/modules/Bio/EnsEMBL/ProteinFeature.pm @@ -1,14 +1,22 @@ +=head1 LICENSE -# -# BioPerl module for ProteinFeature -# -# Cared for by Emmanuel Mongin <mongin@ebi.ac.uk> -# -# Copyright Emmanuel Mongin -# -# You may distribute this module under the same terms as perl itself + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -# POD documentation - main docs before the code + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -16,22 +24,20 @@ Bio::EnsEMBL::ProteinFeature =head1 SYNOPSIS - - my $feature = Bio::EnsEMBL::ProteinFeature->new - (-start => $start, - -end => $end, - -hstart => $hit_start, - -hend => $hit_end, - -hname => $hit_name); + my $feature = Bio::EnsEMBL::ProteinFeature->new( + -start => $start, + -end => $end, + -hstart => $hit_start, + -hend => $hit_end, + -hname => $hit_name + ); =head1 DESCRIPTION -ProteinFeature objects represent domains or other features of interest +ProteinFeature objects represent domains or other features of interest on a peptide sequence. -=head1 CONTACT - - Post questions to the EnsEMBL development list ensembl-dev@sanger.ac.uk +=head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/Registry.pm b/modules/Bio/EnsEMBL/Registry.pm index 39b5735b8b0e7fff5a070dbbedad1dde7cd34d3a..0183059b9cca07f4f704ba17219d8d100dc4d1ef 100644 --- a/modules/Bio/EnsEMBL/Registry.pm +++ b/modules/Bio/EnsEMBL/Registry.pm @@ -1,11 +1,22 @@ -# -# Ensembl module for Registry -# -# Copyright EMBL/EBI -## -# You may distribute this module under the same terms as perl itself +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -# POD documentation - main docs before the code + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -13,10 +24,13 @@ Bio::EnsEMBL::Registry =head1 SYNOPSIS -Bio::EnsEMBL::Registry->load_all("configuration_file"); + use Bio::EnsEMBL::Registry; + + my $registry = 'Bio::EnsEMBL::Registry'; -$gene_adaptor = - Bio::EnsEMBL::Registry->get_adaptor( "human", "core", "gene" ); + $registry->load_all("configuration_file"); + + $gene_adaptor = $registry->get_adaptor( 'Human', 'Core', 'Gene' ); =head1 DESCRIPTION @@ -40,73 +54,69 @@ The registry can also be loaded via the method load_registry_from_db which given a database host will load the latest versions of the Ensembl databases from it. -The four types of registries are for db adaptors, dba adaptors, dna adaptors -and the standard type. +The four types of registries are for db adaptors, dba adaptors, dna +adaptors and the standard type. =head2 db -These are registries for backwards compatibility and enable the subroutines -to add other adaptors to connections. +These are registries for backwards compatibility and enable the +subroutines to add other adaptors to connections. -e.g. get_all_db_adaptors, get_db_adaptor, add_db_adaptor, remove_db_adaptor -are the old DBAdaptor subroutines which are now redirected to the Registry. +e.g. get_all_db_adaptors, get_db_adaptor, add_db_adaptor, +remove_db_adaptor are the old DBAdaptor subroutines which are now +redirected to the Registry. So if before we had - my $sfa = $self->adaptor()->db()->get_db_adaptor('blast'); + my $sfa = $self->adaptor()->db()->get_db_adaptor('blast'); We now want to change this to - my $sfa = - Bio::EnsEMBL::Registry->get_adaptor( "human", "core", "blast" ); + my $sfa = + Bio::EnsEMBL::Registry->get_adaptor( "human", "core", "blast" ); =head2 DBA These are the stores for the DBAdaptors -The Registry will create all the DBConnections needed now if you set up the -configuration correctly. So instead of the old commands like +The Registry will create all the DBConnections needed now if you set up +the configuration correctly. So instead of the old commands like - my $db = Bio::EnsEMBL::DBSQL::DBAdaptor->new(...); - my $exon_adaptor = $db->get_ExonAdaptor; + my $db = Bio::EnsEMBL::DBSQL::DBAdaptor->new(...); + my $exon_adaptor = $db->get_ExonAdaptor; we should now have just - my $exon_adaptor = - Bio::EnsEMBL::Registry->get_adaptor( "human", "core", "exon" ); + my $exon_adaptor = + Bio::EnsEMBL::Registry->get_adaptor( "human", "core", "exon" ); =head2 DNA -This is an internal Registry and allows the configuration of a dnadb. -An example here is to set the est database to get its dna data from the core database. +This is an internal Registry and allows the configuration of a dnadb. +An example here is to set the est database to get its dna data from the +core database. - ## set the est db to use the core for getting dna data. - # Bio::EnsEMBL::Utils::ConfigRegistry->dnadb_add( - # "Homo Sapiens", "core", "Homo Sapiens", "est" ); + ## set the est db to use the core for getting dna data. + # Bio::EnsEMBL::Utils::ConfigRegistry->dnadb_add( "Homo Sapiens", + # "core", "Homo Sapiens", "est" ); =head2 adaptors -This is the registry for all the general types of adaptors like GeneAdaptor, ExonAdaptor, -Slice Adaptor etc. +This is the registry for all the general types of adaptors like +GeneAdaptor, ExonAdaptor, Slice Adaptor etc. These are accessed by the get_adaptor subroutine i.e. - my $exon_adaptor = - Bio::EnsEMBL::Registry->get_adaptor( "human", "core", "exon" ); - -=head1 CONTACT - -Post questions to the Ensembl developer list: <ensembl-dev@ebi.ac.uk> - + my $exon_adaptor = + Bio::EnsEMBL::Registry->get_adaptor( "human", "core", "exon" ); =head1 METHODS =cut - package Bio::EnsEMBL::Registry; use strict; diff --git a/modules/Bio/EnsEMBL/RepeatConsensus.pm b/modules/Bio/EnsEMBL/RepeatConsensus.pm index 590bc02894063bda38805077b6e88f4399027860..fa8cc5f78e4371ab952d80660c2f0ce2ccc95a48 100644 --- a/modules/Bio/EnsEMBL/RepeatConsensus.pm +++ b/modules/Bio/EnsEMBL/RepeatConsensus.pm @@ -1,7 +1,27 @@ -use strict; +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut package Bio::EnsEMBL::RepeatConsensus; +use strict; + use Bio::EnsEMBL::Storable; use Bio::EnsEMBL::Utils::Argument qw(rearrange); diff --git a/modules/Bio/EnsEMBL/RepeatFeature.pm b/modules/Bio/EnsEMBL/RepeatFeature.pm index 3be6842dc312272f064d149d620e3b9abed75311..ee66e4d6d924e60a0e5e96b2f17bd40003e934e0 100644 --- a/modules/Bio/EnsEMBL/RepeatFeature.pm +++ b/modules/Bio/EnsEMBL/RepeatFeature.pm @@ -1,7 +1,22 @@ -# EnsEMBL module for Bio::EnsEMBL::RepeatFeature -# -# Copyright (c) 2003 EnsEMBL -# +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -10,42 +25,40 @@ sequence. =head1 SYNOPSIS - my $rf = new Bio::EnsEMBL::Feature(-start => 100, - -end => 220, - -strand => -1, - -slice => $slice - -analysis => $analysis - -repeat_consensus => $rc, - -hstart => 10, - -hend => 100, - -hstrand => 1, - -score => 83.2 - ); + my $rf = new Bio::EnsEMBL::Feature( + -start => 100, + -end => 220, + -strand => -1, + -slice => $slice, + -analysis => $analysis, + -repeat_consensus => $rc, + -hstart => 10, + -hend => 100, + -hstrand => 1, + -score => 83.2 + ); - my $hstart = $feat->hstart; - my $hend = $feat->hend; + my $hstart = $feat->hstart; + my $hend = $feat->hend; - #move the feature to the chromosomal coordinate system - $feature = $feature->transform('chromosome'); + # move the feature to the chromosomal coordinate system + $feature = $feature->transform('chromosome'); - #move the feature to a different slice (possibly on another coord system) - $feature = $feature->transfer($new_slice); + # move the feature to a different slice + # (possibly on another coord system) + $feature = $feature->transfer($new_slice); - #project the feature onto another coordinate system possibly across - #boundaries: - @projection = @{$feature->project('contig')}; + # project the feature onto another coordinate system possibly across + # boundaries: + @projection = @{ $feature->project('contig') }; - #change the start, end, and strand of the feature in place - $feature->move($new_start, $new_end, $new_strand); + # change the start, end, and strand of the feature in place + $feature->move( $new_start, $new_end, $new_strand ); =head1 DESCRIPTION This a feature representing a repeat region on a sequence -=head1 CONTACT - -Post questions to the EnsEMBL development list: ensembl-dev@ebi.ac.uk - =head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/RepeatMaskedSlice.pm b/modules/Bio/EnsEMBL/RepeatMaskedSlice.pm index 37707a316aaa128ee8baab48b167225dee3a1749..dea77bedc2339281996f36c7b22cf47eb71431a1 100644 --- a/modules/Bio/EnsEMBL/RepeatMaskedSlice.pm +++ b/modules/Bio/EnsEMBL/RepeatMaskedSlice.pm @@ -1,49 +1,49 @@ -# -# Ensembl module for Bio::EnsEMBL::RepeatMaskedSlice -# -# -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 NAME + This software is distributed under a modified Apache license. + For license details, please see -Bio::EnsEMBL::RepeatMaskedSlice - Arbitary Slice of a genome + http://www.ensembl.org/info/about/code_licence.html -=head1 SYNOPSIS +=head1 CONTACT - $sa = $db->get_SliceAdaptor; + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. - $slice = $sa->fetch_by_region('chromosome', 'X', 1_000_000, 2_000_000); + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. - $repeat_masked_slice = $slice->get_repeatmasked_seq(); +=cut - #get repeat masked sequence: - my $dna = $repeat_masked_slice->seq(); - $dna = $repeat_masked_slice->subseq(1, 1000); +=head1 NAME +Bio::EnsEMBL::RepeatMaskedSlice - Arbitary Slice of a genome -=head1 DESCRIPTION +=head1 SYNOPSIS -This is a specialised B<Bio::EnsEMBL::Slice> class that is used to -retrieve repeat masked genomic sequence rather than normal genomic -sequence. + $sa = $db->get_SliceAdaptor(); -=head1 AUTHOR - Graham McVicker + $slice = + $sa->fetch_by_region( 'chromosome', 'X', 1_000_000, 2_000_000 ); -=head1 CONTACT + $repeat_masked_slice = $slice->get_repeatmasked_seq(); -This modules is part of the Ensembl project http://www.ensembl.org + # get repeat masked sequence: + my $dna = $repeat_masked_slice->seq(); + $dna = $repeat_masked_slice->subseq( 1, 1000 ); -Questions can be posted to the ensembl-dev mailing list: -ensembl-dev@ebi.ac.uk +=head1 DESCRIPTION + +This is a specialised Bio::EnsEMBL::Slice class that is used to retrieve +repeat masked genomic sequence rather than normal genomic sequence. =head1 METHODS =cut - package Bio::EnsEMBL::RepeatMaskedSlice; use strict; diff --git a/modules/Bio/EnsEMBL/Root.pm b/modules/Bio/EnsEMBL/Root.pm index 834c2896545be7e8b44388c8406b84bc7bcee9ae..61fd95bea0a5a64165e7b8bf3ea7d3a37c6f9219 100644 --- a/modules/Bio/EnsEMBL/Root.pm +++ b/modules/Bio/EnsEMBL/Root.pm @@ -1,40 +1,58 @@ -=head1 NAME +=head1 LICENSE -Bio::EnsEMBL::Root + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 DESCRIPTION + This software is distributed under a modified Apache license. + For license details, please see -Do not use Bio::EnsEMBL::Root anymore. It is included for backwards -compatibility (every object in EnsEMBL used to inherit from this class) but -will eventually be phased out. The replacement for the _rearrage method is the -rearrange method which can be imported in the following way: + http://www.ensembl.org/info/about/code_licence.html - use Bio::EnsEMBL::Utils::Argument qw(rearrange); +=head1 CONTACT - #can now call rearrange as a class method (instead as object method) - my ($start, $end) = rearrange(['START','END'], @args); + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -If you want to use the throw or warn methods the replacement use the class -methods throw and warning from the Bio::EnsEMBL::Utils::Exception class: + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. - use Bio::EnsEMBL::Utils::Exception qw(throw warning); +=head1 AUTHOR - #can now call throw or warning even without blessed reference - warning('This is a warning'); - throw('This is an exception'); + Originally from Steve Chervitz. Refactored by Ewan Birney. +=cut -This module was stolen from BioPerl to avoid problems with moving to BioPerl 1 -from 0.7 +=head1 NAME -=head1 CONTACT +Bio::EnsEMBL::Root + +=head1 DESCRIPTION + +Do not use Bio::EnsEMBL::Root anymore. It is included for backwards +compatibility (every object in EnsEMBL used to inherit from this class) +but will eventually be phased out. The replacement for the _rearrage +method is the rearrange method which can be imported in the following +way: + + use Bio::EnsEMBL::Utils::Argument qw(rearrange); + + # can now call rearrange as a class method (instead as object method) + my ( $start, $end ) = rearrange( [ 'START', 'END' ], @args ); + +If you want to use the throw or warn methods the replacement use the +class methods throw and warning from the Bio::EnsEMBL::Utils::Exception +class: + + use Bio::EnsEMBL::Utils::Exception qw(throw warning); -Functions originally from Steve Chervitz. Refactored by Ewan Birney. + # can now call throw or warning even without blessed reference + warning('This is a warning'); + throw('This is an exception'); -=head1 APPENDIX +This module was stolen from BioPerl to avoid problems with moving to +BioPerl 1 from 0.7 -The rest of the documentation details each of the object -methods. Internal methods are usually preceded with a _ +=head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/SNP.pm b/modules/Bio/EnsEMBL/SNP.pm index c196c255534599223dd2ea53baeaae91b1c6ee45..deb04409b75be966d2a99f2a3b183729fbcc553c 100644 --- a/modules/Bio/EnsEMBL/SNP.pm +++ b/modules/Bio/EnsEMBL/SNP.pm @@ -1,10 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::SNP -# -# Copyright Ensembl -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -12,34 +24,27 @@ Bio::EnsEMBL::SNP =head1 SYNOPSIS - $snp = new Bio::EnsEMBL::SNP - (-start => 10, - -end => 10, - -strand => 1, - -source => 'The SNP Consortium', - -score => 99, #new meaning - -status = > 'suspected', #new - -alleles => 't|c' #new - ); + $snp = new Bio::EnsEMBL::SNP( + -start => 10, + -end => 10, + -strand => 1, + -source => 'The SNP Consortium', + -score => 99, # new meaning + -status => 'suspected', # new + -alleles => 't|c' # new + ); # add it to an annotated sequence - $annseq->add_SeqFeature($feat); - + $annseq->add_SeqFeature($feat); =head1 DESCRIPTION -This class was written because the EnsEMBL::ExternalData::Variation object -is way too slow. There was simply too much chaining to bioperl methods many, -many layers deep. This object behaves like a Variation but has a -much faster constructor, and faster accessors for the relevant methods -needed by the web. - -=head1 CONTACT - -Post questions to the Ensmebl development list. - -=cut +This class was written because the EnsEMBL::ExternalData::Variation +object is way too slow. There was simply too much chaining to bioperl +methods many, many layers deep. This object behaves like a Variation +but has a much faster constructor, and faster accessors for the relevant +methods needed by the web. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/SeqEdit.pm b/modules/Bio/EnsEMBL/SeqEdit.pm index cdd3d7abc8dd562ddcd41e7a6020ab0a51bc91fe..c57447e80531182513e70620c0481a7fb7bac2b4 100644 --- a/modules/Bio/EnsEMBL/SeqEdit.pm +++ b/modules/Bio/EnsEMBL/SeqEdit.pm @@ -1,10 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::SeqEdit -# -# Copyright (c) 2004 Ensembl -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -18,61 +30,54 @@ sequence. # construct a SeqEdit object using a Transcript attribute - ($attribute) = @{$translation->get_all_Attributes('_rna_edit')}; + ($attribute) = @{ $translation->get_all_Attributes('_rna_edit') }; - $seq_edit = Bio::EnsEMBL::SeqEdit(-ATTRIB => $attribute); + $seq_edit = Bio::EnsEMBL::SeqEdit( -ATTRIB => $attribute ); - print $seq_edit->start(), "\n"; - print $seq_edit->end(), "\n"; + print $seq_edit->start(), "\n"; + print $seq_edit->end(), "\n"; print $seq_edit->alt_seq(), "\n"; # apply the edit to some sequence $seq = $transcript->spliced_seq(); print "Before modifiction: $seq\n"; - $seq_edit->apply_edit(\$seq); - print "After modification: $seq\n"; + $seq_edit->apply_edit( \$seq ); + print "After modification: $seq\n"; - # construct an attribute object from a SeqEdit and add it to a translation + # construct an attribute object from a SeqEdit and add it to a + # translation - $seq_edit = Bio::EnsEMBL::SeqEdit->new - (-CODE => '_selenocysteine', - -NAME => 'Selenocysteine', - -DESC => 'Selenocysteine', - -START => 10, - -END => 10, - -ALT_SEQ => 'U'); + $seq_edit = Bio::EnsEMBL::SeqEdit->new( + -CODE => '_selenocysteine', + -NAME => 'Selenocysteine', + -DESC => 'Selenocysteine', + -START => 10, + -END => 10, + -ALT_SEQ => 'U' + ); $attribute = $seq_edit->get_Attribute(); $translation->add_Attributes($attribute); - =head1 DESCRIPTION This is a class used to represent post transcriptional -modifications to sequences. SeqEdit objects are stored as -ordinary Bio::EnsEMBL::Attributes with a parseable value and can be - used to represent RNA editing, selenocysteines etc. +modifications to sequences. SeqEdit objects are stored as ordinary +Bio::EnsEMBL::Attributes with a parseable value and can be used to +represent RNA editing, selenocysteines etc. Also see B<Bio::EnsEMBL::Attribute> -=head1 CONTACT - -This modules is part of the Ensembl project http://www.ensembl.org - -Questions can be posted to the ensembl-dev mailing list: -ensembl-dev@ebi.ac.uk - =head1 METHODS =cut +package Bio::EnsEMBL::SeqEdit; use strict; use warnings; -package Bio::EnsEMBL::SeqEdit; - use Bio::EnsEMBL::Attribute; use Bio::EnsEMBL::Utils::Argument qw(rearrange); use Bio::EnsEMBL::Utils::Exception qw(throw); diff --git a/modules/Bio/EnsEMBL/SeqFeature.pm b/modules/Bio/EnsEMBL/SeqFeature.pm index cfd8c5b9675541171343adba41550566f0fe5bf7..1b88182bc030a10a6cefe42f8de6b418e3f7bc66 100755 --- a/modules/Bio/EnsEMBL/SeqFeature.pm +++ b/modules/Bio/EnsEMBL/SeqFeature.pm @@ -1,49 +1,53 @@ -# -# BioPerl module for Bio::EnsEMBL::SeqFeature -# -# Cared for by Ewan Birney <birney@sanger.ac.uk> -# -# Copyright Ewan Birney -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 NAME + This software is distributed under a modified Apache license. + For license details, please see -Bio::EnsEMBL::SeqFeature - Ensembl specific sequence feature. + http://www.ensembl.org/info/about/code_licence.html -=head1 DESCRIPTION +=head1 CONTACT -Do not use this module if you can avoid it. It has been replaced by -Bio::EnsEMBL::Feature. This module has a long history of usage but has -become very bloated, and quite unweildy. It was decided to replace it -completely with a smaller, light-weight feature class rather than attempting -to refactor this class, and maintain strict backwards compatibility. - -Part of the complexity of this class was in its extensive inheritance. As an -example the following is a simplified inheritance heirarchy that was present -for Bio::EnsEMBL::DnaAlignFeature: - -Bio::EnsEMBL::DnaAlignFeature -Bio::EnsEMBL::BaseAlignFeature -Bio::EnsEMBL::FeaturePair -Bio::EnsEMBL::SeqFeature -Bio::EnsEMBL::SeqFeatureI -Bio::SeqFeatureI -Bio::RangeI -Bio::Root::RootI - -The new Bio::EnsEMBL::Feature class is much shorter, and hopefully much easier -to understand and maintain. + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 CONTACT + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -Post questions to the ensembl development list: ensembl-dev@ebi.ac.uk +=cut -=head1 APPENDIX +=head1 NAME + +Bio::EnsEMBL::SeqFeature - Ensembl specific sequence feature. -The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ +=head1 DESCRIPTION + +Do not use this module if you can avoid it. It has been replaced by +Bio::EnsEMBL::Feature. This module has a long history of usage but has +become very bloated, and quite unweildy. It was decided to replace +it completely with a smaller, light-weight feature class rather than +attempting to refactor this class, and maintain strict backwards +compatibility. + +Part of the complexity of this class was in its extensive +inheritance. As an example the following is a simplified inheritance +heirarchy that was present for Bio::EnsEMBL::DnaAlignFeature: + + Bio::EnsEMBL::DnaAlignFeature + Bio::EnsEMBL::BaseAlignFeature + Bio::EnsEMBL::FeaturePair + Bio::EnsEMBL::SeqFeature + Bio::EnsEMBL::SeqFeatureI + Bio::SeqFeatureI + Bio::RangeI + Bio::Root::RootI + +The new Bio::EnsEMBL::Feature class is much shorter, and hopefully much +easier to understand and maintain. + +=head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/SeqFeatureI.pm b/modules/Bio/EnsEMBL/SeqFeatureI.pm index bdf7c0fb71c9b59d2b6c8d8577243dbb0083191d..3e0d8f6d2ead035fc33caf2458cf84909b933566 100755 --- a/modules/Bio/EnsEMBL/SeqFeatureI.pm +++ b/modules/Bio/EnsEMBL/SeqFeatureI.pm @@ -1,14 +1,22 @@ +=head1 LICENSE -# -# BioPerl module for Bio::EnsEMBL::SeqFeature -# -# Cared for by Ewan Birney <birney@sanger.ac.uk> -# -# Copyright Ewan Birney -# -# You may distribute this module under the same terms as perl itself + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -# POD documentation - main docs before the code + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -19,13 +27,7 @@ Bio::EnsEMBL::SeqFeatureI Do not use this class. It is deprecated and has been replaced by Bio::EnsEMBL::Feature. -=head1 CONTACT - -Post questions to the ensembl development mailing list: ensembl-dev@ebi.ac.uk - -=head1 APPENDIX - -The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ +=head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/SimpleFeature.pm b/modules/Bio/EnsEMBL/SimpleFeature.pm index 5d3debb60e5b10f2f8b47cc05c679a39870c76f6..b5e933d5d3c450144f5f1d5b369181c45264a4e2 100644 --- a/modules/Bio/EnsEMBL/SimpleFeature.pm +++ b/modules/Bio/EnsEMBL/SimpleFeature.pm @@ -1,42 +1,47 @@ -# -# Ensembl module for Bio::EnsEMBL::SimpleFeature -# -# Copyright Ewan Birney -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 NAME + This software is distributed under a modified Apache license. + For license details, please see -Bio::EnsEMBL::SimpleFeature - A simple feature with a location and label + http://www.ensembl.org/info/about/code_licence.html -=head1 SYNOPSIS +=head1 CONTACT -use Bio::EnsEMBL::SimpleFeature; + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -$feature = Bio::EnsEMBL::SimpleFeature->new(-start => 100, - -end => 220, - -strand => -1, - -slice => $slice, - -analysis => $analysis, - -score => 58, - -display_label => 'EponineTSS', - -dbID => 1230, - -adaptor => $adaptor); + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 DESCRIPTION +=cut -This is a simple feature which extends the Feature class to add display_label -and score attributes. +=head1 NAME -=head1 AUTHOR - Ewan Birney +Bio::EnsEMBL::SimpleFeature - A simple feature with a location and label -This modules is part of the Ensembl project http://www.ensembl.org +=head1 SYNOPSIS -=head1 CONTACT + use Bio::EnsEMBL::SimpleFeature; + + $feature = Bio::EnsEMBL::SimpleFeature->new( + -start => 100, + -end => 220, + -strand => -1, + -slice => $slice, + -analysis => $analysis, + -score => 58, + -display_label => 'EponineTSS', + -dbID => 1230, + -adaptor => $adaptor + ); + +=head1 DESCRIPTION -Post comments/questions to the ensembl development list: ensembl-dev@ebi.ac.uk +This is a simple feature which extends the Feature class to add +display_label and score attributes. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/Slice.pm b/modules/Bio/EnsEMBL/Slice.pm index 4d15fe493ac7ccd14b0d928638fc1d481263ad57..6605cfa257a0bcb8a26634d775a098f3f42c4682 100644 --- a/modules/Bio/EnsEMBL/Slice.pm +++ b/modules/Bio/EnsEMBL/Slice.pm @@ -1,12 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::Slice -# -# -# Copyright Team Ensembl -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see -# POD documentation - main docs before the code + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -14,40 +24,33 @@ Bio::EnsEMBL::Slice - Arbitary Slice of a genome =head1 SYNOPSIS - $sa = $db->get_SliceAdaptor; - - $slice = $sa->fetch_by_region('chromosome', 'X', 1_000_000, 2_000_000); + $sa = $db->get_SliceAdaptor; - #get some attributes of the slice - my $seqname = $slice->seq_region_name(); - my $start = $slice->start(); - my $end = $slice->end(); + $slice = + $sa->fetch_by_region( 'chromosome', 'X', 1_000_000, 2_000_000 ); - #get the sequence from the slice - my $seq = $slice->seq(); + # get some attributes of the slice + my $seqname = $slice->seq_region_name(); + my $start = $slice->start(); + my $end = $slice->end(); - #get some features from the slice - foreach $gene ( @{$slice->get_all_Genes} ) { - # do something with a gene - } + # get the sequence from the slice + my $seq = $slice->seq(); - foreach my $feature ( @{$slice->get_all_DnaAlignFeatures}) { - # do something with dna-dna alignments - } + # get some features from the slice + foreach $gene ( @{ $slice->get_all_Genes } ) { + # do something with a gene + } + foreach my $feature ( @{ $slice->get_all_DnaAlignFeatures } ) { + # do something with dna-dna alignments + } =head1 DESCRIPTION A Slice object represents a region of a genome. It can be used to retrieve sequence or features from an area of interest. -=head1 CONTACT - -This modules is part of the Ensembl project http://www.ensembl.org - -Questions can be posted to the ensembl-dev mailing list: -ensembl-dev@ebi.ac.uk - =head1 METHODS =cut diff --git a/modules/Bio/EnsEMBL/StableIdEvent.pm b/modules/Bio/EnsEMBL/StableIdEvent.pm index c8553fb1a8d3dca73d428876c908851f86cb6e8b..3d6be9928725571b3eb0f3eda3f58d53ce97c9ba 100644 --- a/modules/Bio/EnsEMBL/StableIdEvent.pm +++ b/modules/Bio/EnsEMBL/StableIdEvent.pm @@ -1,4 +1,22 @@ -package Bio::EnsEMBL::StableIdEvent; +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -6,26 +24,26 @@ Bio::EnsEMBL::StableIdEvent- object representing a stable ID mapping event =head1 SYNOPSIS -my $old_id = Bio::EnsEMBL::ArchiveStableId->new( - -stable_id => 'ENSG001' - -version => 1, - -type => 'Gene', -); + my $old_id = Bio::EnsEMBL::ArchiveStableId->new( + -stable_id => 'ENSG001', + -version => 1, + -type => 'Gene', + ); -my $new_id = Bio::EnsEMBL::ArchiveStableId->new( - -stable_id => 'ENSG001' - -version => 2, - -type => 'Gene', -); + my $new_id = Bio::EnsEMBL::ArchiveStableId->new( + -stable_id => 'ENSG001', + -version => 2, + -type => 'Gene', + ); -my $event = Bio::EnsEMBL::StableIdEvent->new( - -old_id => $old_id, - -new_id => $new_id, - -score => 0.997 -); + my $event = Bio::EnsEMBL::StableIdEvent->new( + -old_id => $old_id, + -new_id => $new_id, + -score => 0.997 + ); -# directly access attributes in old and new ArchiveStableId -my $old_stable_id = $event->get_attribute('old', 'stable_id'); + # directly access attributes in old and new ArchiveStableId + my $old_stable_id = $event->get_attribute( 'old', 'stable_id' ); =head1 DESCRIPTION @@ -34,35 +52,22 @@ ArchiveStableIds with a mapping score. =head1 METHODS -new -old_ArchiveStableId -new_ArchiveStableId -score -get_attribute -ident_string + new + old_ArchiveStableId + new_ArchiveStableId + score + get_attribute + ident_string =head1 RELATED MODULES -Bio::EnsEMBL::ArchiveStableId -Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor -Bio::EnsEMBL::StableIdHistoryTree - -=head1 LICENCE - -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. - -=head1 AUTHOR - -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team - -=head1 CONTACT - -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> + Bio::EnsEMBL::ArchiveStableId + Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor + Bio::EnsEMBL::StableIdHistoryTree =cut +package Bio::EnsEMBL::StableIdEvent; use strict; use warnings; diff --git a/modules/Bio/EnsEMBL/StableIdHistoryTree.pm b/modules/Bio/EnsEMBL/StableIdHistoryTree.pm index d08ef72b687483d729147b55ddebcd4784a37f2d..3209d74832c3ff69183a74512f2e0994a36077ef 100644 --- a/modules/Bio/EnsEMBL/StableIdHistoryTree.pm +++ b/modules/Bio/EnsEMBL/StableIdHistoryTree.pm @@ -1,65 +1,90 @@ -package Bio::EnsEMBL::StableIdHistoryTree; +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::StableIdHistoryTree - object representing a stable ID history tree + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html -my $reg = "Bio::EnsEMBL::Registry"; -my $archiveStableIdAdaptor = - $reg->get_adaptor('human', 'core', 'ArchiveStableId'); +=head1 CONTACT -my $stable_id = 'ENSG00000068990'; -my $history = $archiveStableIdAdaptor->fetch_history_tree_by_stable_id('ENSG01'); + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -print "Unique stable IDs in this tree:\n"; -print join(", ", @{ $history->get_unique_stable_ids }), "\n"; + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -print "\nReleases in this tree:\n"; -print join(", ", @{ $history->get_release_display_names }), "\n"; +=cut -print "\nCoordinates of nodes in the tree:\n\n"; -foreach my $a (@{ $history->get_all_ArchiveStableIds }) { - print " Stable ID: ".$a->stable_id.".".$a->version."\n"; - print " Release: ".$a->release." (".$a->assembly.", ".$a->db_name.")\n"); - print " coords: ".join(', ', @{ $history->coords_by_ArchiveStableId($a) })."\n\n"; -} +=head1 NAME + +Bio::EnsEMBL::StableIdHistoryTree - object representing a stable ID history tree + +=head1 SYNOPSIS + + my $reg = "Bio::EnsEMBL::Registry"; + my $archiveStableIdAdaptor = + $reg->get_adaptor( 'human', 'core', 'ArchiveStableId' ); + + my $stable_id = 'ENSG00000068990'; + my $history = + $archiveStableIdAdaptor->fetch_history_tree_by_stable_id('ENSG01'); + + print "Unique stable IDs in this tree:\n"; + print join( ", ", @{ $history->get_unique_stable_ids } ), "\n"; + + print "\nReleases in this tree:\n"; + print join( ", ", @{ $history->get_release_display_names } ), "\n"; + + print "\nCoordinates of nodes in the tree:\n\n"; + foreach my $a ( @{ $history->get_all_ArchiveStableIds } ) { + print " Stable ID: " . $a->stable_id . "." . $a->version . "\n"; + print " Release: " + . $a->release . " (" + . $a->assembly . ", " + . $a->db_name . ")\n"; + print " coords: " + . join( ', ', @{ $history->coords_by_ArchiveStableId($a) } ) + . "\n\n"; + } =head1 DESCRIPTION This object represents a stable ID history tree graph. -The graph is implemented as a collection of nodes (ArchiveStableId objects) and -links (StableIdEvent objects) which have positions on an (x,y) grid. The x axis -is used for releases, the y axis for stable_ids. The idea is to create a plot -similar to this (the numbers shown on the nodes are the stable ID versions): +The graph is implemented as a collection of nodes (ArchiveStableId +objects) and links (StableIdEvent objects) which have positions +on an (x,y) grid. The x axis is used for releases, the y axis for +stable_ids. The idea is to create a plot similar to this (the numbers +shown on the nodes are the stable ID versions): -ENSG001 1-------------- 2-- - \ -ENSG003 1-----1 - / -ENSG002 1-------2---------- + ENSG001 1-------------- 2-- + \ + ENSG003 1-----1 + / + ENSG002 1-------2---------- - 38 39 40 41 42 + 38 39 40 41 42 -The grid coordinates of the ArchiveStableId objects in this example would -be (note that coordinates are zero-based): +The grid coordinates of the ArchiveStableId objects in this example +would be (note that coordinates are zero-based): -ENSG001.1 (0, 0) -ENSG001.2 (2, 0) -ENSG003.1 (release 41) (3, 1) -ENSG003.1 (release 42) (4, 1) -ENSG002.1 (0, 2) -ENSG002.2 (1, 2) + ENSG001.1 (0, 0) + ENSG001.2 (2, 0) + ENSG003.1 (release 41) (3, 1) + ENSG003.1 (release 42) (4, 1) + ENSG002.1 (0, 2) + ENSG002.2 (1, 2) The tree will only contain those nodes which had a change in the stable ID version. Therefore, in the above example, in release 39 ENSG001 was present and had version 1 (but will not be drawn there, to unclutter the output). -The grid positions will be calculated by the API and will try to untangle the -tree (i.e. try to avoid overlapping lines). +The grid positions will be calculated by the API and will try to +untangle the tree (i.e. try to avoid overlapping lines). =head1 METHODS @@ -89,26 +114,13 @@ tree (i.e. try to avoid overlapping lines). =head1 RELATED MODULES -Bio::EnsEMBL::ArchiveStableId -Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor -Bio::EnsEMBL::StableIdEvent - -=head1 LICENCE - -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. - -=head1 AUTHOR - -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team - -=head1 CONTACT - -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> + Bio::EnsEMBL::ArchiveStableId + Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor + Bio::EnsEMBL::StableIdEvent =cut +package Bio::EnsEMBL::StableIdHistoryTree; use strict; use warnings; diff --git a/modules/Bio/EnsEMBL/Storable.pm b/modules/Bio/EnsEMBL/Storable.pm index 8bcb8c0862ea7af8cc96f33900a96a35960f9eb3..2cdfade77f7e15ed96e22a6f3f2e3cb3f9142e89 100644 --- a/modules/Bio/EnsEMBL/Storable.pm +++ b/modules/Bio/EnsEMBL/Storable.pm @@ -1,6 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::Storable -# +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -8,23 +24,16 @@ Bio::EnsEMBL::Storable =head1 SYNOPSIS - my $dbID = $storable_object->dbID(); + my $dbID = $storable_object->dbID(); my $adaptor = $storable_object->adaptor(); - if($storable_object->is_stored($db_adaptor))) { - ... - } -=head1 DESCRIPTION - -This is a storable base class. All objects which are storable in the database -should inherit from this class. It provides two getter/setters: dbID() -adaptor(). And a is_stored() method that can be used to determine if an -object is already stored in a database. + if ( $storable_object->is_stored($db_adaptor) ) { ... } -=head1 AUTHOR - Graham McVicker - -=head1 CONTACT +=head1 DESCRIPTION -Post questions to the Ensembl development list B<ensembl-dev@ebi.ac.uk> +This is a storable base class. All objects which are storable +in the database should inherit from this class. It provides two +getter/setters: dbID() adaptor(). And a is_stored() method that can be +used to determine if an object is already stored in a database. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/StrainSlice.pm b/modules/Bio/EnsEMBL/StrainSlice.pm index ee547c498cd8be8a92dc764df45629e0a922064b..5f005cf79d8af328f54184d1aea5e7ee31639ef7 100644 --- a/modules/Bio/EnsEMBL/StrainSlice.pm +++ b/modules/Bio/EnsEMBL/StrainSlice.pm @@ -1,55 +1,63 @@ -# -# Ensembl module for Bio::EnsEMBL::StrainSlice -# -# -# Copyright Team Ensembl -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 NAME + This software is distributed under a modified Apache license. + For license details, please see -Bio::EnsEMBL::StrainSlice - SubClass of the Slice. Represents the slice of the genome for a certain strain (applying the variations) + http://www.ensembl.org/info/about/code_licence.html -=head1 SYNOPSIS +=head1 CONTACT - $sa = $db->get_SliceAdaptor; + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. - $slice = $sa->fetch_by_region('chromosome', 'X', 1_000_000, 2_000_000); + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. - $strainSlice = $slice->get_by_strain($strain_name); +=cut - #get the sequence from the Strain Slice - my $seq = $strainSlice->seq(); - print $seq; +=head1 NAME - #get allele features between this StrainSlice and the reference - my $afs = $strainSlice->get_all_AlleleFeatures_Slice(); - foreach my $af (@{$afs}){ - print "AlleleFeature in position ", $af->start,"-",$af->end," in strain with allele ", $af->allele_string,"\n"; - } - #compare a strain against another strain - my $strainSlice_2 = $slice->get_by_strain($strain_name_2); - my $differences = $strainSlice->get_all_differences_StrainSlice($strainSlice_2); - foreach my $difference (@{$differences}){ - print "Difference in position ", $difference->start,"-",$difference->end," in strain with allele ", $difference->allele_string,"\n"; - } +Bio::EnsEMBL::StrainSlice - SubClass of the Slice. Represents the slice +of the genome for a certain strain (applying the variations) +=head1 SYNOPSIS + $sa = $db->get_SliceAdaptor; + $slice = + $sa->fetch_by_region( 'chromosome', 'X', 1_000_000, 2_000_000 ); -=head1 DESCRIPTION + $strainSlice = $slice->get_by_strain($strain_name); -A StrainSlice object represents a region of a genome for a certain strain. It can be used to retrieve -sequence or features from a strain. + # get the sequence from the Strain Slice + my $seq = $strainSlice->seq(); + print $seq; -=head1 CONTACT + # get allele features between this StrainSlice and the reference + my $afs = $strainSlice->get_all_AlleleFeatures_Slice(); + foreach my $af ( @{$afs} ) { + print "AlleleFeature in position ", $af->start, "-", $af->end, + " in strain with allele ", $af->allele_string, "\n"; + } + + # compare a strain against another strain + my $strainSlice_2 = $slice->get_by_strain($strain_name_2); + my $differences = + $strainSlice->get_all_differences_StrainSlice($strainSlice_2); -This modules is part of the Ensembl project http://www.ensembl.org + foreach my $difference ( @{$differences} ) { + print "Difference in position ", $difference->start, "-", + $difference->end(), " in strain with allele ", + $difference->allele_string(), "\n"; + } + +=head1 DESCRIPTION -Questions can be posted to the ensembl-dev mailing list: -ensembl-dev@ebi.ac.uk +A StrainSlice object represents a region of a genome for a certain +strain. It can be used to retrieve sequence or features from a strain. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/TopLevelAssemblyMapper.pm b/modules/Bio/EnsEMBL/TopLevelAssemblyMapper.pm index f3a492b78a0ba96212052e6f49b3067ceff90d90..c70ca2ca393bd5a9e3d145c636c25d6a340956ac 100644 --- a/modules/Bio/EnsEMBL/TopLevelAssemblyMapper.pm +++ b/modules/Bio/EnsEMBL/TopLevelAssemblyMapper.pm @@ -1,47 +1,58 @@ -# -# Ensembl module for Bio::EnsEMBL::AssemblyMapper -# -# Written by Graham McVicker -# -# Copyright GRL and EBI -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME Bio::EnsEMBL::TopLevelMapper - -Handles mapping between a given coordinate system and the toplevel pseudo -coordinate system. +Handles mapping between a given coordinate system and the toplevel +pseudo coordinate system. =head1 SYNOPSIS - $db = Bio::EnsEMBL::DBSQL::DBAdaptor->new(...); - $asma = $db->get_AssemblyMapperAdaptor(); - $csa = $db->get_CoordSystemAdaptor(); + $db = Bio::EnsEMBL::DBSQL::DBAdaptor->new(...); + $asma = $db->get_AssemblyMapperAdaptor(); + $csa = $db->get_CoordSystemAdaptor(); - my $toplevel = $cs_adaptor->fetch_by_name('toplevel'); - my $ctg_cs = $cs_adaptor->fetch_by_name('contig'); + my $toplevel = $cs_adaptor->fetch_by_name('toplevel'); + my $ctg_cs = $cs_adaptor->fetch_by_name('contig'); - $asm_mapper = $map_adaptor->fetch_by_CoordSystems($cs1, $cs2); + $asm_mapper = $map_adaptor->fetch_by_CoordSystems( $cs1, $cs2 ); - #map to toplevel coord system for this region - @chr_coords = $asm_mapper->map('AL30421.1.200.92341',100,10000,-1,$ctg_cs); + # map to toplevel coord system for this region + @chr_coords = + $asm_mapper->map( 'AL30421.1.200.92341', 100, 10000, -1, $ctg_cs ); - #list toplevel seq_region_ids for this region - @chr_ids = $asm_mapper->list_ids('AL30421.1.200.92341',1,1000,-1,$ctg_cs); + # list toplevel seq_region_ids for this region + @chr_ids = + $asm_mapper->list_ids( 'AL30421.1.200.92341', 1, 1000, -1, + $ctg_cs ); =head1 DESCRIPTION -The TopLevelAssemblyMapper performs mapping between a provided coordinate -system and the toplevel pseudo cooordinate system. The toplevel coordinate -system is not a real coordinate system, but represents the highest coordinate -system that can be mapped to in a given region. It is only possible to -perform unidirectional mapping using this mapper, because it does not make -sense to map from the toplevel coordinate system to another coordinate system. - -=head1 CONTACT - -Post general queries to B<ensembl-dev@ebi.ac.uk> +The TopLevelAssemblyMapper performs mapping between a provided +coordinate system and the toplevel pseudo cooordinate system. The +toplevel coordinate system is not a real coordinate system, but +represents the highest coordinate system that can be mapped to in a +given region. It is only possible to perform unidirectional mapping +using this mapper, because it does not make sense to map from the +toplevel coordinate system to another coordinate system. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/Transcript.pm b/modules/Bio/EnsEMBL/Transcript.pm index b9df0213972a0fb13118e70936566cf5c09d386e..8157b59dbf807d08c57b2b5acd099aa61214aaf2 100755 --- a/modules/Bio/EnsEMBL/Transcript.pm +++ b/modules/Bio/EnsEMBL/Transcript.pm @@ -1,4 +1,22 @@ -package Bio::EnsEMBL::Transcript; +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -8,20 +26,20 @@ Bio::EnsEMBL::Transcript - object representing an Ensembl transcript Creation: - my $tran = new Bio::EnsEMBL::Transcript(); - my $tran = new Bio::EnsEMBL::Transcript(-EXONS => \@exons); + my $tran = new Bio::EnsEMBL::Transcript(); + my $tran = new Bio::EnsEMBL::Transcript( -EXONS => \@exons ); Manipulation: - # Returns an array of Exon objects - my @exons = @{$tran->get_all_Exons()}; + # Returns an array of Exon objects + my @exons = @{ $tran->get_all_Exons() }; - # Returns the peptide translation of the exons as a Bio::Seq - if($tran->translation() { - my $pep = $tran->translate(); - } else { - print "Transcript ", $tran->stable_id(), " is non-coding\n"; - } + # Returns the peptide translation of the exons as a Bio::Seq + if ( $tran->translation() ) { + my $pep = $tran->translate(); + } else { + print "Transcript ", $tran->stable_id(), " is non-coding\n"; + } =head1 DESCRIPTION @@ -29,22 +47,12 @@ A representation of a transcript within the Ensembl system. A transcript consists of a set of Exons and (possibly) a Translation which defines the coding and non-coding regions of the exons. -=head1 LICENCE - -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. - -=head1 AUTHOR - -Ensembl core API team - -=head1 CONTACT - -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> +=head1 METHODS =cut +package Bio::EnsEMBL::Transcript; + use strict; use Bio::EnsEMBL::Feature; diff --git a/modules/Bio/EnsEMBL/TranscriptFactory.pm b/modules/Bio/EnsEMBL/TranscriptFactory.pm index 8dcf1504471e1c70618f1da2370dac0bd474cd87..62a68bc894b7e8014cb2424e223e7ceaaf148ab2 100755 --- a/modules/Bio/EnsEMBL/TranscriptFactory.pm +++ b/modules/Bio/EnsEMBL/TranscriptFactory.pm @@ -1,13 +1,22 @@ -# Ensembl module for Bio::EnsEMBL::TranscriptFactory -# -# Cared for by EnsEMBL (www.ensembl.org) -# -# Copyright GRL and EBI -# -# You may distribute this module under the same terms as perl itself -# POD documentation - main docs before the code +=head1 LICENSE + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -16,9 +25,9 @@ subroutines =head1 SYNOPSIS - use Bio::EnsEMBL::TranscriptFactory; + use Bio::EnsEMBL::TranscriptFactory; - &Bio::EnsEMBL::TranscriptFactory::fset2transcript($fset_id); + &Bio::EnsEMBL::TranscriptFactory::fset2transcript($fset_id); =head1 DESCRIPTION @@ -26,19 +35,10 @@ Module containing the subroutines fset2transcript*, which create transcripts from features (formally housed in Bio::EnsEMBL::DBSQL::Utils). -=head1 CONTACT - -Ensembl - ensembl-dev@ebi.ac.uk - -=head1 APPENDIX - -The rest of the documentation details each of the object methods. -Internal methods are usually preceded with a _ +=head1 METHODS =cut - - package Bio::EnsEMBL::TranscriptFactory; use strict; diff --git a/modules/Bio/EnsEMBL/TranscriptMapper.pm b/modules/Bio/EnsEMBL/TranscriptMapper.pm index d8b6d713b1be6bf807a7addcb824299caaf54c05..25abb9d325a3bd8f0a9addf74fdfd326d58b5574 100644 --- a/modules/Bio/EnsEMBL/TranscriptMapper.pm +++ b/modules/Bio/EnsEMBL/TranscriptMapper.pm @@ -1,10 +1,22 @@ -# -# Ensembl module for TranscriptMapper -# -# Copyright (c) 2004 Ensembl -# -# You may distribute this module under the same terms as perl itself -# +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -15,35 +27,30 @@ between a number of coordinate systems relating to transcripts my $trmapper = Bio::EnsEMBL::TranscriptMapper->new($transcript); - @coords = $trmapper->cdna2genomic(123, 554); + @coords = $trmapper->cdna2genomic( 123, 554 ); - @coords = $trmapper->genomic2cdna(141, 500, -1); + @coords = $trmapper->genomic2cdna( 141, 500, -1 ); - @coords = $trmapper->genomic2cds(141, 500, -1); + @coords = $trmapper->genomic2cds( 141, 500, -1 ); - @coords = $trmapper->pep2genomic(10, 60); - - @coords = $trmapper->genomic2pep(123, 400, 1); + @coords = $trmapper->pep2genomic( 10, 60 ); + @coords = $trmapper->genomic2pep( 123, 400, 1 ); =head1 DESCRIPTION This is a utility class which can be used to perform coordinate conversions between a number of coordinate systems relating to transcripts. -=head1 CONTACT - -Email questions to the ensembl developer mailing list <ensembl-dev@ebi.ac.uk> - =head1 METHODS =cut +package Bio::EnsEMBL::TranscriptMapper; + use strict; use warnings; -package Bio::EnsEMBL::TranscriptMapper; - use Bio::EnsEMBL::Utils::Exception qw(throw); use Bio::EnsEMBL::Mapper; diff --git a/modules/Bio/EnsEMBL/Translation.pm b/modules/Bio/EnsEMBL/Translation.pm index ee3a43cef15cb29ef2f43281ceedf33a9fef5aae..9b9a44e17a2e28cbd64a20be9ecf481e8b1a5171 100755 --- a/modules/Bio/EnsEMBL/Translation.pm +++ b/modules/Bio/EnsEMBL/Translation.pm @@ -1,4 +1,22 @@ -package Bio::EnsEMBL::Translation; +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -19,30 +37,18 @@ transcript # get start and end position in start/end exons my $start = $translation->start; - my $end = $translation->end; + my $end = $translation->end; =head1 DESCRIPTION A Translation object defines the CDS and UTR regions of a Transcript through the use of start_Exon/end_Exon, and start/end attributes. -=head1 LICENCE - -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. - -=head1 AUTHOR - -Ensembl core API team - -=head1 CONTACT - -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> - =cut +package Bio::EnsEMBL::Translation; + use vars qw($AUTOLOAD @ISA); use strict; diff --git a/modules/Bio/EnsEMBL/UnconventionalTranscriptAssociation.pm b/modules/Bio/EnsEMBL/UnconventionalTranscriptAssociation.pm index ce2b47fc85c163659359090a3613eb4d4b00bc4d..524c0be3878eba56c39e51133a1a57ff0524a681 100644 --- a/modules/Bio/EnsEMBL/UnconventionalTranscriptAssociation.pm +++ b/modules/Bio/EnsEMBL/UnconventionalTranscriptAssociation.pm @@ -1,24 +1,37 @@ -# -# EnsEMBL module for Bio::EnsEMBL::UnconventionalTranscriptAssociation -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=pod + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME - Bio::EnsEMBL::UnconventionalTranscriptAssociation - - A class representing an some sort of unconventional association - between a gene and a transcript. +Bio::EnsEMBL::UnconventionalTranscriptAssociation - A class representing +an some sort of unconventional association between a gene and a +transcript. =head1 SYNOPSIS - $ex = new Bio::EnsEMBL::UnconventionalTranscriptAssociation(Gene g, Transcript t, String type); + $ex = new Bio::EnsEMBL::UnconventionalTranscriptAssociation( $gene, + $transcript, $type ); -=cut +=head1 METHODS +=cut package Bio::EnsEMBL::UnconventionalTranscriptAssociation; use vars qw(@ISA); diff --git a/modules/Bio/EnsEMBL/UnmappedObject.pm b/modules/Bio/EnsEMBL/UnmappedObject.pm index d2a8bee274e35b016f122d238f8d00170df04ff0..041def605496cd7a1a3319b40ceface65c4f2d22 100644 --- a/modules/Bio/EnsEMBL/UnmappedObject.pm +++ b/modules/Bio/EnsEMBL/UnmappedObject.pm @@ -1,42 +1,51 @@ -# -# Ensembl module for Bio::EnsEMBL::UnmappedObject -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 NAME + This software is distributed under a modified Apache license. + For license details, please see -Bio:EnsEMBL::UnmappedObject - A object representing why a particular entity -was NOT mapped to the ensembl. + http://www.ensembl.org/info/about/code_licence.html -=head1 SYNOPSIS +=head1 CONTACT -use Bio::EnsEMBL::UnmappedObject; + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -my $uo = Bio::EnsEMBL::UnmappedObject->new ( - -type => 'xref', - -analysis => $analysis, - -external_db_id => 4100, - -identifier => "Q12345", - -query_score => 45.5, - -target_score => 29.2, - -ensembl_id => 122346, - -ensembl_type => 'Translation", - -summary => "match failed for exonerate", - -full_desc => "match failed for the xref exonerate run as mtch was below threshold of 90"); + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. +=cut -=head1 DESCRIPTION +=head1 NAME + +Bio:EnsEMBL::UnmappedObject - A object representing why a particular entity +was NOT mapped to the ensembl. -UnmappedObjects represent entities NOT mapped to ensembl. Therefore this should help -users to find out why certain accessions etc can not be found. +=head1 SYNOPSIS -This module is part of the Ensembl project http://www.ensembl.org + use Bio::EnsEMBL::UnmappedObject; + + my $uo = Bio::EnsEMBL::UnmappedObject->new( + -type => 'xref', + -analysis => $analysis, + -external_db_id => 4100, + -identifier => "Q12345", + -query_score => 45.5, + -target_score => 29.2, + -ensembl_id => 122346, + -ensembl_type => "Translation", + -summary => "match failed for exonerate", + -full_desc => "match failed for the xref exonerate run " + . "as match was below threshold of 90" + ); -=head1 CONTACT +=head1 DESCRIPTION -Post comments/questions to the ensembl development list: ensembl-dev@ebi.ac.uk +UnmappedObjects represent entities NOT mapped to ensembl. Therefore this +should help users to find out why certain accessions etc can not be +found. =head1 METHODS @@ -44,11 +53,11 @@ Post comments/questions to the ensembl development list: ensembl-dev@ebi.ac.uk +package Bio::EnsEMBL::UnmappedObject; + use strict; use warnings; -package Bio::EnsEMBL::UnmappedObject; - use Bio::EnsEMBL::Utils::Argument qw(rearrange); use Bio::EnsEMBL::Utils::Exception qw(throw); use Bio::EnsEMBL::Storable; diff --git a/modules/Bio/EnsEMBL/Upstream.pm b/modules/Bio/EnsEMBL/Upstream.pm index f46735426735a877e82d1150428aa4e32b4ad821..0bb8ad2efc7f96da5d5a9792ee052319844bb60f 100644 --- a/modules/Bio/EnsEMBL/Upstream.pm +++ b/modules/Bio/EnsEMBL/Upstream.pm @@ -1,8 +1,22 @@ -# Copyright Ensembl -# -# You may distribute this module under the same terms as perl itself -# -# POD documentation - main docs before the code +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -10,43 +24,43 @@ Bio::EnsEMBL::Upstream - Object that defines an upstream region =head1 SYNOPSIS -use Bio::EnsEMBL::Upstream; + use Bio::EnsEMBL::Upstream; -my $upstream = Bio::EnsEMBL::Upstream->new(-transcript => $transcript, - -length => 2000); # bp + my $upstream = Bio::EnsEMBL::Upstream->new( + -transcript => $transcript, + -length => 2000 # bp + ); -# Retrieve coordinates of upstream region -my $upstream_region_start = $upstream->upstart; -my $upstream_region_end = $upstream->upend; + # Retrieve coordinates of upstream region + my $upstream_region_start = $upstream->upstart; + my $upstream_region_end = $upstream->upend; -# Retrieve coordinates in 'downstream' first intron -my $intron_region_start = $upstream->downstart; -my $intron_region_end = $upstream->downend; + # Retrieve coordinates in 'downstream' first intron + my $intron_region_start = $upstream->downstart; + my $intron_region_end = $upstream->downend; -# Coordinates are returned in the same scheme as the input transcript. -# However, the coordinates of an upstream region can be transformed -# to any other scheme using a slice + # Coordinates are returned in the same scheme as the input transcript. + # However, the coordinates of an upstream region can be transformed to + # any other scheme using a slice -$upstream->transform($slice); + $upstream->transform($slice); -# coordinates can be retrieved in scheme in the same manner as the above. + # Coordinates can be retrieved in scheme in the same manner as the + # above. =head1 DESCRIPTION -An object that determines the upstream region of a transcript. Such -a region is non-coding and ensures that other genes or transcripts -are not present. Ultimately, these objects can be used to looking -for promoter elements. To this end, it is also possible to derive -a region downstream of the first exon, within the first intron and -where promoter elements sometimes are found. +An object that determines the upstream region of a transcript. Such a +region is non-coding and ensures that other genes or transcripts are +not present. Ultimately, these objects can be used to looking for +promoter elements. To this end, it is also possible to derive a region +downstream of the first exon, within the first intron and where promoter +elements sometimes are found. -=head1 CONTACT - -Contact the EnsEMBL development mailing list for info <ensembl-dev@ebi.ac.uk> +=head1 METHODS =cut - package Bio::EnsEMBL::Upstream; use strict; diff --git a/modules/Bio/EnsEMBL/Utils/Argument.pm b/modules/Bio/EnsEMBL/Utils/Argument.pm index d27d2aeb2e97088974573697de6c38dd2339e945..c61eec72dd20da12a3d246c113fdc41cca2d8ed7 100644 --- a/modules/Bio/EnsEMBL/Utils/Argument.pm +++ b/modules/Bio/EnsEMBL/Utils/Argument.pm @@ -1,6 +1,22 @@ -# EnsEMBL module for Bio::EnsEMBL::Utils::Exception -# -# +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -8,43 +24,40 @@ Bio::EnsEMBL::Utils::Argument - Utility functions for argument handling =head1 SYNOPSIS - use Bio::EnsEMBL::Utils::Argument qw(rearrange) + use Bio::EnsEMBL::Utils::Argument qw(rearrange) - package Feature; + package Feature; - sub new { - my $class = shift; - my ($start, $end, $strand) = rearrange(['START', 'END', 'STRAND'],@_); - return bless({'start'=>$start, 'end'=>$end, 'strand'=>$strand}, $class); - } + sub new { + my $class = shift; + my ( $start, $end, $strand ) = + rearrange( [ 'START', 'END', 'STRAND' ], @_ ); + + return + bless( { 'start' => $start, 'end' => $end, 'strand' => $strand }, + $class ); + } =head1 DESCRIPTION This is derived from the Bio::Root module in BioPerl. The _rearrange -object method taken from BioPerl has been renamed rearrange and is now a -static class method. This method was originally written by Lincoln Stein, -and has since been refactored several times by various people (as described -below). +object method taken from BioPerl has been renamed rearrange and is now +a static class method. This method was originally written by Lincoln +Stein, and has since been refactored several times by various people (as +described below). -It is recommended that this package be used instead of inheriting +It is recommended that this package be used instead of inheriting unnecessarily from the Bio::EnsEMBL::Root or Bio::Root object. -=head1 CONTACT - -Post questions to the EnsEMBL development list: ensembl-dev@ebi.ac.uk - -=head1 APPENDIX - -The rest of the documentation details exported static class methods. +=head1 METHODS =cut +package Bio::EnsEMBL::Utils::Argument; use strict; use warnings; -package Bio::EnsEMBL::Utils::Argument; - use Exporter; use vars qw(@ISA @EXPORT); diff --git a/modules/Bio/EnsEMBL/Utils/AssemblyProjector.pm b/modules/Bio/EnsEMBL/Utils/AssemblyProjector.pm index 88933b6408786422a7e81c0db91b99841d718c72..4b02608eb5d5c9b193e9818c52468aba4f2d36fd 100644 --- a/modules/Bio/EnsEMBL/Utils/AssemblyProjector.pm +++ b/modules/Bio/EnsEMBL/Utils/AssemblyProjector.pm @@ -1,4 +1,22 @@ -package Bio::EnsEMBL::Utils::AssemblyProjector; +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -16,8 +34,8 @@ utility class to post-process projections from one assembly to another -group => 'core_old', ); - # connect to the new database containing the mapping between old and new - # assembly + # connect to the new database containing the mapping between old and + # new assembly my $dba_new = new Bio::EnsEMBL::DBSQL::DBAdaptor( -host => 'ensembldb.ensembl.org', -port => 3306, @@ -27,93 +45,82 @@ utility class to post-process projections from one assembly to another ); my $assembly_projector = Bio::EnsEMBL::Utils::AssemblyProjector->new( - -OLD_ASSEMBLY => 'NCBIM36', - -NEW_ASSEMBLY => 'NCBIM37', - -ADAPTOR => $dba_new, - -EXTERNAL_SOURCE => 1, - -MERGE_FRAGMENTS => 1, - -CHECK_LENGTH => 0, + -OLD_ASSEMBLY => 'NCBIM36', + -NEW_ASSEMBLY => 'NCBIM37', + -ADAPTOR => $dba_new, + -EXTERNAL_SOURCE => 1, + -MERGE_FRAGMENTS => 1, + -CHECK_LENGTH => 0, ); # fetch a slice on the old assembly my $slice_adaptor = $dba_old->get_SliceAdaptor; - my $slice = $slice_adaptor->fetch_by_region('chromosome', 1, undef, undef, - undef, 'NCBIM36'); + my $slice = + $slice_adaptor->fetch_by_region( 'chromosome', 1, undef, undef, + undef, 'NCBIM36' ); my $new_slice = $assembly_projector->old_to_new($slice); - + print $new_slice->name, " (", $assembly_projector->last_status, ")\n"; =head1 DESCRIPTION -This class implements some utility functions for converting coordinates between -assemblies. A mapping between the two assemblies has to present the database for -this to work, see the 'Related Modules' section below on how to generate the -mapping. +This class implements some utility functions for converting coordinates +between assemblies. A mapping between the two assemblies has to present +the database for this to work, see the 'Related Modules' section below +on how to generate the mapping. -In addition to the "raw" projecting of features and slices, the methods in this -module also apply some sensible rules to the results of the projection (like -discarding unwanted results or merging fragmented projections). These are the -rules (depending on configuration): +In addition to the "raw" projecting of features and slices, the methods +in this module also apply some sensible rules to the results of the +projection (like discarding unwanted results or merging fragmented +projections). These are the rules (depending on configuration): Discard the projected feature/slice if: 1. it doesn't project at all (no segments returned) 2. [unless MERGE_FRAGMENTS is set] the projection is fragmented (more than one segment) - 3. [if CHECK_LENGTH is set] the projection doesn't have the same length - as the original feature/slice + 3. [if CHECK_LENGTH is set] the projection doesn't have the same + length as the original feature/slice 4. all segments are on same chromosome and strand -If a projection fails any of these rules, undef is returned instead of a -projected feature/slice. You can use the last_status() method to find out about -the results of the rules tests. +If a projection fails any of these rules, undef is returned instead of +a projected feature/slice. You can use the last_status() method to find +out about the results of the rules tests. -Also note that when projecting features, only a shallow projection is performed, -i.e. other features attached to your features (e.g. the transcripts of a gene) -are not projected automatically, so it will be the responsability of the user -code project all levels of features involved. +Also note that when projecting features, only a shallow projection is +performed, i.e. other features attached to your features (e.g. the +transcripts of a gene) are not projected automatically, so it will be +the responsability of the user code project all levels of features +involved. =head1 METHODS -new -project -old_to_new -new_to_old -adaptor -external_source -old_assembly -new_assembly -merge_fragments -check_length + new + project + old_to_new + new_to_old + adaptor + external_source + old_assembly + new_assembly + merge_fragments + check_length -=head1 REALTED MODULES +=head1 RELATED MODULES -The process of creating a whole genome alignment between two assemblies (which -is the basis for the use of the methods in this class) is done by a series of -scripts. Please see +The process of creating a whole genome alignment between two assemblies +(which is the basis for the use of the methods in this class) is done by +a series of scripts. Please see ensembl/misc-scripts/assembly/README -for a high-level description of this process, and POD in the individual scripts -for the details. - -=head1 LICENCE - -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. - -=head1 AUTHOR - -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team - -=head1 CONTACT - -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> +for a high-level description of this process, and POD in the individual +scripts for the details. =cut +package Bio::EnsEMBL::Utils::AssemblyProjector; use strict; use warnings; diff --git a/modules/Bio/EnsEMBL/Utils/BitString.pm b/modules/Bio/EnsEMBL/Utils/BitString.pm index 8497223d79d4f894f69bad848c68d5c1dae7777c..bacaccfa6574dd369d2d0fcda2350f2eef9ed6f0 100755 --- a/modules/Bio/EnsEMBL/Utils/BitString.pm +++ b/modules/Bio/EnsEMBL/Utils/BitString.pm @@ -1,31 +1,39 @@ -package Bio::EnsEMBL::Utils::BitString; +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::Utils::BitString - bitstring object implementation + This software is distributed under a modified Apache license. + For license details, please see -=head1 DESCRIPTION + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -This is an implementation of a bitstring object, taken from Damian Convey's book -"Object Oriented Perl". + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 LICENCE +=cut -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. +=head1 NAME -=head1 AUTHOR +Bio::EnsEMBL::Utils::BitString - bitstring object implementation -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team +=head1 DESCRIPTION -=head1 CONTACT +This is an implementation of a bitstring object, taken from Damian +Convey's book "Object Oriented Perl". -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> +=head1 METHODS =cut +package Bio::EnsEMBL::Utils::BitString; + use strict; use warnings; no warnings 'uninitialized'; diff --git a/modules/Bio/EnsEMBL/Utils/Cache.pm b/modules/Bio/EnsEMBL/Utils/Cache.pm index 5d5f5e16a1cc3767c9c550b1757441bb07b50ce2..751907d3477d78c8386e46e638b572f41ec8a356 100644 --- a/modules/Bio/EnsEMBL/Utils/Cache.pm +++ b/modules/Bio/EnsEMBL/Utils/Cache.pm @@ -1,9 +1,6 @@ -#!/usr/local/bin/perl -w - -# -# This package, originally distributed by CPAN, has been modified from its -# original version in order to be used by the ensembl project. -# +# This package, originally distributed by CPAN, has been modified from +# its original version in order to be used by the ensembl project. +# # 8 July 2002 - changed package name # diff --git a/modules/Bio/EnsEMBL/Utils/CigarString.pm b/modules/Bio/EnsEMBL/Utils/CigarString.pm index aa997a24f9a077c5477412c3d621a9cf6ca010c3..4153fd9cfca911fa9ef7e39aa8d7209e05c41d7b 100644 --- a/modules/Bio/EnsEMBL/Utils/CigarString.pm +++ b/modules/Bio/EnsEMBL/Utils/CigarString.pm @@ -1,47 +1,63 @@ -# EnsEMBL Utilities Module to Generate cigar line. -# -# Created and cared for by Juguang Xiao <juguang@tll.org.sg> -# -# Copyright EnsEMBL project 2003 -# -# This module is fetched out from Bio::EnsEMBL::Pipeline::BlastWorn and -# http:://www.ensembl.org/Docs/ensmebl9 -# -# POD documentation +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=head1 AUTHOR + +Juguang Xiao <juguang@tll.org.sg> + +=cut =head1 NAME -Bio::EnsEMBL::Utils::CigarString, a utilites module to generate cigar strings - +Bio::EnsEMBL::Utils::CigarString, a utilites module to generate cigar +strings + =head1 DESCRIPTION -Sequence alignment hits were previously stored within the core database as -ungapped alignments. This imposed 2 major constraints on alignments: +Sequence alignment hits were previously stored within the core database +as ungapped alignments. This imposed 2 major constraints on alignments: -a) alignments for a single hit record would require multiple rows in the -database, and -b) it was not possible to accurately retrieve the exact original alignment. +a) alignments for a single hit record would require multiple rows in the + database, and +b) it was not possible to accurately retrieve the exact original + alignment. -Therefore, in the new branch sequence alignments are now stored as ungapped -alignments in the cigar line format (where CIGAR stands for Concise -Idiosyncratic Gapped Alignment Report). +Therefore, in the new branch sequence alignments are now stored as +ungapped alignments in the cigar line format (where CIGAR stands for +Concise Idiosyncratic Gapped Alignment Report). In the cigar line format alignments are sotred as follows: -M: Match -D: Deletino -I: Insertion + M: Match + D: Deletino + I: Insertion + +An example of an alignment for a hypthetical protein match is shown +below: -An example of an alignment for a hypthetical protein match is shown below: + Query: 42 PGPAGLP----GSVGLQGPRGLRGPLP-GPLGPPL... + PG P G GP R PLGP + Sbjct: 1672 PGTP*TPLVPLGPWVPLGPSSPR--LPSGPLGPTD... -Query: 42 PGPAGLP----GSVGLQGPRGLRGPLP-GPLGPPL... - PG P G GP R PLGP -Sbjct: 1672 PGTP*TPLVPLGPWVPLGPSSPR--LPSGPLGPTD... - -protein_align_feature table as the following cigar line: +protein_align_feature table as the following cigar line: -7M4D12M2I2MD7M + 7M4D12M2I2MD7M =cut @@ -79,12 +95,8 @@ sub split_hsp { my ($qinc, $hinc) = $self->_findIncrements($qstrand,$hstrand,$qtype,$htype); my @gaps = (); - my $string = $hsp->query_string; - my @qchars = unpack("A1" x length($string), $string); - # my @qchars = split(//, $hsp->query_string); # Speed up above - $string = $hsp->hit_string; - my @hchars = unpack("A1" x length($string), $string); - # my @hchars = split(//, $hsp->hit_string); # Speed up above + my @qchars = split(//, $hsp->query_string); + my @hchars = split(//, $hsp->hit_string); my $qstart; if($qstrand == 1){ $qstart = $hsp->query->start; diff --git a/modules/Bio/EnsEMBL/Utils/ConfParser.pm b/modules/Bio/EnsEMBL/Utils/ConfParser.pm index cdcf73bf21eac50a6bfcf16330c66a1c406937e0..c6cc5963b076257aa3dc3862f0faa9bf180e6089 100644 --- a/modules/Bio/EnsEMBL/Utils/ConfParser.pm +++ b/modules/Bio/EnsEMBL/Utils/ConfParser.pm @@ -1,52 +1,58 @@ -package Bio::EnsEMBL::Utils::ConfParser; +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::Utils::ConfParser - configuration parser for perl scripts + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html - my $conf = new Bio::EnsEMBL::Utils::ConfParser( - -SERVERROOT => "/path/to/ensembl", - -DEFAULT_CONF => "my.default.conf" - ); +=head1 CONTACT - # parse options from configuration file and commandline - $conf->parse_options( - 'mandatory_string_opt=s' => 1, - 'optional_numeric_opt=n' => 0, - ); + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. - # get a paramter value - my $val = $conf->param('manadatory_string_op'); + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 DESCRIPTION +=cut -This module parses a configuration file and the commandline options passed to a -script (the latter superseed the former). Configuration files contain ini-file -style name-value pairs, and the commandline options are passed to Getopt::Long -for parsing. +=head1 NAME -The parameter values are consequently accessible via the param() method. You -can also create a commandline string of all current parameters and their values -to pass to another script. +Bio::EnsEMBL::Utils::ConfParser - configuration parser for perl scripts -=head1 LICENCE +=head1 SYNOPSIS -This code is distributed under an Apache style licence: -Please see http://www.ensembl.org/code_licence.html for details + my $conf = new Bio::EnsEMBL::Utils::ConfParser( + -SERVERROOT => "/path/to/ensembl", + -DEFAULT_CONF => "my.default.conf" + ); -=head1 AUTHOR + # parse options from configuration file and commandline + $conf->parse_options( + 'mandatory_string_opt=s' => 1, + 'optional_numeric_opt=n' => 0, + ); -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team + # get a paramter value + my $val = $conf->param('manadatory_string_op'); -=head1 CONTACT +=head1 DESCRIPTION + +This module parses a configuration file and the commandline options +passed to a script (the latter superseed the former). Configuration +files contain ini-file style name-value pairs, and the commandline +options are passed to Getopt::Long for parsing. -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> +The parameter values are consequently accessible via the param() +method. You can also create a commandline string of all current +parameters and their values to pass to another script. =cut +package Bio::EnsEMBL::Utils::ConfParser; + use strict; use warnings; no warnings 'uninitialized'; diff --git a/modules/Bio/EnsEMBL/Utils/ConfigRegistry.pm b/modules/Bio/EnsEMBL/Utils/ConfigRegistry.pm index 59ae0c25a27b327cfaa0ef3a7ff7451f62037d77..66bd1d37522c9d4d2d873a29eb5cb0fb85cbd095 100644 --- a/modules/Bio/EnsEMBL/Utils/ConfigRegistry.pm +++ b/modules/Bio/EnsEMBL/Utils/ConfigRegistry.pm @@ -1,11 +1,22 @@ -# -# Ensembl module for Registry -# -# Copyright EMBL/EBI -## -# You may distribute this module under the same terms as perl itself +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -# POD documentation - main docs before the code +=cut =head1 NAME @@ -14,29 +25,23 @@ Bio::EnsEMBL::Utils::ConfigRegistry; =head1 SYNOPSIS -Bio::EnsEMBL::Utils::ConfigRegistry->load_core($dba ); - - -=head1 DESCRIPTION + Bio::EnsEMBL::Utils::ConfigRegistry->load_core($dba); -The ConfigRegistry will "Register" a set of adaptors based on the type of -database that is being loaded. - -=head1 CONTACT -Post questions to the Ensembl developer list: <ensembl-dev@ebi.ac.uk> +=head1 DESCRIPTION +The ConfigRegistry will "Register" a set of adaptors based on the type +of database that is being loaded. =head1 METHODS =cut +package Bio::EnsEMBL::Utils::ConfigRegistry; use strict; use warnings; -package Bio::EnsEMBL::Utils::ConfigRegistry; - use Bio::EnsEMBL::Registry; my $reg = "Bio::EnsEMBL::Registry"; use Bio::EnsEMBL::Utils::Argument qw(rearrange); diff --git a/modules/Bio/EnsEMBL/Utils/ConversionSupport.pm b/modules/Bio/EnsEMBL/Utils/ConversionSupport.pm index 12402bce848196364f2cb515ad165d635094a4db..c9f7b228ddd92930566044f15bee7481c4e3d75f 100644 --- a/modules/Bio/EnsEMBL/Utils/ConversionSupport.pm +++ b/modules/Bio/EnsEMBL/Utils/ConversionSupport.pm @@ -1,48 +1,57 @@ -package Bio::EnsEMBL::Utils::ConversionSupport; +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::Utils::ConversionSupport - Utility module for Vega release and -schema conversion scripts + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html - my $serverroot = '/path/to/ensembl'; - my $support = new Bio::EnsEMBL::Utils::ConversionSupport($serverroot); +=head1 CONTACT - # parse common options - $support->parse_common_options; + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. - # parse extra options for your script - $support->parse_extra_options('string_opt=s', 'numeric_opt=n'); + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. - # ask user if he wants to run script with these parameters - $support->confirm_params; +=cut - # see individual method documentation for more stuff +=head1 NAME -=head1 DESCRIPTION +Bio::EnsEMBL::Utils::ConversionSupport - Utility module for Vega release and +schema conversion scripts -This module is a collection of common methods and provides helper functions -for the Vega release and schema conversion scripts. Amongst others, it reads -options from a config file, parses commandline options and does logging. +=head1 SYNOPSIS -=head1 LICENCE + my $serverroot = '/path/to/ensembl'; + my $support = new Bio::EnsEMBL::Utils::ConversionSupport($serverroot); -This code is distributed under an Apache style licence: -Please see http://www.ensembl.org/code_licence.html for details + # parse common options + $support->parse_common_options; -=head1 AUTHOR + # parse extra options for your script + $support->parse_extra_options( 'string_opt=s', 'numeric_opt=n' ); -Steve Trevanion <st3@sanger.ac.uk -Patrick Meidl <meidl@ebi.ac.uk> + # ask user if he wants to run script with these parameters + $support->confirm_params; -=head1 CONTACT + # see individual method documentation for more stuff -Post questions to the EnsEMBL development list ensembl-dev@ebi.ac.uk +=head1 DESCRIPTION + +This module is a collection of common methods and provides helper +functions for the Vega release and schema conversion scripts. Amongst +others, it reads options from a config file, parses commandline options +and does logging. + +=head1 METHODS =cut +package Bio::EnsEMBL::Utils::ConversionSupport; + use strict; use warnings; no warnings 'uninitialized'; diff --git a/modules/Bio/EnsEMBL/Utils/Converter.pm b/modules/Bio/EnsEMBL/Utils/Converter.pm index 22506faa8780c9b9a3927bcf063e3370d5e964f7..4a6af9a8569a6ce0452e051503735b96ece5f20f 100644 --- a/modules/Bio/EnsEMBL/Utils/Converter.pm +++ b/modules/Bio/EnsEMBL/Utils/Converter.pm @@ -1,13 +1,26 @@ -# EnsEMBL module for conversion of objects between EnsEMBL and other project, such as BioPerl -# -# Created and Cared for by Juguang Xiao <juguang@tll.org.sg> -# -# Copyright Juguang Xiao -# -# You may distribute this module under the same terms as perl itself -# -# POD documentation -# +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=head1 AUTHOR + +Juguang Xiao <juguang@tll.org.sg> + +=cut =head1 NAME @@ -15,18 +28,20 @@ Bio::EnsEMBL::Utils::Converter, a converter factory =head1 SYNOPSIS - my $converter = Bio::EnsEMBL::Utils::Converter->new( - -in => 'Bio::SeqFeature::Generic', - -out => 'Bio::EnsEMBL::SimpleFeature' - ); + my $converter = Bio::EnsEMBL::Utils::Converter->new( + -in => 'Bio::SeqFeature::Generic', + -out => 'Bio::EnsEMBL::SimpleFeature' + ); - my ($fearture1, $feature2); - my $ens_simple_features = $converter->convert([$feature1, $feature2]); - my @ens_simple_features = @{$ens_simple_features}; + my ( $fearture1, $feature2 ); + my $ens_simple_features = + $converter->convert( [ $feature1, $feature2 ] ); + my @ens_simple_features = @{$ens_simple_features}; =head1 DESCRIPTION - -Module to converter the business objects between EnsEMBL and any other projects, currently BioPerl. + +Module to converter the business objects between EnsEMBL and any other +projects, currently BioPerl. What the ready conversions are, @@ -37,24 +52,13 @@ What the ready conversions are, Bio::Tools::Prediction::Exon -> Bio::EnsEMBL::Exon Bio::Pipeline::Analysis -> Bio::EnsEMBL::Analysis -=head1 FEEDBACK - - -=head1 AUTHOR - Juguang Xiao - -Juguang Xiao <juguang@tll.org.sg> - -=head1 APPENDIX - -The rest of the documentation details each of the object methods. -Internal methods are usually preceded with a _ +=head1 METHODS =cut -# Let the code begin ... - package Bio::EnsEMBL::Utils::Converter; + use strict; use Bio::EnsEMBL::Root; our @ISA =qw(Bio::EnsEMBL::Root); diff --git a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens.pm b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens.pm index 68706915180d5fa4e9bb650f8d4f0e6d28dd6fe5..e73d766c659183a4e92f65ee35c299678340cba6 100644 --- a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens.pm +++ b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens.pm @@ -1,46 +1,41 @@ -# Bio::EnsEMBL::Utils::Converter::bio_ens -# -# Created and cared for by Juguang Xiao <juguang@fugu-sg.org> -# Created date: 4/3/2003 -# -# Copyright Juguang Xiao -# -# You may distribute this module under the same terms as perl itself -# -# POD documentation -# +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::Utils::Converter::bio_ens + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPISIS + http://www.ensembl.org/info/about/code_licence.html -You should not use this module directly. Please check out the -Bio::EnsEMBL::Utils::Converter module. +=head1 CONTACT -=head1 DESCRIPTION + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 FEEDBACK +=head1 AUTHOR -=head2 Mailing Lists +Juguang Xiao <juguang@fugu-sg.org> -=head2 Reporting Bugs +=cut +=head1 NAME -=head1 AUTHOR Juguang Xiao +Bio::EnsEMBL::Utils::Converter::bio_ens -Juguang Xiao <juguang@fugu-sg.org> +=head1 SYNOPISIS -=head1 APPENDIX +You should not use this module directly. Please check out the +Bio::EnsEMBL::Utils::Converter module. -The rest of the documentation details each of the object methods. -Internal methods are usually preceded with a _ +=head1 DESCRIPTION -=cut +=head1 METHODS -# Let the code begin ... +=cut package Bio::EnsEMBL::Utils::Converter::bio_ens; diff --git a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_analysis.pm b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_analysis.pm index ee45987a0aa1bc6da7ef106d7fca93cb50c3742b..484196d2b70a261a3ed2fd487b3a9c28b516182c 100644 --- a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_analysis.pm +++ b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_analysis.pm @@ -1,45 +1,47 @@ -# Bio::EnsEMBL::Utils::Converter::bio_ens_analysis -# -# Created and cared for by Juguang Xiao <juguang@fugu-sg.org> -# Created date: 15/3/2003 -# -# Copyright Juguang Xiao -# -# You may distribute this module under the same terms as perl itself -# -# POD documentation -# +=head1 LICENSE -=head1 NAME - -Bio::EnsEMBL::Utils::Converter::bio_ens_analysis, a converter instance specific for Analysis. + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 SYNOPISIS + This software is distributed under a modified Apache license. + For license details, please see -my $converter = Bio::EnsEMBL::Utils::Converter( - -in => 'Bio::Pipeline::Analysis', - -out => 'Bio::EnsEMBL::Analysis' -); -my $biopipe_analysis; -my ($ens_analysis) = @{$converter->convert([$biopipe_analysis])}; + http://www.ensembl.org/info/about/code_licence.html -=head1 DESCRIPTION +=head1 CONTACT + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 FEEDBACK + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 AUTHOR Juguang Xiao +=head1 AUTHOR Juguang Xiao <juguang@fugu-sg.org> -=head1 APPENDIX +=cut + +=head1 NAME + +Bio::EnsEMBL::Utils::Converter::bio_ens_analysis, a converter instance +specific for Analysis. + +=head1 SYNOPISIS + + my $converter = Bio::EnsEMBL::Utils::Converter( + -in => 'Bio::Pipeline::Analysis', + -out => 'Bio::EnsEMBL::Analysis' + ); + my $biopipe_analysis; + my ($ens_analysis) = @{ $converter->convert( [$biopipe_analysis] ) }; + +=head1 DESCRIPTION -The rest of the documentation details each of the object methods. -Internal methods are usually preceded with a _ +=head1 METHODS =cut -# Let the code begin ... package Bio::EnsEMBL::Utils::Converter::bio_ens_analysis; diff --git a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_exon.pm b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_exon.pm index 47f060953c97d01a737413c4afbe976a9235d2a1..487861041f80a8e3edce1b821ce4e2980613b1e6 100644 --- a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_exon.pm +++ b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_exon.pm @@ -1,46 +1,39 @@ -# Bio::EnsEMBL::Utils::Converter::bio_ens_exon -# -# Created and cared for by Juguang Xiao <juguang@tll.org.sg> -# Created date: 27/3/2003 -# -# Copyright Juguang Xiao -# -# You may distribute this module under the same terms as perl itself -# -# POD documentation -# +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::Utils::Converter::bio_ens_exon + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPISIS + http://www.ensembl.org/info/about/code_licence.html +=head1 CONTACT + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 DESCRIPTION + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. +=head1 AUTHOR -=head1 FEEDBACK - -=head2 Mailing Lists +Juguang Xiao <juguang@tll.org.sg> -=head2 Reporting Bugs +=cut +=head1 NAME -=head1 AUTHOR Juguang Xiao +Bio::EnsEMBL::Utils::Converter::bio_ens_exon -Juguang Xiao <juguang@tll.org.sg> +=head1 SYNOPISIS -=head1 APPENDIX +=head1 DESCRIPTION -The rest of the documentation details each of the object methods. -Internal methods are usually preceded with a _ +=head1 METHODS =cut -# Let the code begin ... - package Bio::EnsEMBL::Utils::Converter::bio_ens_exon; use strict; diff --git a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_featurePair.pm b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_featurePair.pm index 7b521a7be6aefd90f15cb8eddec45d1071fab836..f7acdaf29dd98db8c6c69c5658d7edfb9f034c5e 100644 --- a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_featurePair.pm +++ b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_featurePair.pm @@ -1,46 +1,39 @@ -# Bio::EnsEMBL::Utils::Converter::bio_ens_featurePair -# -# Created and cared for by Juguang Xiao <juguang@fugu-sg.org> -# Created date: 5/3/2003 -# -# Copyright Juguang Xiao -# -# You may distribute this module under the same terms as perl itself -# -# POD documentation -# +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::Utils::Converter::bio_ens_featurePair + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPISIS + http://www.ensembl.org/info/about/code_licence.html +=head1 CONTACT + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 DESCRIPTION + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. +=head1 AUTHOR -=head1 FEEDBACK - -=head2 Mailing Lists +Juguang Xiao <juguang@tll.org.sg> -=head2 Reporting Bugs +=cut +=head1 NAME -=head1 AUTHOR Juguang Xiao +Bio::EnsEMBL::Utils::Converter::bio_ens_featurePair -Juguang Xiao <juguang@tll.org.sg> +=head1 SYNOPISIS -=head1 APPENDIX +=head1 DESCRIPTION -The rest of the documentation details each of the object methods. -Internal methods are usually preceded with a _ +=head1 METHODS =cut -# Let the code begin ... - package Bio::EnsEMBL::Utils::Converter::bio_ens_featurePair; use strict; diff --git a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_gene.pm b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_gene.pm index 45515470d74d2884738b299cc69e4e7d832583c7..54ff46753ade6cced050ce0640ce8e11eff8778d 100644 --- a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_gene.pm +++ b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_gene.pm @@ -1,48 +1,42 @@ -# Bio::EnsEMBL::Utils::Converter::bio_ens_gene -# -# Created and cared for by Juguang Xiao <juguang@tll.org.sg> -# Created date: 26/3/2003 -# -# Copyright Juguang Xiao -# -# You may distribute this module under the same terms as perl itself -# -# POD documentation -# +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::Utils::Converter::bio_ens_gene + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPISIS + http://www.ensembl.org/info/about/code_licence.html +=head1 CONTACT + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 DESCRIPTION + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -This module is to convert from objects of Bio::SeqFeature::Gene::GeneStructure -to those of Bio::EnsEMBL::Gene +=head1 AUTHOR -=head1 FEEDBACK +Juguang Xiao <juguang@tll.org.sg> -=head2 Mailing Lists +=cut -=head2 Reporting Bugs +=head1 NAME +Bio::EnsEMBL::Utils::Converter::bio_ens_gene -=head1 AUTHOR Juguang Xiao +=head1 SYNOPISIS -Juguang Xiao <juguang@tll.org.sg> +=head1 DESCRIPTION -=head1 APPENDIX +This module is to convert from objects of +Bio::SeqFeature::Gene::GeneStructure to those of Bio::EnsEMBL::Gene -The rest of the documentation details each of the object methods. -Internal methods are usually preceded with a _ +=head1 METHODS =cut -# Let the code begin ... - package Bio::EnsEMBL::Utils::Converter::bio_ens_gene; use strict; diff --git a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_hit.pm b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_hit.pm index 487ad3cd1966d600c505bde5a43fd05a5f28abe8..97e91ea1c2378b005a872b858381e22209c1b43a 100644 --- a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_hit.pm +++ b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_hit.pm @@ -1,34 +1,53 @@ +=head1 LICENSE -=head1 + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Sequence alignment hits were previously stored within the core database as -ungapped alignments. This imposed 2 major constraints on alignments: + This software is distributed under a modified Apache license. + For license details, please see -a) alignments for a single hit record would require multiple rows in the -database, and -b) it was not possible to accurately retrieve the exact original alignment. + http://www.ensembl.org/info/about/code_licence.html -Therefore, in the new branch sequence alignments are now stored as ungapped -alignments in the cigar line format (where CIGAR stands for Concise -Idiosyncratic Gapped Alignment Report). +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut + +=head1 DESCRIPTION + +Sequence alignment hits were previously stored within the core database +as ungapped alignments. This imposed 2 major constraints on alignments: + + a) alignments for a single hit record would require multiple rows in + the database, and + b) it was not possible to accurately retrieve the exact original alignment. + +Therefore, in the new branch sequence alignments are now stored as +ungapped alignments in the cigar line format (where CIGAR stands for +Concise Idiosyncratic Gapped Alignment Report). In the cigar line format alignments are sotred as follows: -M: Match -D: Deletino -I: Insertion + M: Match + D: Deletino + I: Insertion -An example of an alignment for a hypthetical protein match is shown below: +An example of an alignment for a hypthetical protein match is shown +below: -Query: 42 PGPAGLP----GSVGLQGPRGLRGPLP-GPLGPPL... - PG P G GP R PLGP -Sbjct: 1672 PGTP*TPLVPLGPWVPLGPSSPR--LPSGPLGPTD... - -protein_align_feature table as the following cigar line: + Query: 42 PGPAGLP----GSVGLQGPRGLRGPLP-GPLGPPL... + PG P G GP R PLGP + Sbjct: 1672 PGTP*TPLVPLGPWVPLGPSSPR--LPSGPLGPTD... -7M4D12M2I2MD7M +protein_align_feature table as the following cigar line: + 7M4D12M2I2MD7M =cut diff --git a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_hsp.pm b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_hsp.pm index f7b0f91d2bd77195026c498a532978bf5f8b5c3e..21f310b01a5723d9513495fc38e0f9186869a3d7 100644 --- a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_hsp.pm +++ b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_hsp.pm @@ -1,3 +1,22 @@ +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut package Bio::EnsEMBL::Utils::Converter::bio_ens_hsp; diff --git a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_predictionExon.pm b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_predictionExon.pm index cee635b22baab7e8ad4cab9a2cc8ae0ad64e019b..d4260e9646bd0272d33d1f8fb2a21c0bf516baa4 100644 --- a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_predictionExon.pm +++ b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_predictionExon.pm @@ -1,49 +1,44 @@ -# Bio::EnsEMBL::Utils::Converter::bio_ens_predictionExon -# -# Created and cared for by Juguang Xiao <juguang@tll.org.sg> -# Created date: 19/3/2003 -# -# Copyright Juguang Xiao -# -# You may distribute this module under the same terms as perl itself -# -# POD documentation -# +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::Utils::Converter::bio_ens_predictionExon + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPISIS + http://www.ensembl.org/info/about/code_licence.html -my $converter = new Bio::EnsEMBL::Utils::Converter( - -in => 'Bio::Tools::Prediction::Exon', - -out => 'Bio::EnsEMBL::Exon' - -contig => $ens_contig -); +=head1 CONTACT -=head1 DESCRIPTION + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 FEEDBACK +=head1 AUTHOR -=head2 Mailing Lists +Juguang Xiao <juguang@tll.org.sg> -=head2 Reporting Bugs +=cut +=head1 NAME -=head1 AUTHOR Juguang Xiao +Bio::EnsEMBL::Utils::Converter::bio_ens_predictionExon -Juguang Xiao <juguang@tll.org.sg> +=head1 SYNOPISIS -=head1 APPENDIX + my $converter = new Bio::EnsEMBL::Utils::Converter( + -in => 'Bio::Tools::Prediction::Exon', + -out => 'Bio::EnsEMBL::Exon', + -contig => $ens_contig + ); -The rest of the documentation details each of the object methods. -Internal methods are usually preceded with a _ +=head1 DESCRIPTION -=cut +=head1 METHODS -# Let the code begin ... +=cut package Bio::EnsEMBL::Utils::Converter::bio_ens_predictionExon; diff --git a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_predictionGene.pm b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_predictionGene.pm index eb22eb343b39120d73dc2bb99509e797d1557e3e..4aa5e44d4980bb1123a1cadc41ab2efc45cc14b1 100644 --- a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_predictionGene.pm +++ b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_predictionGene.pm @@ -1,46 +1,39 @@ -# Bio::EnsEMBL::Utils::Converter::bio_ens_predictionGene -# -# Created and cared for by Juguang Xiao <juguang@tll.org.sg> -# Created date: 18/3/2003 -# -# Copyright Juguang Xiao -# -# You may distribute this module under the same terms as perl itself -# -# POD documentation -# +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::Utils::Converter::bio_ens_predictionGene + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPISIS + http://www.ensembl.org/info/about/code_licence.html +=head1 CONTACT + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 DESCRIPTION + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. +=head1 AUTHOR -=head1 FEEDBACK - -=head2 Mailing Lists +Juguang Xiao <juguang@tll.org.sg> -=head2 Reporting Bugs +=cut +=head1 NAME -=head1 AUTHOR Juguang Xiao +Bio::EnsEMBL::Utils::Converter::bio_ens_predictionGene -Juguang Xiao <juguang@tll.org.sg> +=head1 SYNOPISIS -=head1 APPENDIX +=head1 DESCRIPTION -The rest of the documentation details each of the object methods. -Internal methods are usually preceded with a _ +=head1 METHODS =cut -# Let the code begin ... - package Bio::EnsEMBL::Utils::Converter::bio_ens_predictionGene; use strict; diff --git a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_seqFeature.pm b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_seqFeature.pm index d0b29fe9968b3f17c7c7c5e334328e54daecfa99..a5d73260618eae7c45c66b5fb0764989f9d6e770 100644 --- a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_seqFeature.pm +++ b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_seqFeature.pm @@ -1,45 +1,40 @@ -# Bio::EnsEMBL::Utils::Converter::bio_ens_seqFeature -# -# Created and cared for by Juguang Xiao <juguang@tll.org.sg> -# Created date: 5/3/2003 -# -# Copyright Juguang Xiao -# -# You may distribute this module under the same terms as perl itself -# -# POD documentation -# +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::Utils::Converter::bio_ens_seqFeature + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPISIS + http://www.ensembl.org/info/about/code_licence.html -Please read Bio::EnsEMBL::Utils::Converter +=head1 CONTACT -=head1 DESCRIPTION + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 FEEDBACK +=head1 AUTHOR -=head2 Mailing Lists +Juguang Xiao <juguang@tll.org.sg> -=head2 Reporting Bugs +=cut +=head1 NAME -=head1 AUTHOR +Bio::EnsEMBL::Utils::Converter::bio_ens_seqFeature -Juguang Xiao <juguang@tll.org.sg> +=head1 SYNOPISIS -=head1 APPENDIX +Please read Bio::EnsEMBL::Utils::Converter -The rest of the documentation details each of the object methods. -Internal methods are usually preceded with a _ +=head1 DESCRIPTION -=cut +=head1 METHODS -# Let the code begin ... +=cut package Bio::EnsEMBL::Utils::Converter::bio_ens_seqFeature; diff --git a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_transcript.pm b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_transcript.pm index 8d41e652ead9a97f1a73e5b80365c27cd7773043..28af237ca26823dba203b213ccb9fb6e4ff75c5b 100644 --- a/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_transcript.pm +++ b/modules/Bio/EnsEMBL/Utils/Converter/bio_ens_transcript.pm @@ -1,46 +1,39 @@ -# Bio::EnsEMBL::Utils::Converter::bio_ens_transcript -# -# Created and cared for by Juguang Xiao <juguang@tll.org.sg> -# Created date: 27/3/2003 -# -# Copyright Juguang Xiao -# -# You may distribute this module under the same terms as perl itself -# -# POD documentation -# +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::Utils::Converter::bio_ens_transcript - the instance converter + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPISIS + http://www.ensembl.org/info/about/code_licence.html +=head1 CONTACT + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 DESCRIPTION + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. +=head1 AUTHOR -=head1 FEEDBACK - -=head2 Mailing Lists +Juguang Xiao <juguang@tll.org.sg> -=head2 Reporting Bugs +=cut +=head1 NAME -=head1 AUTHOR Juguang Xiao +Bio::EnsEMBL::Utils::Converter::bio_ens_transcript - the instance converter -Juguang Xiao <juguang@tll.org.sg> +=head1 SYNOPISIS -=head1 APPENDIX +=head1 DESCRIPTION -The rest of the documentation details each of the object methods. -Internal methods are usually preceded with a _ +=head1 METHODS =cut -# Let the code begin ... - package Bio::EnsEMBL::Utils::Converter::bio_ens_transcript; use strict; diff --git a/modules/Bio/EnsEMBL/Utils/Converter/ens_bio.pm b/modules/Bio/EnsEMBL/Utils/Converter/ens_bio.pm index 37575aff63a5f48c174bd0a22e1126b0af7293d7..1e9405955c56bcea5d69a40eed89a5f7156869ca 100644 --- a/modules/Bio/EnsEMBL/Utils/Converter/ens_bio.pm +++ b/modules/Bio/EnsEMBL/Utils/Converter/ens_bio.pm @@ -1,48 +1,45 @@ -# Bio::EnsEMBL::Utils::Converter::ens_bio -# -# Created and cared for by Juguang Xiao <juguang@fugu-sg.org> -# Created date: 5/3/2003 -# -# Copyright Juguang Xiao -# -# You may distribute this module under the same terms as perl itself -# -# POD documentation -# +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::Utils::Converter::ens_bio + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPISIS + http://www.ensembl.org/info/about/code_licence.html -You are not supposed to use this module directly. Please read -Bio::EnsEMBL::Utils::Converter +=head1 CONTACT -=head1 DESCRIPTION + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -This is a helper module to assist Bio::EnsEMBL::Utils::Converter find which -converter instance should be used, based on the -in and -out parameters. + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 FEEDBACK +=head1 AUTHOR -=head2 Mailing Lists +Juguang Xiao <juguang@fugu-sg.org> -=head2 Reporting Bugs +=cut +=head1 NAME -=head1 AUTHOR Juguang Xiao +Bio::EnsEMBL::Utils::Converter::ens_bio -Juguang Xiao <juguang@fugu-sg.org> +=head1 SYNOPISIS -=head1 APPENDIX +You are not supposed to use this module directly. Please read +Bio::EnsEMBL::Utils::Converter -The rest of the documentation details each of the object methods. -Internal methods are usually preceded with a _ +=head1 DESCRIPTION -=cut +This is a helper module to assist Bio::EnsEMBL::Utils::Converter find +which converter instance should be used, based on the -in and -out +parameters. -# Let the code begin ... +=head1 METHODS + +=cut package Bio::EnsEMBL::Utils::Converter::ens_bio; diff --git a/modules/Bio/EnsEMBL/Utils/Converter/ens_bio_featurePair.pm b/modules/Bio/EnsEMBL/Utils/Converter/ens_bio_featurePair.pm index b46760d0a5439a2ea3e40c38af98020d2e552cb8..af893f2d4d30151846f77f54dc9aac705be20687 100644 --- a/modules/Bio/EnsEMBL/Utils/Converter/ens_bio_featurePair.pm +++ b/modules/Bio/EnsEMBL/Utils/Converter/ens_bio_featurePair.pm @@ -1,46 +1,39 @@ -# Bio::EnsEMBL::Utils::Converter::ens_bio_featurePair -# -# Created and cared for by Juguang Xiao <juguang@fugu-sg.org> -# Created date: 5/3/2003 -# -# Copyright Juguang Xiao -# -# You may distribute this module under the same terms as perl itself -# -# POD documentation -# +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::Utils::Converter::ens_bio_featurePair + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPISIS + http://www.ensembl.org/info/about/code_licence.html +=head1 CONTACT + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 DESCRIPTION + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. +=head1 AUTHOR -=head1 FEEDBACK - -=head2 Mailing Lists +Juguang Xiao <juguang@fugu-sg.org> -=head2 Reporting Bugs +=cut +=head1 NAME -=head1 AUTHOR Juguang Xiao +Bio::EnsEMBL::Utils::Converter::ens_bio_featurePair -Juguang Xiao <juguang@fugu-sg.org> +=head1 SYNOPISIS -=head1 APPENDIX +=head1 DESCRIPTION -The rest of the documentation details each of the object methods. -Internal methods are usually preceded with a _ +=head1 METHODS =cut -# Let the code begin ... - package Bio::EnsEMBL::Utils::Converter::ens_bio_featurePair; use strict; diff --git a/modules/Bio/EnsEMBL/Utils/Converter/ens_bio_seqFeature.pm b/modules/Bio/EnsEMBL/Utils/Converter/ens_bio_seqFeature.pm index fbbdde585a4befc591db3b493e3795b643f3011b..87a4080dccba5e927c120175fa14498511c000bd 100644 --- a/modules/Bio/EnsEMBL/Utils/Converter/ens_bio_seqFeature.pm +++ b/modules/Bio/EnsEMBL/Utils/Converter/ens_bio_seqFeature.pm @@ -1,46 +1,39 @@ -# Bio::EnsEMBL::Utils::Converter::ens_bio_seqFeature -# -# Created and cared for by Juguang Xiao <juguang@fugu-sg.org> -# Created date: 5/3/2003 -# -# Copyright Juguang Xiao -# -# You may distribute this module under the same terms as perl itself -# -# POD documentation -# +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::Utils::Converter::ens_bio_seqFeature + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPISIS + http://www.ensembl.org/info/about/code_licence.html +=head1 CONTACT + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 DESCRIPTION + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. +=head1 AUTHOR -=head1 FEEDBACK - -=head2 Mailing Lists +Juguang Xiao <juguang@fugu-sg.org> -=head2 Reporting Bugs +=cut +=head1 NAME -=head1 AUTHOR Juguang Xiao +Bio::EnsEMBL::Utils::Converter::ens_bio_seqFeature -Juguang Xiao <juguang@fugu-sg.org> +=head1 SYNOPISIS -=head1 APPENDIX +=head1 DESCRIPTION -The rest of the documentation details each of the object methods. -Internal methods are usually preceded with a _ +=head1 METHODS =cut -# Let the code begin ... - package Bio::EnsEMBL::Utils::Converter::ens_bio_seqFeature; use strict; diff --git a/modules/Bio/EnsEMBL/Utils/EasyArgv.pm b/modules/Bio/EnsEMBL/Utils/EasyArgv.pm index cf23ce946915d34ae3e16a5c1692bc959c2eddbc..33befaa431fdbb193d1e0812b06eb82eac645e03 100644 --- a/modules/Bio/EnsEMBL/Utils/EasyArgv.pm +++ b/modules/Bio/EnsEMBL/Utils/EasyArgv.pm @@ -1,4 +1,26 @@ -# +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=head1 AUTHOR + +Juguang Xiao <juguang@tll.org.sg> + +=cut =head1 NAME @@ -6,55 +28,57 @@ Bio::EnsEMBL::Utils::EasyArgv =head1 SYNOPSIS - use Bio::EnsEMBL::Utils::EasyArgv; - my $db = get_ens_db_from_argv; # this method is exported. - use Getopt::Long; - my ($others); - &GetOptions( - 'others=s' => \$others - ); + use Bio::EnsEMBL::Utils::EasyArgv; + + my $db = get_ens_db_from_argv; # this method is exported. + + use Getopt::Long; + + my $others; + &GetOptions( 'others=s' => \$others ); =head1 DESCRIPTION -This is a lazy but easy way to get the db-related arguments. All you need to do -is to invoke get_ens_db_from_argv before using standard Getopt. The below -options will be absorbed and removed from @ARGV. +This is a lazy but easy way to get the db-related arguments. All you +need to do is to invoke get_ens_db_from_argv before using standard +Getopt. The below options will be absorbed and removed from @ARGV. -db_file, host, db_host, dbhost, user, db_user, dbuser, pass, db_pass, dbpass, -dbname, db_name. +db_file, host, db_host, dbhost, user, db_user, dbuser, pass, db_pass, +dbpass, dbname, db_name. -Now you can take advantage of Perl's do method to execute a file as perl script and get returned the last line of it. For your most accessed db setting, you -can have a file named, say, ensdb_homo_core_18.perlobj, with the content like +Now you can take advantage of Perl's do method to execute a file as perl +script and get returned the last line of it. For your most accessed db +setting, you can have a file named, say, ensdb_homo_core_18.perlobj, +with the content like - use strict; # The ceiling line - use Bio:: EnsEMBL::DBSQL::DBAdaptor; - my $db = Bio:: EnsEMBL::DBSQL::DBAdaptor->new( - -host => 'ensembldb.ensembl.org', - -user => 'anonymous', - -dbname => 'homo_sapiens_core_18_34' - ); - $db; # The floor line + use strict; # The ceiling line -In the your command line, you just need to write like + use Bio:: EnsEMBL::DBSQL::DBAdaptor; -perl my_script.pl -db_file ensdb_homo_core_18.perlobj + my $db = Bio:: EnsEMBL::DBSQL::DBAdaptor->new( + -host => 'ensembldb.ensembl.org', + -user => 'anonymous', + -dbname => 'homo_sapiens_core_18_34' + ); -rather than verbose + $db; # The floor line --host ensembldb.ensembl.org -user anonymous -dbname homo_sapiens_core_18_34 +In the your command line, you just need to write like + perl my_script.pl -db_file ensdb_homo_core_18.perlobj -=head1 AUTHOR +rather than the verbose -Juguang XIAO, juguang@tll.org.sg + -host ensembldb.ensembl.org -user anonymous \ + -dbname homo_sapiens_core_18_34 -Other contributors' names here. +=head1 METHODS =cut -use strict; - package Bio::EnsEMBL::Utils::EasyArgv; + +use strict; use vars qw($debug); use Exporter (); our @ISA= qw(Exporter); diff --git a/modules/Bio/EnsEMBL/Utils/Eprof.pm b/modules/Bio/EnsEMBL/Utils/Eprof.pm index 68c5b33d0f76a20ab5c0197240c2825a9481d597..747cf48fd747d2dc618f60bae0ee6055a419c202 100755 --- a/modules/Bio/EnsEMBL/Utils/Eprof.pm +++ b/modules/Bio/EnsEMBL/Utils/Eprof.pm @@ -1,48 +1,48 @@ -# -# BioPerl module for Bio::EnsEMBL::Utils::Eprof -# -# Cared for by Ewan Birney <birney@ebi.ac.uk> -# -# Copyright EBI and GRL -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 NAME + This software is distributed under a modified Apache license. + For license details, please see -Bio::EnsEMBL::Utils::Eprof - Bespoke Ensembl profiler + http://www.ensembl.org/info/about/code_licence.html -=head1 SYNOPSIS +=head1 CONTACT - use Bio::EnsEMBL::Utils::Eprof('eprof_start','eprof_end','eprof_dump'); + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. - &eprof_start('function-a'); - ... do something - &eprof_end('function-a'); + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. +=cut - &eprof_dump(\*STDERR); +=head1 NAME - # there is an object based set for above as well, for running - # multiple concurrent profilers +Bio::EnsEMBL::Utils::Eprof - Bespoke Ensembl profiler +=head1 SYNOPSIS -=head1 DESCRIPTION + use Bio::EnsEMBL::Utils::Eprof( 'eprof_start', 'eprof_end', + 'eprof_dump' ); -This is an Ensembl profiler as we broke the Perl profilers. + &eprof_start('function-a'); + # ... do something + &eprof_end('function-a'); -=head1 CONTACT + &eprof_dump( \*STDERR ); -Describe contact details here + # there is an object based set for above as well, for running + # multiple concurrent profilers -=head1 APPENDIX +=head1 DESCRIPTION -The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ +This is an Ensembl profiler as we broke the Perl profilers. -=cut +=head1 METHODS -# Let the code begin... +=cut package Bio::EnsEMBL::Utils::Eprof; diff --git a/modules/Bio/EnsEMBL/Utils/EprofStack.pm b/modules/Bio/EnsEMBL/Utils/EprofStack.pm index f7312ef849dafafda32731c464bc2e52a2e0ce96..bd290272cc4c0b78d346e85c3206625d57839c95 100755 --- a/modules/Bio/EnsEMBL/Utils/EprofStack.pm +++ b/modules/Bio/EnsEMBL/Utils/EprofStack.pm @@ -1,39 +1,35 @@ -# -# BioPerl module for Bio::EnsEMBL::Util::EprofStack -# -# Cared for by Ewan Birney <birney@ebi.ac.uk> -# -# Copyright Ewan Birney -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE -# POD documentation - main docs before the code + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 NAME + This software is distributed under a modified Apache license. + For license details, please see -Bio::EnsEMBL::Util::EprofStack - DESCRIPTION of Object + http://www.ensembl.org/info/about/code_licence.html -=head1 SYNOPSIS +=head1 CONTACT -Give standard usage here + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 DESCRIPTION + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -Describe the object here +=cut -=head1 CONTACT +=head1 NAME + +Bio::EnsEMBL::Util::EprofStack - DESCRIPTION of Object -Describe contact details here +=head1 SYNOPSIS -=head1 APPENDIX +=head1 DESCRIPTION -The rest of the documentation details each of the object methods. -Internal methods are usually preceded with a _ +=head1 METHODS =cut -# Let the code begin... - package Bio::EnsEMBL::Utils::EprofStack; use strict; diff --git a/modules/Bio/EnsEMBL/Utils/Exception.pm b/modules/Bio/EnsEMBL/Utils/Exception.pm index 7cb5a07749cd6d7f7a36895904f77c579f2f48bc..dd86ccc77d7d4a2400886ebba3afaff44947662a 100644 --- a/modules/Bio/EnsEMBL/Utils/Exception.pm +++ b/modules/Bio/EnsEMBL/Utils/Exception.pm @@ -1,6 +1,22 @@ -# EnsEMBL module for Bio::EnsEMBL::Utils::Exception -# -# +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -8,85 +24,73 @@ Bio::EnsEMBL::Utils::Exception - Utility functions for error handling =head1 SYNOPSIS - use Bio::EnsEMBL::Utils::Exception qw(throw warning deprecate verbose try catch); + use Bio::EnsEMBL::Utils::Exception + qw(throw warning deprecate verbose try catch); - or to get all methods just + or to get all methods just - use Bio::EnsEMBL::Utils::Exception; + use Bio::EnsEMBL::Utils::Exception; - eval { - throw("this is an exception with a stack trace"); - }; - - if($@) { - print "Caught exception:\n$@"; - } + eval { throw("this is an exception with a stack trace") }; + if ($@) { + print "Caught exception:\n$@"; + } - # or you can us the try/catch confortable syntax instead - # to deal with throw or die. - # don't forget the ";" after the catch block - # With this syntax, the original $@ is in $_ in the catch subroutine. + # Or you can us the try/catch confortable syntax instead to deal with + # throw or die. Don't forget the ";" after the catch block. With + # this syntax, the original $@ is in $_ in the catch subroutine. - try { - throw("this is an exception with a stack trace"); - } catch { - print "Caught exception:\n$_"; - }; + try { + throw("this is an exception with a stack trace"); + } + catch { print "Caught exception:\n$_" }; - #silence warnings - verbose('OFF'); + # silence warnings + verbose('OFF'); - warning('this is a silent warning'); + warning('this is a silent warning'); - #show deprecated and warning messages but not info - verbose('DEPRECATE'); - - warning('this is a warning'); + #show deprecated and warning messages but not info + verbose('DEPRECATE'); - #show all messages - verbose('ALL'); + warning('this is a warning'); - info('this is an informational message'); + # show all messages + verbose('ALL'); - sub my_sub { - deprecate('use other_sub() instead'); - } + info('this is an informational message'); - verbose('EXCEPTION'); - info('This is a high priority info message.', 1000); + sub my_sub { deprecate('use other_sub() instead') } + verbose('EXCEPTION'); + info( 'This is a high priority info message.', 1000 ); =head1 DESCRIPTION -This is derived from the Bio::Root module in BioPerl. Some formatting has -been changed and the deprecate function has been added. Most notably the -object methods are now static class methods that can be called without -inheriting from Bio::Root or Bio::EnsEMBL::Root. This is especially useful -for throwing exceptions with stack traces outside of a blessed context. +This is derived from the Bio::Root module in BioPerl. Some formatting +has been changed and the deprecate function has been added. Most +notably the object methods are now static class methods that can be +called without inheriting from Bio::Root or Bio::EnsEMBL::Root. This is +especially useful for throwing exceptions with stack traces outside of a +blessed context. -The originaly implementations of these methods were by Steve Chervitz and -refactored by Ewan Birney. - -It is recommended that these functions be used instead of inheriting -unnecessarily from the Bio::EnsEMBL::Root or Bio::Root object. -The functions exported by this package provide a set of useful error handling -methods. - -=head1 CONTACT +The originaly implementations of these methods were by Steve Chervitz +and refactored by Ewan Birney. -Post questions to the EnsEMBL development list: ensembl-dev@ebi.ac.uk +It is recommended that these functions be used instead of inheriting +unnecessarily from the Bio::EnsEMBL::Root or Bio::Root object. The +functions exported by this package provide a set of useful error +handling methods. =head1 METHODS -The rest of the documentation details exported static class methods. - =cut +package Bio::EnsEMBL::Utils::Exception; + use strict; use warnings; -package Bio::EnsEMBL::Utils::Exception; - use Exporter; use vars qw(@ISA @EXPORT); diff --git a/modules/Bio/EnsEMBL/Utils/Logger.pm b/modules/Bio/EnsEMBL/Utils/Logger.pm index 14e8f5ad395611f35e75c8814812bb76678d81d1..75417cf5df2f7a12e2f5e391a315069f912d7fc0 100644 --- a/modules/Bio/EnsEMBL/Utils/Logger.pm +++ b/modules/Bio/EnsEMBL/Utils/Logger.pm @@ -1,47 +1,57 @@ -package Bio::EnsEMBL::Utils::Logger; +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::Utils::ConversionSupport - Utility module for Vega release and -schema conversion scripts + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html - my $serverroot = '/path/to/ensembl'; - my $suport = new Bio::EnsEMBL::Utils::ConversionSupport($serverroot); +=head1 CONTACT - # parse common options - $support->parse_common_options; + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. - # parse extra options for your script - $support->parse_extra_options('string_opt=s', 'numeric_opt=n'); + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. - # ask user if he wants to run script with these parameters - $support->confirm_params; +=cut - # see individual method documentation for more stuff +=head1 NAME -=head1 DESCRIPTION +Bio::EnsEMBL::Utils::ConversionSupport - Utility module for Vega release and +schema conversion scripts -This module is a collection of common methods and provides helper functions -for the Vega release and schema conversion scripts. Amongst others, it reads -options from a config file, parses commandline options and does logging. +=head1 SYNOPSIS -=head1 LICENCE + my $serverroot = '/path/to/ensembl'; + my $suport = new Bio::EnsEMBL::Utils::ConversionSupport($serverroot); -This code is distributed under an Apache style licence: -Please see http://www.ensembl.org/code_licence.html for details + # parse common options + $support->parse_common_options; -=head1 AUTHOR + # parse extra options for your script + $support->parse_extra_options( 'string_opt=s', 'numeric_opt=n' ); -Patrick Meidl <pm2@sanger.ac.uk> + # ask user if he wants to run script with these parameters + $support->confirm_params; -=head1 CONTACT + # see individual method documentation for more stuff -Post questions to the EnsEMBL development list ensembl-dev@ebi.ac.uk +=head1 DESCRIPTION + +This module is a collection of common methods and provides helper +functions for the Vega release and schema conversion scripts. Amongst +others, it reads options from a config file, parses commandline options +and does logging. + +=head1 METHODS =cut +package Bio::EnsEMBL::Utils::Logger; + use strict; use warnings; no warnings 'uninitialized'; diff --git a/modules/Bio/EnsEMBL/Utils/PolyA.pm b/modules/Bio/EnsEMBL/Utils/PolyA.pm index 30cae08d89c09b430d80d9adbb57e73acef38229..76ed06fa6e5cbe4a7af3e2cf755a0ca178fa744e 100644 --- a/modules/Bio/EnsEMBL/Utils/PolyA.pm +++ b/modules/Bio/EnsEMBL/Utils/PolyA.pm @@ -1,51 +1,52 @@ -# -# EnsEMBL module for PolyA -# -# written by Eduardo Eyras -# -# You may distribute this module under the same terms as perl itself -# -# POD documentation - main docs before the code +=head1 LICENSE -=pod + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME - + Bio::EnsEMBL::Utils::PolyA =head1 SYNOPSIS - my $seq # a Bio::Seq object + my $seq; # a Bio::Seq object my $polyA = Bio::EnsEMBL::Utils::PolyA->new(); # returns a new Bio::Seq object with the trimmed sequence my $trimmed_seq = $polyA->clip($seq); # cat put Ns in the place of the polyA/polyT tail - my $masked_seq = $polyA->mask($seq); + my $masked_seq = $polyA->mask($seq); # can put in lower case the polyA/polyT using any flag: - my $softmasked_seq = $poly->mask($seq,'soft'); + my $softmasked_seq = $poly->mask( $seq, 'soft' ); =head1 DESCRIPTION - it reads a Bio::Seq object, it first finds out whether it has a polyA or a polyT - and then performs one operation in the seq string: clipping, masking or softmasking. - It then returns a new Bio::Seq object with the new sequence. - -=head1 CONTACT + It reads a Bio::Seq object, it first finds out whether it has a + polyA or a polyT and then performs one operation in the seq string: + clipping, masking or softmasking. It then returns a new Bio::Seq + object with the new sequence. - Post questions to the EnsEMBL developer list: <ensembl-dev@ebi.ac.uk> - -=head1 APPENDIX - - The rest of the documentation details each of the object methods. Internal - methods are usually preceded with a_ +=head1 METHODS =cut -# Let the code begin ... - package Bio::EnsEMBL::Utils::PolyA; use Bio::EnsEMBL::Root; diff --git a/modules/Bio/EnsEMBL/Utils/SchemaConversion.pm b/modules/Bio/EnsEMBL/Utils/SchemaConversion.pm index 44d343a73abce4ce376b93fb4308a28ef0371054..a27950da3c31475ac14b17c888627455ecd4e529 100644 --- a/modules/Bio/EnsEMBL/Utils/SchemaConversion.pm +++ b/modules/Bio/EnsEMBL/Utils/SchemaConversion.pm @@ -1,43 +1,53 @@ -package Bio::EnsEMBL::Utils::SchemaConversion; +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -Bio::EnsEMBL::Utils::SchemaConversion - Utility module for Vega schema conversion script + This software is distributed under a modified Apache license. + For license details, please see -=head1 SYNOPSIS + http://www.ensembl.org/info/about/code_licence.html - my $serverroot = '/path/to/ensembl'; - my $conversion = Bio::EnsEMBL::Utils::ConversionSupport->new($serverroot); +=head1 CONTACT - # parse common options - $conversion->conv_usage->parse_common_options; + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. - # convert from schema 19 to 20+ - $conversion->do_conversion() + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. +=cut -=head1 DESCRIPTION +=head1 NAME -This module is a helper module for database conversion, for both vega-vega and -ensembl-vega schemas. It provides a wrapper around SeqStoreConverter::BasicConverter -and the species specific methods therein. Also provides access to helper functions in -Bio::EnsEMBL::Utils::ConversionSupport +Bio::EnsEMBL::Utils::SchemaConversion - Utility module for Vega schema conversion script -=head1 LICENCE +=head1 SYNOPSIS -This code is distributed under an Apache style licence: -Please see http://www.ensembl.org/code_licence.html for details + my $serverroot = '/path/to/ensembl'; + my $conversion = + Bio::EnsEMBL::Utils::ConversionSupport->new($serverroot); -=head1 AUTHOR + # parse common options + $conversion->conv_usage->parse_common_options; -Steve Trevanion <st3@sanger.ac.uk> + # convert from schema 19 to 20+ + $conversion->do_conversion() -=head1 CONTACT +=head1 DESCRIPTION -Post questions to the EnsEMBL development list ensembl-dev@ebi.ac.uk +This module is a helper module for database conversion, for +both vega-vega and ensembl-vega schemas. It provides a wrapper +around SeqStoreConverter::BasicConverter and the species specific +methods therein. Also provides access to helper functions in +Bio::EnsEMBL::Utils::ConversionSupport + +=head1 METHODS =cut +package Bio::EnsEMBL::Utils::SchemaConversion; + use Bio::EnsEMBL::Utils::ConversionSupport; use strict; use warnings; diff --git a/modules/Bio/EnsEMBL/Utils/ScriptUtils.pm b/modules/Bio/EnsEMBL/Utils/ScriptUtils.pm index d608fb40cf4b366731a501c35171b6bb42600f2b..a552e277a3607ca67dc4dcae1861b94a858cadda 100644 --- a/modules/Bio/EnsEMBL/Utils/ScriptUtils.pm +++ b/modules/Bio/EnsEMBL/Utils/ScriptUtils.pm @@ -1,33 +1,37 @@ -package Bio::EnsEMBL::Utils::ScriptUtils; - -=head1 NAME - +=head1 LICENSE -=head1 SYNOPSIS + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + This software is distributed under a modified Apache license. + For license details, please see -=head1 DESCRIPTION + http://www.ensembl.org/info/about/code_licence.html +=head1 CONTACT -=head1 METHODS + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -=head1 LICENCE +=cut -This code is distributed under an Apache style licence. Please see -http://www.ensembl.org/info/about/code_licence.html for details. +=head1 NAME -=head1 AUTHOR +Bio::EnsEMBL::Utils::ScriptUtils; -Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team +=head1 SYNOPSIS -=head1 CONTACT +=head1 DESCRIPTION -Please post comments/questions to the Ensembl development list -<ensembl-dev@ebi.ac.uk> +=head1 METHODS =cut +package Bio::EnsEMBL::Utils::ScriptUtils; + use strict; use warnings; no warnings 'uninitialized'; diff --git a/modules/Bio/EnsEMBL/Utils/SeqDumper.pm b/modules/Bio/EnsEMBL/Utils/SeqDumper.pm index baa48aec1e080da0f3715deeb3da64f57652c5c2..12fe1189d5722488b97cf84dbd3734014dc0c13e 100644 --- a/modules/Bio/EnsEMBL/Utils/SeqDumper.pm +++ b/modules/Bio/EnsEMBL/Utils/SeqDumper.pm @@ -1,38 +1,59 @@ -=head1 NAME - Bio::EnsEMBL::Utils::SeqDumper +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut + +=head1 NAME + +Bio::EnsEMBL::Utils::SeqDumper =head1 SYNOPSIS $seq_dumper = Bio::EnsEMBL::Utils::SeqDumper; - #don't dump snps or repeats + # don't dump snps or repeats $seq_dumper->disable_feature_type('repeat'); $seq_dumper->disable_feature_type('variation'); - #dump EMBL format to STDOUT - $seq_dumper->dump($slice, 'EMBL'); + # dump EMBL format to STDOUT + $seq_dumper->dump( $slice, 'EMBL' ); - #dump GENBANK format to a file - $seq_dumper->dump($slice, 'GENBANK', 'out.genbank'); + # dump GENBANK format to a file + $seq_dumper->dump( $slice, 'GENBANK', 'out.genbank' ); - #dump FASTA format to a file - $seq_dumper->dump($slice, 'FASTA', 'out.fasta'); + # dump FASTA format to a file + $seq_dumper->dump( $slice, 'FASTA', 'out.fasta' ); =head1 DESCRIPTION - A relatively simple and lite-weight flat file dumper for Ensembl slices. - The memory efficiency could be improved and this is currently - not very good for dumping very large sequences such as whole chromosomes. - -=head1 CONTACT +A relatively simple and lite-weight flat file dumper for Ensembl slices. +The memory efficiency could be improved and this is currently not very +good for dumping very large sequences such as whole chromosomes. - Contact the Ensembl development list with questions: <ensembl-dev@ebi.ac.uk> +=head1 METHODS =cut -use strict; package Bio::EnsEMBL::Utils::SeqDumper; +use strict; + use IO::File; use vars qw(@ISA); diff --git a/modules/Bio/EnsEMBL/Utils/SeqRegionCache.pm b/modules/Bio/EnsEMBL/Utils/SeqRegionCache.pm index f088978c54fd38ded3f9a97370c53d0a26b56835..c49ca4f52aca7ec80e2d8b50c2ecad718e3699b4 100644 --- a/modules/Bio/EnsEMBL/Utils/SeqRegionCache.pm +++ b/modules/Bio/EnsEMBL/Utils/SeqRegionCache.pm @@ -1,9 +1,22 @@ -# -# Ensembl module for Bio::EnsEMBL::Utils::SeqRegionCache -# -# Copyright (c) 2004 Ensembl -# -# You may distribute this module under the same terms as perl itself +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -22,30 +35,25 @@ seq_regions $array = $seq_region_cache->{$key}; - if($array) { - $name = $array->[1]; + if ($array) { + $name = $array->[1]; $length = $array->[3]; } else { # cache miss, get the info from the database - ... + # ... # cache the retrieved information - $seq_region_cache->{$key} = [$seq_region_id, $seq_region_name, - $coord_system_id, $seq_region_length]; + $seq_region_cache->{$key} = [ + $seq_region_id, $seq_region_name, + $coord_system_id, $seq_region_length + ]; } - - =head1 DESCRIPTION This module is simply a convenient place to put a cache of sequence -region information which is shared by several adaptors for a given database. - -=head1 CONTACT - -This module is part of the Ensembl project http://www.ensembl.org - -For more information email <ensembl-dev@ebi.ac.uk> +region information which is shared by several adaptors for a given +database. =head1 METHODS diff --git a/modules/Bio/EnsEMBL/Utils/Sequence.pm b/modules/Bio/EnsEMBL/Utils/Sequence.pm index 48bb83fec5675c42108f2aea16b7d3d359f778c5..148047dc9ec68f0272bc8f9f3a5e785e937cba0f 100644 --- a/modules/Bio/EnsEMBL/Utils/Sequence.pm +++ b/modules/Bio/EnsEMBL/Utils/Sequence.pm @@ -1,6 +1,22 @@ -# EnsEMBL module for Bio::EnsEMBL::Utils::Sequence -# -# +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -14,7 +30,7 @@ Bio::EnsEMBL::Utils::Sequence - Utility functions for sequences print "my sequence = $seq\n"; - reverse_comp(\$seq); + reverse_comp( \$seq ); print "my reverse comp = $seq\n"; @@ -22,17 +38,16 @@ Bio::EnsEMBL::Utils::Sequence - Utility functions for sequences print "my expanded seq is = expand($compressed_seq)"; - =head1 METHODS =cut +package Bio::EnsEMBL::Utils::Sequence; + use strict; use warnings; -package Bio::EnsEMBL::Utils::Sequence; - use Exporter; use vars qw(@ISA @EXPORT_OK); diff --git a/modules/Bio/EnsEMBL/Utils/Slice.pm b/modules/Bio/EnsEMBL/Utils/Slice.pm index 1674bb009ff750b38b50231aac059fef76bebdb7..1b587e160967902632c7c5f67b3bc8b6239e74a5 100644 --- a/modules/Bio/EnsEMBL/Utils/Slice.pm +++ b/modules/Bio/EnsEMBL/Utils/Slice.pm @@ -1,6 +1,22 @@ -# EnsEMBL module for Bio::EnsEMBL::Utils::Slice -# -# +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -10,31 +26,25 @@ Bio::EnsEMBL::Utils::Slice - Utility functions for slices use Bio::EnsEMBL::Utils::Slice qw(split_Slices); - ... + # ... # get all chromosomes in the database my $slices = $slice_adaptor->fetch_all('chromosome'); # split the chromosomes into equal chunks of size less than 1MB # with an overlap of 1kb - $slices = split_Slices($slices, 1e6, 1e3); - - -=head1 CONTACT - - Post questions to the ensembl development list <ensembl-dev@ebi.ac.uk> + $slices = split_Slices( $slices, 1e6, 1e3 ); =head1 METHODS =cut +package Bio::EnsEMBL::Utils::Slice; use strict; use warnings; -package Bio::EnsEMBL::Utils::Slice; - use Exporter; use vars qw(@ISA @EXPORT_OK); diff --git a/modules/Bio/EnsEMBL/Utils/TranscriptAlleles.pm b/modules/Bio/EnsEMBL/Utils/TranscriptAlleles.pm index 87288f64283123ce0fab135d48aef73772ba3aae..5e0560755aa913803e4dfe562b1d2853d14f44d6 100644 --- a/modules/Bio/EnsEMBL/Utils/TranscriptAlleles.pm +++ b/modules/Bio/EnsEMBL/Utils/TranscriptAlleles.pm @@ -1,10 +1,22 @@ -# -# Ensembl module for TranscriptAlleles -# -# Copyright (c) 2005 Ensembl -# -# You may distribute this module under the same terms as perl itself -# +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -15,24 +27,23 @@ relationships between a transcript and Alleles use Bio::EnsEMBL::Utils::TranscriptAlleles; - # get the peptide variations caused by a set of Alleles - %variations = %{Bio::EnsEMBL::Utils::TranscriptAlleles::get_all_peptide_variations($transcript, $alleles)}; - + %variations = %{ + Bio::EnsEMBL::Utils::TranscriptAlleles::get_all_peptide_variations( + $transcript, $alleles ) }; =head1 DESCRIPTION -This is a utility class which can be used to find consequence type of an AlleleFeature in a -transcript, and to determine the amino acid changes caused by the AlleleFeature in the Transcript - -=head1 CONTACT +This is a utility class which can be used to find consequence type of an +AlleleFeature in a transcript, and to determine the amino acid changes +caused by the AlleleFeature in the Transcript -Email questions to the ensembl developer mailing list <ensembl-dev@ebi.ac.uk> =head1 METHODS =cut + package Bio::EnsEMBL::Utils::TranscriptAlleles; use strict; diff --git a/modules/Bio/EnsEMBL/Utils/TranscriptSNPs.pm b/modules/Bio/EnsEMBL/Utils/TranscriptSNPs.pm index db41779dde432b2c93c4eb6ffabd13afbd6fc924..545fa17bf2af923c4e054e6119e7d4e079d10fe3 100644 --- a/modules/Bio/EnsEMBL/Utils/TranscriptSNPs.pm +++ b/modules/Bio/EnsEMBL/Utils/TranscriptSNPs.pm @@ -1,10 +1,22 @@ -# -# Ensembl module for TranscriptSNPs -# -# Copyright (c) 2004 Ensembl -# -# You may distribute this module under the same terms as perl itself -# +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut =head1 NAME @@ -17,36 +29,37 @@ relationships between a transcript and SNPs # get and type all snps in the region of the transcript - %snps = %{Bio::EnsEMBL::Utils::TranscriptSNPs::get_all_SNPs($transcript, - $flanking)}; + %snps = %{ + Bio::EnsEMBL::Utils::TranscriptSNPs::get_all_SNPs( $transcript, + $flanking ) }; # get all snps overlapping the transcript in cdna coordinates - %snps = %{Bio::EnsEMBL::Utils::TranscriptSNPs::get_all_cdna_SNPs($transcript)}; + %snps = + %{ Bio::EnsEMBL::Utils::TranscriptSNPs::get_all_cdna_SNPs( + $transcript) }; # get the peptide variations caused by a set of SNPs - %variations = %{Bio::EnsEMBL::Utils::TranscriptSNPs::get_all_peptide_variations($transcript, $snps)}; - + %variations = %{ + Bio::EnsEMBL::Utils::TranscriptSNPs::get_all_peptide_variations( + $transcript, $snps ) }; =head1 DESCRIPTION This is a utility class which can be used to get snps associated with a transcript, and to determine the amino acid changes caused by the SNPs -=head1 CONTACT - -Email questions to the ensembl developer mailing list <ensembl-dev@ebi.ac.uk> - =head1 METHODS =cut +package Bio::EnsEMBL::Utils::TranscriptSNPs; + use strict; use warnings; no warnings 'uninitialized'; -package Bio::EnsEMBL::Utils::TranscriptSNPs; use Bio::EnsEMBL::Utils::Exception qw(throw warning); diff --git a/modules/Bio/EnsEMBL/Utils/User_defined_load.pm b/modules/Bio/EnsEMBL/Utils/User_defined_load.pm index dbb619eb2259a6fac20e6f9b6b2b9120e858fff2..f850381f995f17241c1e19126715a4c635f3a62a 100644 --- a/modules/Bio/EnsEMBL/Utils/User_defined_load.pm +++ b/modules/Bio/EnsEMBL/Utils/User_defined_load.pm @@ -1,3 +1,23 @@ +=head1 LICENSE + + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. + + This software is distributed under a modified Apache license. + For license details, please see + + http://www.ensembl.org/info/about/code_licence.html + +=head1 CONTACT + + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. + + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. + +=cut + use strict; use warnings; @@ -8,81 +28,89 @@ use Bio::EnsEMBL::DBSQL::DBAdaptor; use Bio::EnsEMBL::Utils::Exception qw(warning throw); -=head2 Example off user defined loading +=head2 Example of user defined loading Add new databases by creating the load method and use it by setting ENSEMBL_REGISTRY to your configuration file. +sub load_dupgene { + my ( $class, @args ) = @_; -sub load_dupgene{ - my ($class, @args) = @_; - - my ($species) = rearrange([qw(SPECIES)],@args); + my ($species) = rearrange( [qw(SPECIES)], @args ); my $group = 'dupgene'; - push (@args, '-group'); - push (@args, $group); + push( @args, '-group' ); + push( @args, $group ); - my ($spec,$gro) = Bio::EnsEMBL::Registry->check_if_already_there(@args); - if($spec){ + my ( $spec, $gro ) = + Bio::EnsEMBL::Registry->check_if_already_there(@args); + if ($spec) { print STDERR "already defined returning\n"; return; } my $dbc = new Bio::EnsEMBL::DBSQL::DBConnection(@args); - my $dba = new_fast Bio::EnsEMBL::DBSQL::DBAdaptor('-con' => $dbc); - - Bio::EnsEMBL::Registry->add_DBAdaptor($species, $group, $dba); - - 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', - 'ProxySNP' => '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' ); - - foreach my $key (keys %pairs){ - Bio::EnsEMBL::Registry->add_adaptor($species, $group, $key, $pairs{$key}); + my $dba = new_fast Bio::EnsEMBL::DBSQL::DBAdaptor( '-con' => $dbc ); + + Bio::EnsEMBL::Registry->add_DBAdaptor( $species, $group, $dba ); + + 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', + 'ProxySNP' => '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' + ); + + foreach my $key ( keys %pairs ) { + Bio::EnsEMBL::Registry->add_adaptor( $species, $group, $key, + $pairs{$key} ); } #if dnadb has been set then for the follwing use it. - foreach my $type (qw(Sequence AssemblyMapper KaryotypeBand RepeatFeature CoordSystem AssemblyExceptionFeature)){ - Bio::EnsEMBL::Registry->set_get_via_dnadb_if_set($species,$type); + foreach my $type ( + qw(Sequence AssemblyMapper KaryotypeBand RepeatFeature CoordSystem AssemblyExceptionFeature) + ) + { + Bio::EnsEMBL::Registry->set_get_via_dnadb_if_set( $species, $type ); } -} +} ## end sub load_dupgene + =cut diff --git a/modules/Bio/EnsEMBL/Utils/VegaCuration/Gene.pm b/modules/Bio/EnsEMBL/Utils/VegaCuration/Gene.pm index be7c598d80f2f73de61a883f9e487b5f2a1ba01f..df7219378a5fb1e8da66dd122f789a2bc67f4168 100644 --- a/modules/Bio/EnsEMBL/Utils/VegaCuration/Gene.pm +++ b/modules/Bio/EnsEMBL/Utils/VegaCuration/Gene.pm @@ -1,26 +1,35 @@ -package Bio::EnsEMBL::Utils::VegaCuration::Gene; +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 SYNOPSIS + This software is distributed under a modified Apache license. + For license details, please see -=head1 DESCRIPTION + http://www.ensembl.org/info/about/code_licence.html -=head1 LICENCE +=head1 CONTACT -This code is distributed under an Apache style licence: -Please see http://www.ensembl.org/code_licence.html for details + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 AUTHOR + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -Steve Trevanion <st3@sanger.ac.uk> +=cut -=head1 CONTACT +=head1 NAME + +=head1 SYNOPSIS -Post questions to the EnsEMBL development list ensembl-dev@ebi.ac.uk +=head1 DESCRIPTION + +=head1 METHODS =cut +package Bio::EnsEMBL::Utils::VegaCuration::Gene; + use strict; use warnings; use vars qw(@ISA); diff --git a/modules/Bio/EnsEMBL/Utils/VegaCuration/Transcript.pm b/modules/Bio/EnsEMBL/Utils/VegaCuration/Transcript.pm index 001b5c03161b64e3baf5bf820347a44334f25789..ab0020058926a03717d4410a48e18025da916698 100644 --- a/modules/Bio/EnsEMBL/Utils/VegaCuration/Transcript.pm +++ b/modules/Bio/EnsEMBL/Utils/VegaCuration/Transcript.pm @@ -1,26 +1,35 @@ -package Bio::EnsEMBL::Utils::VegaCuration::Transcript; +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 SYNOPSIS + This software is distributed under a modified Apache license. + For license details, please see -=head1 DESCRIPTION + http://www.ensembl.org/info/about/code_licence.html -=head1 LICENCE +=head1 CONTACT -This code is distributed under an Apache style licence: -Please see http://www.ensembl.org/code_licence.html for details + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 AUTHOR + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -Steve Trevanion <st3@sanger.ac.uk> +=cut -=head1 CONTACT +=head1 NAME + +=head1 SYNOPSIS -Post questions to the EnsEMBL development list ensembl-dev@ebi.ac.uk +=head1 DESCRIPTION + +=head1 METHODS =cut +package Bio::EnsEMBL::Utils::VegaCuration::Transcript; + use strict; use warnings; no warnings 'uninitialized'; diff --git a/modules/Bio/EnsEMBL/Utils/VegaCuration/Translation.pm b/modules/Bio/EnsEMBL/Utils/VegaCuration/Translation.pm index ccaf3f3bf5619e0d9267349cf0ef7627d68d34bf..ebc7307841e0c3a03c1865a932a899795be1969f 100644 --- a/modules/Bio/EnsEMBL/Utils/VegaCuration/Translation.pm +++ b/modules/Bio/EnsEMBL/Utils/VegaCuration/Translation.pm @@ -1,26 +1,35 @@ -package Bio::EnsEMBL::Utils::VegaCuration::Translation; +=head1 LICENSE -=head1 NAME + Copyright (c) 1999-2009 The European Bioinformatics Institute and + Genome Research Limited. All rights reserved. -=head1 SYNOPSIS + This software is distributed under a modified Apache license. + For license details, please see -=head1 DESCRIPTION + http://www.ensembl.org/info/about/code_licence.html -=head1 LICENCE +=head1 CONTACT -This code is distributed under an Apache style licence: -Please see http://www.ensembl.org/code_licence.html for details + Please email comments or questions to the public Ensembl + developers list at <ensembl-dev@ebi.ac.uk>. -=head1 AUTHOR + Questions may also be sent to the Ensembl help desk at + <helpdesk@ensembl.org>. -Steve Trevanion <st3@sanger.ac.uk> +=cut -=head1 CONTACT +=head1 NAME + +=head1 SYNOPSIS -Post questions to the EnsEMBL development list ensembl-dev@ebi.ac.uk +=head1 DESCRIPTION + +=head1 METHODS =cut +package Bio::EnsEMBL::Utils::VegaCuration::Translation; + use strict; use warnings; use vars qw(@ISA);