Archive Ensembl HomeArchive Ensembl Home
Bio::EnsEMBL::DBSQL::SliceAdaptor Class Reference
Inheritance diagram for Bio::EnsEMBL::DBSQL::SliceAdaptor:

List of all members.


Class Summary

Synopsis

  use Bio::EnsEMBL::Utils::Slice qw(split_Slices);
  use Bio::EnsEMBL::Registry;

  Bio::EnsEMBL::Registry-\>load_registry_from_db(
    -host =\> 'ensembldb.ensembl.org',
    -user =\> 'anonymous'
  );

  $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' );

  # get a slice for each clone in the database
  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 );

  # 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 );

  # include non-duplicate regions
  $slices = $slice_adaptor-\>fetch_all( 'toplevel', undef, 0, 1 );

  # split up a list of slices into smaller slices
  $overlap    = 1000;
  $max_length = 1e6;
  $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");
  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\> ) {
    chomp($name);
    $slice = $slice_adaptor-\>fetch_by_name($name);
    # do something with slice
  }

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
Bio::EnsEMBL::Slice module.
 

Definition at line 75 of file SliceAdaptor.pm.

Available Methods

protected _build_circular_slice_cache ()
protected _build_exception_cache ()
protected _columns ()
protected _default_where_clause ()
protected _final_clause ()
protected _left_join ()
protected _list_dbIDs ()
protected _objs_from_sth ()
protected _straight_join ()
protected _tables ()
public Listref bind_param_generic_fetch ()
public void cache_toplevel_seq_mappings ()
public
Bio::EnsEMBL::DBSQL::DBAdaptor 
db ()
public
Bio::EnsEMBL::DBSQL::DBConnection 
dbc ()
public dump_data ()
public Listref fetch_all ()
public Listref fetch_all_by_dbID_list ()
public Bio::EnsEMBL::Slice fetch_by_band ()
public Bio::EnsEMBL::Slice fetch_by_chr_band ()
public fetch_by_chr_name ()
public fetch_by_chr_start_end ()
public fetch_by_clone_accession ()
public fetch_by_contig_name ()
public Bio::EnsEMBL::Feature fetch_by_dbID ()
public Bio::EnsEMBL::Slice fetch_by_exon_stable_id ()
public Bio::EnsEMBL::Slice fetch_by_Feature ()
public Bio::EnsEMBL::Slice fetch_by_gene_stable_id ()
public fetch_by_mapfrag ()
public Bio::EnsEMBL::Slice fetch_by_misc_feature_attribute ()
public Bio::EnsEMBL::Slice fetch_by_name ()
public Bio::EnsEMBL::Slice fetch_by_region ()
public Listref fetch_by_region_unique ()
public Bio::EnsEMBL::Slice fetch_by_seq_region_id ()
public fetch_by_supercontig_name ()
public Bio::EnsEMBL::Slice fetch_by_toplevel_location ()
public Bio::EnsEMBL::Slice fetch_by_transcript_id ()
public Bio::EnsEMBL::Slice fetch_by_transcript_stable_id ()
public fetch_normalized_slice_projection ()
public Listref generic_fetch ()
public get_dumped_data ()
public Int get_seq_region_id ()
public Boolean is_multispecies ()
public Int is_reference ()
public Int is_toplevel ()
public Scalar last_insert_id ()
public list_overlapping_supercontigs ()
public new ()
public DBD::sth prepare ()
public Int species_id ()
public Int store ()
public String store_assembly ()

Method Documentation

protected Bio::EnsEMBL::DBSQL::SliceAdaptor::_build_circular_slice_cache ( )

Undocumented method

Code:
click to view
protected Bio::EnsEMBL::DBSQL::SliceAdaptor::_build_exception_cache ( )

Undocumented method

Code:
click to view
protected Bio::EnsEMBL::DBSQL::BaseAdaptor::_default_where_clause ( ) [inherited]
protected Bio::EnsEMBL::DBSQL::BaseAdaptor::_final_clause ( ) [inherited]

Undocumented method

Code:
click to view

Reimplemented in Bio::EnsEMBL::DBSQL::ExonAdaptor, Bio::EnsEMBL::DBSQL::MiscFeatureAdaptor, and Bio::EnsEMBL::DBSQL::PredictionExonAdaptor.

protected Bio::EnsEMBL::DBSQL::BaseAdaptor::_list_dbIDs ( ) [inherited]

Undocumented method

Code:
click to view
protected Bio::EnsEMBL::DBSQL::BaseAdaptor::_straight_join ( ) [inherited]

Undocumented method

Code:
click to view
public Listref Bio::EnsEMBL::DBSQL::BaseAdaptor::bind_param_generic_fetch ( ) [inherited]
 Arg [1]   : (optional)  scalar $param
              This is the parameter to bind
 Arg [2]   : (optional) int $sql_type
              Type of the parameter (from DBI (:sql_types))
 Example   :  $adaptor->bind_param_generic_fetch($stable_id,SQL_VARCHAR);
              $adaptor->generic_fetch();
 Description:  When using parameters for the query, will call the bind_param to avoid
               some security issues. If there are no arguments, will return the bind_parameters
 ReturnType : listref
 Exceptions:  if called with one argument
 
Code:
click to view
public void Bio::EnsEMBL::DBSQL::SliceAdaptor::cache_toplevel_seq_mappings ( )
  Args       : none
  Example    : $slice_adaptor->cache_toplevel_seq_mappings();
  Description: caches all the assembly mappings needed for genes
  Returntype : None
  Exceptions : None
  Caller     : general
  Status     : At Risk
             : New experimental code
 
Code:
click to view
public Bio::EnsEMBL::DBSQL::DBAdaptor Bio::EnsEMBL::DBSQL::BaseAdaptor::db ( ) [inherited]
  Arg [1]    : (optional) Bio::EnsEMBL::DBSQL::DBAdaptor $obj 
               the database this adaptor is using.
  Example    : $db = $adaptor->db();
  Description: Getter/Setter for the DatabaseConnection that this adaptor is 
               using.
  Returntype : Bio::EnsEMBL::DBSQL::DBAdaptor
  Exceptions : none
  Caller     : Adaptors inherited from BaseAdaptor
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::DBSQL::DBConnection Bio::EnsEMBL::DBSQL::BaseAdaptor::dbc ( ) [inherited]
  Arg [1]    : (optional) Bio::EnsEMBL::DBSQL::DBConnection $obj 
               the database this adaptor is using.
  Example    : $db = $adaptor->db();
  Description: Getter/Setter for the DatabaseConnection that this adaptor is 
               using.
  Returntype : Bio::EnsEMBL::DBSQL::DBConnection
  Exceptions : none
  Caller     : Adaptors inherited from BaseAdaptor
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::DBSQL::BaseAdaptor::dump_data ( ) [inherited]

Undocumented method

Code:
click to view
public Listref Bio::EnsEMBL::DBSQL::SliceAdaptor::fetch_all ( )
  Arg [1]    : string $coord_system_name
               The name of the coordinate system to retrieve slices of.
               This may be a name of an acutal coordinate system or an alias
               to a coordinate system.  Valid aliases are 'seqlevel' or
               'toplevel'.
  Arg [2]    : string $coord_system_version (optional)
               The version of the coordinate system to retrieve slices of
  Arg [3]    : bool $include_non_reference (optional)
               If this argument is not provided then only reference slices
               will be returned. If set, both reference and non refeference
               slices will be rerurned.
  Arg [4]    : int $include_duplicates (optional)
               If set duplicate regions will be returned.
               NOTE: if you do not use this option and you have a PAR
               (pseudo-autosomal region) at the beginning of your seq_region
               then your slice will not start at position 1, so coordinates
               retrieved from this slice might not be what you expected.
  Arg[5]     : bool $include_lrg (optional)  (default 0)
               If set lrg regions will be returned aswell.
  Example    : @chromos = @{$slice_adaptor->fetch_all('chromosome','NCBI33')};
               @contigs = @{$slice_adaptor->fetch_all('contig')};
               # get even non-reference regions
               @slices = @{$slice_adaptor->fetch_all('toplevel',undef,1)};
               # include duplicate regions (such as pseudo autosomal regions)
               @slices = @{$slice_adaptor->fetch_all('toplevel', undef,0,1)};
  Description: Retrieves slices of all seq_regions for a given coordinate
               system.  This is analagous to the methods fetch_all which were
               formerly on the ChromosomeAdaptor, RawContigAdaptor and
               CloneAdaptor classes.  Slices fetched span the entire
               seq_regions and are on the forward strand.
               If the coordinate system with the provided name and version
               does not exist an empty list is returned.
               If the coordinate system name provided is 'toplevel', all
               non-redundant toplevel slices are returned (note that any
               coord_system_version argument is ignored in that case).
               Retrieved slices can be broken into smaller slices using the
               Bio::EnsEMBL::Utils::Slice module.
  Returntype : listref of Bio::EnsEMBL::Slices
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

Reimplemented from Bio::EnsEMBL::DBSQL::BaseAdaptor.

public Listref Bio::EnsEMBL::DBSQL::BaseAdaptor::fetch_all_by_dbID_list ( ) [inherited]
  Arg [1]    : listref of integers $id_list
               The unique database identifiers for the features to
               be obtained.
  Arg [2]    : optional - Bio::EnsEMBL::Slice to map features onto.
  Example    : @feats = @{$adaptor->fetch_all_by_dbID_list([1234, 2131, 982]))};
  Description: Returns the features created from the database
               defined by the the IDs in contained in the provided
               ID list $id_list.  The features will be returned
               in their native coordinate system.  That is, the
               coordinate system in which they are stored in the
               database.  In order to convert the features to a
               particular coordinate system use the transfer() or
               transform() method.  If none of the features are
               found in the database a reference to an empty list is
               returned.
  Returntype : listref of Bio::EnsEMBL::Features
  Exceptions : thrown if $id arg is not provided
               does not exist
  Caller     : general
  Status     : Stable
 
Code:
click to view

Reimplemented in Bio::EnsEMBL::DBSQL::OntologyTermAdaptor.

public Bio::EnsEMBL::Slice Bio::EnsEMBL::DBSQL::SliceAdaptor::fetch_by_band ( )
 Title   : fetch_by_band
 Usage   :
 Function: Does not work please use fetch_by_chr_band
 Example :
 Returns : Bio::EnsEMBL::Slice
 Args    : the band name
 Status     : AT RISK
 
Code:
click to view
public Bio::EnsEMBL::Slice Bio::EnsEMBL::DBSQL::SliceAdaptor::fetch_by_chr_band ( )
 Title   : fetch_by_chr_band
 Usage   :
 Function: create a Slice representing a series of bands
 Example :
 Returns : Bio::EnsEMBL::Slice
 Args    : the band name
 Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::DBSQL::SliceAdaptor::fetch_by_chr_name ( )
  Description:

Deprecated:
. Use fetch by region instead
 
Code:
click to view
public Bio::EnsEMBL::DBSQL::SliceAdaptor::fetch_by_chr_start_end ( )
  Description:

Deprecated:
use fetch_by_region instead
 
Code:
click to view
public Bio::EnsEMBL::DBSQL::SliceAdaptor::fetch_by_clone_accession ( )
  Description:

Deprecated:
. Use fetch_by_region, Slice::project, Slice::expand instead.
 
Code:
click to view
public Bio::EnsEMBL::DBSQL::SliceAdaptor::fetch_by_contig_name ( )
  Description:

Deprecated:
. Use fetch_by_region(), Slice::project(), Slice::expand() instead
 
Code:
click to view
public Bio::EnsEMBL::Feature Bio::EnsEMBL::DBSQL::BaseAdaptor::fetch_by_dbID ( ) [inherited]
  Arg [1]    : int $id
               The unique database identifier for the feature to be obtained
  Example    : $feat = $adaptor->fetch_by_dbID(1234));
               $feat = $feat->transform('contig');
  Description: Returns the feature created from the database defined by the
               the id $id.  The feature will be returned in its native
               coordinate system.  That is, the coordinate system in which it
               is stored in the database.  In order to convert it to a
               particular coordinate system use the transfer() or transform()
               method.  If the feature is not found in the database then
               undef is returned instead
  Returntype : Bio::EnsEMBL::Feature or undef
  Exceptions : thrown if $id arg is not provided
               does not exist
  Caller     : general
  Status     : Stable
 
Code:
click to view

Reimplemented in Bio::EnsEMBL::DBSQL::AnalysisAdaptor, Bio::EnsEMBL::DBSQL::AssemblyExceptionFeatureAdaptor, Bio::EnsEMBL::DBSQL::CoordSystemAdaptor, Bio::EnsEMBL::DBSQL::DBEntryAdaptor, Bio::EnsEMBL::DBSQL::DensityTypeAdaptor, Bio::EnsEMBL::DBSQL::MiscSetAdaptor, Bio::EnsEMBL::DBSQL::OntologyTermAdaptor, Bio::EnsEMBL::DBSQL::ProteinFeatureAdaptor, Bio::EnsEMBL::DBSQL::RepeatConsensusAdaptor, Bio::EnsEMBL::DBSQL::TranslationAdaptor, Bio::EnsEMBL::Map::DBSQL::DitagAdaptor, Bio::EnsEMBL::Map::DBSQL::DitagFeatureAdaptor, Bio::EnsEMBL::Map::DBSQL::MarkerAdaptor, and Bio::EnsEMBL::Map::DBSQL::QtlAdaptor.

public Bio::EnsEMBL::Slice Bio::EnsEMBL::DBSQL::SliceAdaptor::fetch_by_exon_stable_id ( )
  Arg [1]    : string $exonid
               The stable id of the exon around which the slice is 
               desired
  Arg [2]    : (optional) int $size
               The length of the flanking regions the slice should encompass 
               on either side of the exon (0 by default)
  Example    : $slc = $sa->fetch_by_exon_stable_id('ENSE00000302930',10);
  Description: Creates a slice around the region of the specified exon. 
               If a context size is given, the slice is extended by that 
               number of basepairs on either side of the
               transcript.
  Returntype : Bio::EnsEMBL::Slice
  Exceptions : Thrown if the exon is not in the database.
  Caller     : general
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::Slice Bio::EnsEMBL::DBSQL::SliceAdaptor::fetch_by_Feature ( )
  Arg [1]    : Bio::EnsEMBL::Feature $feat
               The feature to fetch the slice around
  Arg [2]    : int size (optional)
               The desired number of flanking basepairs around the feature.
               The size may also be provided as a percentage of the feature 
               size such as 200% or 80.5%.
  Example    : $slice = $slice_adaptor->fetch_by_Feature($feat, 100);
  Description: Retrieves a slice around a specific feature.  All this really
               does is return a resized version of the slice that the feature
               is already on. Note that slices returned from this method
               are always on the forward strand of the seq_region regardless of
               the strandedness of the feature passed in.
  Returntype : Bio::EnsEMBL::Slice
  Exceptions : throw if the feature does not have an attached slice
               throw if feature argument is not provided
  Caller     : fetch_by_gene_stable_id, fetch_by_transcript_stable_id,
               fetch_by_gene_id, fetch_by_transcript_id
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::Slice Bio::EnsEMBL::DBSQL::SliceAdaptor::fetch_by_gene_stable_id ( )
  Arg [1]    : string $geneid
               The stable id of the gene around which the slice is
               desired
  Arg [2]    : (optional) int $size
               The length of the flanking regions the slice should encompass
               on either side of the gene (0 by default)
  Example    : $slc = $sa->fetch_by_gene_stable_id('ENSG00000012123',10);
  Description: Creates a slice around the region of the specified gene.
               If a context size is given, the slice is extended by that
               number of basepairs on either side of the gene.
               The slice will be created in the genes native coordinate system.
  Returntype : Bio::EnsEMBL::Slice
  Exceptions : throw on incorrect args
               throw if transcript does not exist
  Caller     : general
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::DBSQL::SliceAdaptor::fetch_by_mapfrag ( )
 Function:

Deprecated:
use fetch_by_misc_feature_attribute('synonym',$mapfrag)
 
Code:
click to view
public Bio::EnsEMBL::Slice Bio::EnsEMBL::DBSQL::SliceAdaptor::fetch_by_misc_feature_attribute ( )
  Arg [1]    : string $attribute_type
               The code of the attribute type
  Arg [2]    : (optional) string $attribute_value
               The value of the attribute to fetch by
  Arg [3]    : (optional) int $size
               The amount of flanking region around the misc feature desired.
  Example    : $slice = $sa->fetch_by_misc_feature_attribute('superctg',
                                                             'NT_030871');
               $slice = $sa->fetch_by_misc_feature_attribute('synonym',
                                                             'AL00012311',
                                                             $flanking);
  Description: Fetches a slice around a MiscFeature with a particular
               attribute type and value. If no value is specified then
               the feature with the particular attribute is used.
               If no size is specified then 0 is used.
  Returntype : Bio::EnsEMBL::Slice
  Exceptions : Throw if no feature with the specified attribute type and value
               exists in the database
               Warning if multiple features with the specified attribute type
               and value exist in the database.
  Caller     : webcode
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::Slice Bio::EnsEMBL::DBSQL::SliceAdaptor::fetch_by_name ( )
  Arg [1]    : string $name
  Example    : $name  = 'chromosome:NCBI34:X:1000000:2000000:1';
               $slice = $slice_adaptor->fetch_by_name($name);
               $slice2 = $slice_adaptor->fetch_by_name($slice3->name());
  Description: Fetches a slice using a slice name (i.e. the value returned by
               the Slice::name method).  This is useful if you wish to 
               store a unique identifier for a slice in a file or database or
               pass a slice over a network.
               Slice::name allows you to serialise/marshall a slice and this
               method allows you to deserialise/unmarshal it.
               Returns undef if no seq_region with the provided name exists in
               the database.
  Returntype : Bio::EnsEMBL::Slice or undef
  Exceptions : throw if incorrent arg provided
  Caller     : Pipeline
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::Slice Bio::EnsEMBL::DBSQL::SliceAdaptor::fetch_by_region ( )
  Arg [1]    : string $coord_system_name (optional)
               The name of the coordinate system of the slice to be created
               This may be a name of an actual coordinate system or an alias
               to a coordinate system.  Valid aliases are 'seqlevel' or
               'toplevel'.
  Arg [2]    : string $seq_region_name
               The name of the sequence region that the slice will be
               created on.
  Arg [3]    : int $start (optional, default = 1)
               The start of the slice on the sequence region
  Arg [4]    : int $end (optional, default = seq_region length)
               The end of the slice on the sequence region
  Arg [5]    : int $strand (optional, default = 1)
               The orientation of the slice on the sequence region
  Arg [6]    : string $version (optional, default = default version)
               The version of the coordinate system to use (e.g. NCBI33)
  Arg [7]    : boolean $no_fuzz (optional, default = undef (false))
               If true (non-zero), do not use "fuzzy matching" (see below).
  Example    : $slice = $slice_adaptor->fetch_by_region('chromosome', 'X');
               $slice = $slice_adaptor->fetch_by_region('clone', 'AC008066.4');
  Description: Retrieves a slice on the requested region.  At a minimum the
               name the name of the seq_region to fetch must be provided.
               If no coordinate system name is provided than a slice on the
               highest ranked coordinate system with a matching
               seq_region_name will be returned.  If a version but no
               coordinate system name is provided, the same behaviour will
               apply, but only coordinate systems of the appropriate version
               are considered.  The same applies if the 'toplevel' coordinate
               system is specified, however in this case the version is
               ignored.  The coordinate system should always be specified if
               it is known, since this is unambiguous and faster.
               Some fuzzy matching is performed if no exact match for
               the provided name is found.  This allows clones to be
               fetched even when their version is not known.  For
               example fetch_by_region('clone', 'AC008066') will
               retrieve the sequence_region with name 'AC008066.4'.
               The fuzzy matching can be turned off by setting the
               $no_fuzz argument to a true value.
               If the requested seq_region is not found in the database undef
               is returned.
  Returntype : Bio::EnsEMBL::Slice or undef
  Exceptions : throw if no seq_region_name is provided
               throw if invalid coord_system_name is provided
               throw if start > end is provided
  Caller     : general
  Status     : Stable
 
Code:
click to view
public Listref Bio::EnsEMBL::DBSQL::SliceAdaptor::fetch_by_region_unique ( )
  Arg [1]    : string $coord_system_name (optional)
               The name of the coordinate system of the slice to be created
               This may be a name of an actual coordinate system or an alias
               to a coordinate system.  Valid aliases are 'seqlevel' or
               'toplevel'.
  Arg [2]    : string $seq_region_name
               The name of the sequence region that the slice will be
               created on.
  Arg [3]    : int $start (optional, default = 1)
               The start of the slice on the sequence region
  Arg [4]    : int $end (optional, default = seq_region length)
               The end of the slice on the sequence region
  Arg [5]    : int $strand (optional, default = 1)
               The orientation of the slice on the sequence region
  Arg [6]    : string $version (optional, default = default version)
               The version of the coordinate system to use (e.g. NCBI33)
  Arg [7]    : boolean $no_fuzz (optional, default = undef (false))
               If true (non-zero), do not use "fuzzy matching" (see below).
  Example    : $slice = $slice_adaptor->fetch_by_region_unique('chromosome', 'HSCHR6_MHC_COX');
  Description: Retrieves a slice on the requested region but returns only the unique
               parts of the slice.  At a minimum the
               name the name of the seq_region to fetch must be provided.
               If no coordinate system name is provided than a slice on the
               highest ranked coordinate system with a matching
               seq_region_name will be returned.  If a version but no
               coordinate system name is provided, the same behaviour will
               apply, but only coordinate systems of the appropriate version
               are considered.  The same applies if the 'toplevel' coordinate
               system is specified, however in this case the version is
               ignored.  The coordinate system should always be specified if
               it is known, since this is unambiguous and faster.
               Some fuzzy matching is performed if no exact match for
               the provided name is found.  This allows clones to be
               fetched even when their version is not known.  For
               example fetch_by_region('clone', 'AC008066') will
               retrieve the sequence_region with name 'AC008066.4'.
               The fuzzy matching can be turned off by setting the
               $no_fuzz argument to a true value.
               If the requested seq_region is not found in the database undef
               is returned.
  Returntype : listref Bio::EnsEMBL::Slice
  Exceptions : throw if no seq_region_name is provided
               throw if invalid coord_system_name is provided
               throw if start > end is provided
  Caller     : general
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::Slice Bio::EnsEMBL::DBSQL::SliceAdaptor::fetch_by_seq_region_id ( )
  Arg [1]    : string $seq_region_id
               The internal identifier of the seq_region to create this slice
               on
  Arg [2]    : optional start
  Arg [3]    : optional end
  Arg [4]    : optional strand
  Example    : $slice = $slice_adaptor->fetch_by_seq_region_id(34413);
  Description: Creates a slice object of an entire seq_region using the
               seq_region internal identifier to resolve the seq_region.
               Returns undef if no such slice exists.
  Returntype : Bio::EnsEMBL::Slice or undef
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::DBSQL::SliceAdaptor::fetch_by_supercontig_name ( )
  Description:

Deprecated:
. Use fetch_by_region(), Slice::project() and Slice::expand() instead
 
Code:
click to view
public Bio::EnsEMBL::Slice Bio::EnsEMBL::DBSQL::SliceAdaptor::fetch_by_toplevel_location ( )
  Arg [1]     : string $location
                Ensembl formatted location. Can be a format like 
                name:start-end, name:start..end, name:start and
                name.
  Arg[2]      : boolean $no_warnings
                Suppress warnings from this method
  Example     : my $slice = $sa->fetch_by_toplevel_location('X:1-10000')
  Description : Converts an Ensembl location/region into the sequence region
                name, start and end and passes them onto fetch_by_region(). 
                The code assumes that the required slice is on the top level
                coordinate system. The code assumes that location formatting
                is not perfect and will perform basic cleanup before parsing.
  Returntype  : Bio::EnsEMBL::Slice
  Exceptions  : If $location is false otherwise see fetch_by_region()
  Caller      : General
  Status      : Beta
 
Code:
click to view
public Bio::EnsEMBL::Slice Bio::EnsEMBL::DBSQL::SliceAdaptor::fetch_by_transcript_id ( )
  Arg [1]    : int $transcriptid
               The unique database identifier of the transcript around which 
               the slice is desired
  Arg [2]    : (optional) int $size
               The length of the flanking regions the slice should encompass 
               on either side of the transcript (0 by default)
  Example    : $slc = $sa->fetch_by_transcript_id(24, 1000);
  Description: Creates a slice around the region of the specified transcript.
               If a context size is given, the slice is extended by that
               number of basepairs on either side of the
               transcript.
  Returntype : Bio::EnsEMBL::Slice
  Exceptions : throw on incorrect args
               throw if transcript is not in database
  Caller     : general
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::Slice Bio::EnsEMBL::DBSQL::SliceAdaptor::fetch_by_transcript_stable_id ( )
  Arg [1]    : string $transcriptid
               The stable id of the transcript around which the slice is 
               desired
  Arg [2]    : (optional) int $size
               The length of the flanking regions the slice should encompass 
               on either side of the transcript (0 by default)
  Example    : $slc = $sa->fetch_by_transcript_stable_id('ENST00000302930',10);
  Description: Creates a slice around the region of the specified transcript. 
               If a context size is given, the slice is extended by that 
               number of basepairs on either side of the
               transcript.
  Returntype : Bio::EnsEMBL::Slice
  Exceptions : Thrown if the transcript is not in the database.
  Caller     : general
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::DBSQL::SliceAdaptor::fetch_normalized_slice_projection ( )
  Arg [1]    : Bio::EnsEMBL::Slice $slice
  Example    :  ( optional )
  Description: gives back a project style result. The returned slices 
               represent the areas to which there are symlinks for the 
               given slice. start, end show which area on given slice is 
               symlinked
  Returntype : [[start,end,$slice][]]
  Exceptions : none
  Caller     : BaseFeatureAdaptor
  Status     : Stable
 
Code:
click to view
public Listref Bio::EnsEMBL::DBSQL::BaseAdaptor::generic_fetch ( ) [inherited]
  Arg [1]    : (optional) string $constraint
               An SQL query constraint (i.e. part of the WHERE clause)
  Arg [2]    : (optional) Bio::EnsEMBL::AssemblyMapper $mapper
               A mapper object used to remap features
               as they are retrieved from the database
  Arg [3]    : (optional) Bio::EnsEMBL::Slice $slice
               A slice that features should be remapped to
  Example    : $fts = $a->generic_fetch('contig_id in (1234, 1235)', 'Swall');
  Description: Performs a database fetch and returns feature objects in
               contig coordinates.
  Returntype : listref of Bio::EnsEMBL::SeqFeature in contig coordinates
  Exceptions : none
  Caller     : BaseFeatureAdaptor, ProxyDnaAlignFeatureAdaptor::generic_fetch
  Status     : Stable
 
Code:
click to view

Reimplemented in Bio::EnsEMBL::DBSQL::DataFileAdaptor.

public Bio::EnsEMBL::DBSQL::BaseAdaptor::get_dumped_data ( ) [inherited]

Undocumented method

Code:
click to view
public Int Bio::EnsEMBL::DBSQL::SliceAdaptor::get_seq_region_id ( )
  Arg [1]    : Bio::EnsEMBL::Slice $slice
               The slice to fetch a seq_region_id for
  Example    : $srid = $slice_adaptor->get_seq_region_id($slice);
  Description: Retrieves the seq_region id (in this database) given a slice
               Seq region ids are not stored on the slices themselves
               because they are intended to be somewhat database independant
               and seq_region_ids vary accross databases.
  Returntype : int
  Exceptions : throw if the seq_region of the slice is not in the db
               throw if incorrect arg provided
  Caller     : BaseFeatureAdaptor
  Status     : Stable
 
Code:
click to view
public Boolean Bio::EnsEMBL::DBSQL::BaseAdaptor::is_multispecies ( ) [inherited]
  Arg [1]    : (optional) boolean $arg
  Example    : if ($adaptor->is_multispecies()) { }
  Description: Getter/Setter for the is_multispecies boolean of
               to use for this adaptor.
  Returntype : boolean
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view
public Int Bio::EnsEMBL::DBSQL::SliceAdaptor::is_reference ( )
  Arg        : int seq_region_id 
  Example    : my $reference = $slice_adptor->is_reference($seq_region_id)
  Description: Returns 1 if slice is a reference slice else 0
  Returntype : int
  Caller     : Slice method is_reference
  Status     : At Risk
 
Code:
click to view
public Int Bio::EnsEMBL::DBSQL::SliceAdaptor::is_toplevel ( )
  Arg        : int seq_region_id 
  Example    : my $top = $slice_adptor->is_toplevel($seq_region_id)
  Description: Returns 1 if slice is a toplevel slice else 0
  Returntype : int
  Caller     : Slice method is_toplevel
  Status     : At Risk
 
Code:
click to view
public Scalar Bio::EnsEMBL::DBSQL::BaseAdaptor::last_insert_id ( ) [inherited]
  Arg [1]     : (optional) $field the name of the field the inserted ID was pushed 
                into
  Arg [2]     : (optional) HashRef used to pass extra attributes through to the 
                DBD driver
  Description : Delegating method which uses DBI to extract the last inserted 
                identifier. If using MySQL we just call the DBI method 
                DBI::last_insert_id() since MySQL ignores any extra
                arguments. See DBI for more information about this 
                delegated method. 
  Example     : my $id = $self->last_insert_id('my_id'); my $other_id = $self->last_insert_id();
  Returntype  : Scalar or undef
 
Code:
click to view
public Bio::EnsEMBL::DBSQL::SliceAdaptor::list_overlapping_supercontigs ( )
  Description:

Deprecated:
use Slice::project instead
 
Code:
click to view
public Bio::EnsEMBL::DBSQL::SliceAdaptor::new ( )

Undocumented method

Code:
click to view

Reimplemented from Bio::EnsEMBL::DBSQL::BaseAdaptor.

public DBD::sth Bio::EnsEMBL::DBSQL::SliceAdaptor::prepare ( )
  Arg [1]    : String $sql
  Example    :  ( optional )
  Description: overrides the default adaptor prepare method.
               All slice sql will usually use the dna_db.
  Returntype : DBD::sth 
  Exceptions : none
  Caller     : internal, convenience method
  Status     : Stable
 
Code:
click to view

Reimplemented from Bio::EnsEMBL::DBSQL::BaseAdaptor.

public Int Bio::EnsEMBL::DBSQL::BaseAdaptor::species_id ( ) [inherited]
  Arg [1]    : (optional) int $species_id
               The internal ID of the species in a multi-species database.
  Example    : $db = $adaptor->db();
  Description: Getter/Setter for the internal ID of the species in a
               multi-species database.  The default species ID is 1.
  Returntype : Integer
  Exceptions : none
  Caller     : Adaptors inherited from BaseAdaptor
  Status     : Stable
 
Code:
click to view
public Int Bio::EnsEMBL::DBSQL::SliceAdaptor::store ( )
  Arg [1]    : Bio::EnsEMBL::Slice $slice
  Arg [2]    : (optional) $seqref reference to a string
               The sequence associated with the slice to be stored.
  Example    : $slice = Bio::EnsEMBL::Slice->new(...);
               $seq_region_id = $slice_adaptor->store($slice, \$sequence);
  Description: This stores a slice as a sequence region in the database
               and returns the seq region id. The passed in slice must
               start at 1, and must have a valid seq_region name and coordinate
               system. The attached coordinate system must already be stored in
               the database.  The sequence region is assumed to start at 1 and
               to have a length equalling the length of the slice.  The end of
               the slice must equal the seq_region_length.
               If the slice coordinate system is the sequence level coordinate
               system then the seqref argument must also be passed.  If the
               slice coordinate system is NOT a sequence level coordinate
               system then the sequence argument cannot be passed.
  Returntype : int 
  Exceptions : throw if slice has no coord system.
               throw if slice coord system is not already stored.
               throw if slice coord system is seqlevel and no sequence is 
                     provided.
               throw if slice coord system is not seqlevel and sequence is
                     provided.
               throw if slice does not start at 1
               throw if sequence is provided and the sequence length does not
                     match the slice length.
               throw if the SQL insert fails (e.g. on duplicate seq region)
               throw if slice argument is not passed
               throw if the slice end is not equal to seq_region_length
  Caller     : database loading scripts
  Status     : Stable
 
Code:
click to view
public String Bio::EnsEMBL::DBSQL::SliceAdaptor::store_assembly ( )
  Arg [1]    : Bio::EnsEMBL::Slice $asm_slice
  Arg [2]    : Bio::EnsEMBL::Slice $cmp_slice
  Example    : $asm = $slice_adaptor->store_assembly( $slice1, $slice2 );
  Description: Creates an entry in the analysis table based on the 
               coordinates of the two slices supplied. Returns a string 
               representation of the assembly that gets created.
  Returntype : string
  Exceptions : throw if either slice has no coord system (cs).
               throw unless the cs rank of the asm_slice is lower than the 
               cmp_slice.
               throw if there is no mapping path between coord systems
               throw if the lengths of each slice are not equal
               throw if there are existing mappings between either slice
               and the oposite cs
  Caller     : database loading scripts
  Status     : Experimental
 
Code:
click to view

The documentation for this class was generated from the following file: