ensembl-hive  2.6
Bio::EnsEMBL::ChainedAssemblyMapper Class Reference

Public Member Functions

public Bio::EnsEMBL::DBSQL::AssemblyMapperAdaptor new ()
 
public Int max_pair_count ()
 
public void register_all ()
 
public flush ()
 
public Int size ()
 
public List map ()
 
public fastmap ()
 
public List list_ids ()
 
public List list_seq_regions ()
 
public Bio::EnsEMBL::Mapper first_last_mapper ()
 
public Bio::EnsEMBL::Mapper first_middle_mapper ()
 
public Bio::EnsEMBL::Mapper last_middle_mapper ()
 
public Bio::EnsEMBL::CoordSystem first_CoordSystem ()
 
public Bio::EnsEMBL::CoordSystem middle_CoordSystem ()
 
public Bio::EnsEMBL::CoordSystem last_CoordSystem ()
 
public Bio::EnsEMBL::Mapper::RangeRegistry first_registry ()
 
public Bio::EnsEMBL::Mapper::RangeRegistry last_registry ()
 
public Bio::EnsEMBL::Mapper mapper ()
 
public Bio::EnsEMBL::CoordSystem assembled_CoordSystem ()
 
public Bio::EnsEMBL::CoordSystem component_CoordSystem ()
 
public Bio::EnsEMBL::DBSQL::AssemblyMapperAdaptor adaptor ()
 

Detailed Description

Synopsis

$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');
$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 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 chromosome names for a contig region
@chr_ids =
$asm_mapper->list_ids( 'AL30421.1', 1, 1000, -1, $cln_cs );

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,

  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.

Definition at line 54 of file ChainedAssemblyMapper.pm.

Member Function Documentation

◆ adaptor()

public Bio::EnsEMBL::DBSQL::AssemblyMapperAdaptor Bio::EnsEMBL::ChainedAssemblyMapper::adaptor ( )
  Arg [1]    : Bio::EnsEMBL::DBSQL::AssemblyMapperAdaptor $adaptor
  Description: get/set for this objects database adaptor
  Returntype : Bio::EnsEMBL::DBSQL::AssemblyMapperAdaptor
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ assembled_CoordSystem()

public Bio::EnsEMBL::CoordSystem Bio::EnsEMBL::ChainedAssemblyMapper::assembled_CoordSystem ( )
  Args       : none
  Example    :
$coordsys = $cam->assembled_CoordSystem();
  Description: return the first CoordSystem.
  Returntype : Bio::EnsEMBL::CoordSystem
  Exceptions : none
  Caller     : internal
  Status     : Stable
 
Code:
click to view

◆ component_CoordSystem()

public Bio::EnsEMBL::CoordSystem Bio::EnsEMBL::ChainedAssemblyMapper::component_CoordSystem ( )
  Args       : none
  Example    :
$coordsys = $cam->component_CoordSystem();
  Description: return the last CoordSystem.
  Returntype : Bio::EnsEMBL::CoordSystem
  Exceptions : none
  Caller     : internal
  Status     : Stable
 
Code:
click to view

◆ fastmap()

public Bio::EnsEMBL::ChainedAssemblyMapper::fastmap ( )

Undocumented method

Code:
click to view

◆ first_CoordSystem()

public Bio::EnsEMBL::CoordSystem Bio::EnsEMBL::ChainedAssemblyMapper::first_CoordSystem ( )
  Args       : none
  Example    :
$coordsys = $cam->first_CoordSystem();
  Description: return the CoordSystem.
  Returntype : Bio::EnsEMBL::CoordSystem
  Exceptions : none
  Caller     : internal
  Status     : Stable
 
Code:
click to view

◆ first_last_mapper()

public Bio::EnsEMBL::Mapper Bio::EnsEMBL::ChainedAssemblyMapper::first_last_mapper ( )
  Args       : none
  Example    :
$mapper = $cam->first_last_mapper();
  Description: return the mapper.
  Returntype : Bio::EnsEMBL::Mapper
  Exceptions : none
  Caller     : internal
  Status     : Stable
 
Code:
click to view

◆ first_middle_mapper()

public Bio::EnsEMBL::Mapper Bio::EnsEMBL::ChainedAssemblyMapper::first_middle_mapper ( )
  Args       : none
  Example    :
$mapper = $cam->first_middle_mapper();
  Description: return the mapper.
  Returntype : Bio::EnsEMBL::Mapper
  Exceptions : none
  Caller     : internal
  Status     : Stable
 
Code:
click to view

◆ first_registry()

public Bio::EnsEMBL::Mapper::RangeRegistry Bio::EnsEMBL::ChainedAssemblyMapper::first_registry ( )
  Args       : none
  Example    :
$rr = $cam->first_registry();
  Description: return the Registry.
  Returntype : Bio::EnsEMBL::Mapper::RangeRegistry
  Exceptions : none
  Caller     : internal
  Status     : Stable
 
Code:
click to view

◆ flush()

public Bio::EnsEMBL::ChainedAssemblyMapper::flush ( )

Undocumented method

Code:
click to view

◆ last_CoordSystem()

public Bio::EnsEMBL::CoordSystem Bio::EnsEMBL::ChainedAssemblyMapper::last_CoordSystem ( )
  Args       : none
  Example    :
$coordsys = $cam->last_CoordSystem();
  Description: return the CoordSystem.
  Returntype : Bio::EnsEMBL::CoordSystem
  Exceptions : none
  Caller     : internal
  Status     : Stable
 
Code:
click to view

◆ last_middle_mapper()

public Bio::EnsEMBL::Mapper Bio::EnsEMBL::ChainedAssemblyMapper::last_middle_mapper ( )
  Args       : none
  Example    :
$mapper = $cam->last_middle_mapper();
  Description: return the mapper.
  Returntype : Bio::EnsEMBL::Mapper
  Exceptions : none
  Caller     : internal
  Status     : Stable
 
Code:
click to view

◆ last_registry()

public Bio::EnsEMBL::Mapper::RangeRegistry Bio::EnsEMBL::ChainedAssemblyMapper::last_registry ( )
  Args       : none
  Example    :
$rr = $cam->last_registry();
  Description: return the Registry.
  Returntype : Bio::EnsEMBL::Mapper::RangeRegistry
  Exceptions : none
  Caller     : internal
  Status     : Stable
 
Code:
click to view

◆ list_ids()

public List Bio::EnsEMBL::ChainedAssemblyMapper::list_ids ( )
  Arg [1]    : string $frm_seq_region
               The name of the sequence region of interest
  Arg [2]    : int $frm_start
               The start of the region of interest
  Arg [3]    : int $frm_end
               The end of the region to transform of interest
  Arg [5]    : Bio::EnsEMBL::CoordSystem $frm_cs
               The coordinate system to obtain overlapping ids of
  Example    :
foreach $id ($asm_mapper->list_ids('X',1,1000,$chr_cs)) {...}
  Description: Retrieves a list of overlapping seq_region internal identifiers
               of another coordinate system.  This is the same as the
               list_seq_regions method but uses internal identfiers rather
               than seq_region strings
  Returntype : List of ints
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ list_seq_regions()

public List Bio::EnsEMBL::ChainedAssemblyMapper::list_seq_regions ( )
  Arg [1]    : string $frm_seq_region
               The name of the sequence region of interest
  Arg [2]    : int $frm_start
               The start of the region of interest
  Arg [3]    : int $frm_end
               The end of the region to transform of interest
  Arg [5]    : Bio::EnsEMBL::CoordSystem $frm_cs
               The coordinate system to obtain overlapping ids of
  Example    :
foreach $id ($asm_mapper->list_ids('X',1,1000,$ctg_cs)) {...}
  Description: Retrieves a list of overlapping seq_region internal identifiers
               of another coordinate system.  This is the same as the
               list_ids method but uses seq_region names rather internal ids
  Returntype : List of strings
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ map()

public List Bio::EnsEMBL::ChainedAssemblyMapper::map ( )
  Arg [1]    : string $frm_seq_region
               The name of the sequence region to transform FROM
  Arg [2]    : int $frm_start
               The start of the region to transform FROM
  Arg [3]    : int $frm_end
               The end of the region to transform FROM
  Arg [4]    : int $strand
               The strand of the region to transform FROM
  Arg [5]    : Bio::EnsEMBL::CoordSystem
               The coordinate system to transform FROM
  Arg [6]    : (optional) fastmap
  Arg [7]    : (optional) Bio::Ensembl::Slice
               The slice to transform TO
  Arg [8]    : (optional) boolean
               Whether to include the original coordinates or not
  Example    :
@coords = $asm_mapper->map('X', 1_000_000, 2_000_000,
1, $chr_cs);
  Description: Transforms coordinates from one coordinate system
               to another.
  Returntype : List of Bio::EnsEMBL::Mapper::Coordinate and/or
               Bio::EnsEMBL::Mapper:Gap objects
  Exceptions : thrown if the specified TO coordinat system is not one
               of the coordinate systems associated with this assembly mapper
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ mapper()

public Bio::EnsEMBL::Mapper Bio::EnsEMBL::ChainedAssemblyMapper::mapper ( )
  Args       : none
  Example    :
$mapper = $cam->mapper();
  Description: return the first_last_mapper.
  Returntype : Bio::EnsEMBL::Mapper
  Exceptions : none
  Caller     : internal
  Status     : Stable
 
Code:
click to view

◆ max_pair_count()

public Int Bio::EnsEMBL::ChainedAssemblyMapper::max_pair_count ( )
  Arg [1]    : (optional) int $max_pair_count
  Example    :
$mapper->max_pair_count(100000)
  Description: Getter/Setter for the number of mapping pairs allowed in the
               internal cache. This can be used to override the default value
               (6000) to tune the performance and memory usage for certain
               scenarios. Higher value = bigger cache, more memory used
  Returntype : int
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ middle_CoordSystem()

public Bio::EnsEMBL::CoordSystem Bio::EnsEMBL::ChainedAssemblyMapper::middle_CoordSystem ( )
  Args       : none
  Example    :
$coordsys = $cam->middle_CoordSystem();
  Description: return the CoordSystem.
  Returntype : Bio::EnsEMBL::CoordSystem
  Exceptions : none
  Caller     : internal
  Status     : Stable
 
Code:
click to view

◆ new()

public Bio::EnsEMBL::DBSQL::AssemblyMapperAdaptor Bio::EnsEMBL::ChainedAssemblyMapper::new ( )
  Arg [1]    : Bio::EnsEMBL::DBSQL::AssemblyMapperAdaptor
  Arg [2]    : Bio::EnsEMBL::CoordSystem $src_cs
  Arg [3]    : Bio::EnsEMBL::CoordSystem $int_cs
  Arg [4]    : Bio::EnsEMBL::CoordSystem $dst_cs
  Example    :
Should use AssemblyMapperAdaptor->fetch_by_CoordSystems
  Description: Creates a new AssemblyMapper
  Returntype : Bio::EnsEMBL::DBSQL::AssemblyMapperAdaptor
  Exceptions : thrown if wrong number of coord_systems are provided
  Caller     : AssemblyMapperAdaptor
  Status     : Stable
 
Code:
click to view

◆ register_all()

public void Bio::EnsEMBL::ChainedAssemblyMapper::register_all ( )
  Arg [1]    : none
  Example    :
$mapper->max_pair_count(10e6);
$mapper->register_all();
  Description: Pre-registers all assembly information in this mapper.  The
               cache size should be set to a sufficiently large value
               so that all of the information can be stored.  This method
               is useful when *a lot* of mapping will be done in regions
               which are distributed around the genome.   After registration
               the mapper will consume a lot of memory but will not have to
               perform any SQL and will be faster.
  Returntype : none
  Exceptions : none
  Caller     : specialised programs doing a lot of mapping
  Status     : Stable
 
Code:
click to view

◆ size()

public Int Bio::EnsEMBL::ChainedAssemblyMapper::size ( )
  Args       : none
  Example    :
$num_of_pairs = $mapper->size();
  Description: return the number of pairs currently stored.
  Returntype : int
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

The documentation for this class was generated from the following file:
Bio::EnsEMBL::ChainedAssemblyMapper::max_pair_count
public Int max_pair_count()
Bio::EnsEMBL::ChainedAssemblyMapper::adaptor
public Bio::EnsEMBL::DBSQL::AssemblyMapperAdaptor adaptor()
Bio::EnsEMBL::Mapper::RangeRegistry
Definition: RangeRegistry.pm:51
Bio::EnsEMBL::DBSQL::DBAdaptor
Definition: DBAdaptor.pm:40
Bio::EnsEMBL::ChainedAssemblyMapper::component_CoordSystem
public Bio::EnsEMBL::CoordSystem component_CoordSystem()
Bio::EnsEMBL::ChainedAssemblyMapper::size
public Int size()
Bio::EnsEMBL::ChainedAssemblyMapper::first_last_mapper
public Bio::EnsEMBL::Mapper first_last_mapper()
Bio::EnsEMBL::ChainedAssemblyMapper::first_CoordSystem
public Bio::EnsEMBL::CoordSystem first_CoordSystem()
Bio::EnsEMBL::ChainedAssemblyMapper::last_CoordSystem
public Bio::EnsEMBL::CoordSystem last_CoordSystem()
Bio::EnsEMBL::ChainedAssemblyMapper::first_registry
public Bio::EnsEMBL::Mapper::RangeRegistry first_registry()
Bio::EnsEMBL::ChainedAssemblyMapper::register_all
public void register_all()
Bio::EnsEMBL::ChainedAssemblyMapper::flush
public flush()
Bio::EnsEMBL::ChainedAssemblyMapper::list_ids
public List list_ids()
Bio::EnsEMBL::DBSQL::DBAdaptor::new
public Bio::EnsEMBL::DBSQL::DBAdaptor new()
Bio::EnsEMBL::ChainedAssemblyMapper::last_middle_mapper
public Bio::EnsEMBL::Mapper last_middle_mapper()
Bio::EnsEMBL::ChainedAssemblyMapper::fastmap
public fastmap()
Bio::EnsEMBL::ChainedAssemblyMapper::map
public List map()
Bio::EnsEMBL::Mapper::RangeRegistry::new
public Bio::EnsEMBL::Mapper::RangeRegistry new()
Bio::EnsEMBL::ChainedAssemblyMapper::assembled_CoordSystem
public Bio::EnsEMBL::CoordSystem assembled_CoordSystem()
Bio::EnsEMBL::ChainedAssemblyMapper::last_registry
public Bio::EnsEMBL::Mapper::RangeRegistry last_registry()
Bio::EnsEMBL::ChainedAssemblyMapper::middle_CoordSystem
public Bio::EnsEMBL::CoordSystem middle_CoordSystem()
Bio::EnsEMBL::Mapper
Definition: Coordinate.pm:3
Bio::EnsEMBL::ChainedAssemblyMapper::mapper
public Bio::EnsEMBL::Mapper mapper()
Bio::EnsEMBL::ChainedAssemblyMapper::list_seq_regions
public List list_seq_regions()
Bio::EnsEMBL::ChainedAssemblyMapper::first_middle_mapper
public Bio::EnsEMBL::Mapper first_middle_mapper()