ensembl-hive  2.8.1
Bio::EnsEMBL::IdMapping::SyntenyRegion Class Reference

Public Member Functions

public A new_fast ()
 
public Int source_start ()
 
public Int source_end ()
 
public Int source_strand ()
 
public String source_seq_region_name ()
 
public Int target_start ()
 
public Int target_end ()
 
public Int target_strand ()
 
public String target_seq_region_name ()
 
public Int score ()
 
public Bio::EnsEMBL::IdMapping::SyntenyRegion merge ()
 
public Bio::EnsEMBL::IdMapping::SyntenyRegion stretch ()
 
public Float score_location_relationship ()
 
public String to_string ()
 

Detailed Description

Synopsis

# create a new SyntenyRegion from a source and a target gene
$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 );

Description

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.

Definition at line 33 of file SyntenyRegion.pm.

Member Function Documentation

◆ merge()

public Bio::EnsEMBL::IdMapping::SyntenyRegion Bio::EnsEMBL::IdMapping::SyntenyRegion::merge ( )
  Arg[1]      : Bio::EnsEMBL::IdMapping::SyntenyRegion $sr - another
                SyntenyRegion
  Example     :
$merged_sr = $sr->merge($other_sr);
  Description : Merges two overlapping SyntenyRegions if they meet certain
                criteria (see documentation in the code for details). Score is
                calculated as a combined distance score. If the two
                SyntenyRegions aren't mergeable, this method returns undef.
  Return type : Bio::EnsEMBL::IdMapping::SyntenyRegion or undef
  Exceptions  : warns on bad scores
  Caller      : Bio::EnsEMBL::IdMapping::SyntenyFramework
  Status      : At Risk
              : under development
 
Code:
click to view

◆ new_fast()

public A Bio::EnsEMBL::IdMapping::SyntenyRegion::new_fast ( )
  Arg[1]      : Arrayref $array_ref - the arrayref to bless into the
                SyntenyRegion object 
  Example     :
  Description : Constructor. On instantiation, source and target regions are
                reverse complemented so that source is always on forward strand.
  Return type : a Bio::EnsEMBL::IdMapping::SyntenyRegion object
  Exceptions  : none
  Caller      : Bio::EnsEMBL::IdMapping::SyntenyFramework
  Status      : At Risk
              : under development
 
Code:
click to view

◆ score()

public Int Bio::EnsEMBL::IdMapping::SyntenyRegion::score ( )
  Arg[1]      : (optional) Float - score
  Description : Getter/setter for the score between source and target location.
  Return type : Int
  Exceptions  : none
  Caller      : Bio::EnsEMBL::IdMapping::SyntenyFramework
  Status      : At Risk
              : under development
 
Code:
click to view

◆ score_location_relationship()

public Float Bio::EnsEMBL::IdMapping::SyntenyRegion::score_location_relationship ( )
  Arg[1]      : Bio::EnsEMBL::IdMapping::TinyGene $source_gene - source gene
  Arg[2]      : Bio::EnsEMBL::IdMapping::TinyGene $target_gene - target gene
  Example     :
my $score = $sr->score_location_relationship($source_gene,
$target_gene);
  Description : This function calculates how well the given source location
                interpolates on given target location inside this SyntenyRegion.
                Scoring is done the following way: Source and target location
                are normalized with respect to this Regions source and target.
                Source range will then be somewhere close to 0.0-1.0 and target
                range anything around that.
                The extend of the covered area between source and target range
                is a measurement of how well they agree (smaller extend is
                better). The extend (actually 2*extend) is reduced by the size
                of the regions. This will result in 0.0 if they overlap
                perfectly and bigger values if they dont.
                This is substracted from 1.0 to give the score. The score is
                likely to be below zero, but is cut off at 0.0f.
                Finally, the score is multiplied with the score of the synteny
                itself.
  Return type : Float
  Exceptions  : warns if score out of range
  Caller      : Bio::EnsEMBL::IdMapping::SyntenyFramework
  Status      : At Risk
              : under development
 
Code:
click to view

◆ source_end()

public Int Bio::EnsEMBL::IdMapping::SyntenyRegion::source_end ( )
  Arg[1]      : (optional) Int - source location end coordinate
  Description : Getter/setter for source location end coordinate.
  Return type : Int
  Exceptions  : none
  Caller      : Bio::EnsEMBL::IdMapping::SyntenyFramework
  Status      : At Risk
              : under development
 
Code:
click to view

◆ source_seq_region_name()

public String Bio::EnsEMBL::IdMapping::SyntenyRegion::source_seq_region_name ( )
  Arg[1]      : (optional) String - source location seq_region name
  Description : Getter/setter for source location seq_region name.
  Return type : String
  Exceptions  : none
  Caller      : Bio::EnsEMBL::IdMapping::SyntenyFramework
  Status      : At Risk
              : under development
 
Code:
click to view

◆ source_start()

public Int Bio::EnsEMBL::IdMapping::SyntenyRegion::source_start ( )
  Arg[1]      : (optional) Int - source location start coordinate
  Description : Getter/setter for source location start coordinate.
  Return type : Int
  Exceptions  : none
  Caller      : Bio::EnsEMBL::IdMapping::SyntenyFramework
  Status      : At Risk
              : under development
 
Code:
click to view

◆ source_strand()

public Int Bio::EnsEMBL::IdMapping::SyntenyRegion::source_strand ( )
  Arg[1]      : (optional) Int - source location strand
  Description : Getter/setter for source location strand.
  Return type : Int
  Exceptions  : none
  Caller      : Bio::EnsEMBL::IdMapping::SyntenyFramework
  Status      : At Risk
              : under development
 
Code:
click to view

◆ stretch()

public Bio::EnsEMBL::IdMapping::SyntenyRegion Bio::EnsEMBL::IdMapping::SyntenyRegion::stretch ( )
  Arg[1]      : Float $factor - stretching factor
  Example     :
$stretched_sr = $sr->stretch(2);
  Description : Extends this SyntenyRegion to span a $factor * $score more area.
  Return type : Bio::EnsEMBL::IdMapping::SyntenyRegion
  Exceptions  : none
  Caller      : Bio::EnsEMBL::IdMapping::SyntenyFramework
  Status      : At Risk
              : under development
 
Code:
click to view

◆ target_end()

public Int Bio::EnsEMBL::IdMapping::SyntenyRegion::target_end ( )
  Arg[1]      : (optional) Int - target location end coordinate
  Description : Getter/setter for target location end coordinate.
  Return type : Int
  Exceptions  : none
  Caller      : Bio::EnsEMBL::IdMapping::SyntenyFramework
  Status      : At Risk
              : under development
 
Code:
click to view

◆ target_seq_region_name()

public String Bio::EnsEMBL::IdMapping::SyntenyRegion::target_seq_region_name ( )
  Arg[1]      : (optional) String - target location seq_region name
  Description : Getter/setter for target location seq_region name.
  Return type : String
  Exceptions  : none
  Caller      : Bio::EnsEMBL::IdMapping::SyntenyFramework
  Status      : At Risk
              : under development
 
Code:
click to view

◆ target_start()

public Int Bio::EnsEMBL::IdMapping::SyntenyRegion::target_start ( )
  Arg[1]      : (optional) Int - target location start coordinate
  Description : Getter/setter for target location start coordinate.
  Return type : Int
  Exceptions  : none
  Caller      : Bio::EnsEMBL::IdMapping::SyntenyFramework
  Status      : At Risk
              : under development
 
Code:
click to view

◆ target_strand()

public Int Bio::EnsEMBL::IdMapping::SyntenyRegion::target_strand ( )
  Arg[1]      : (optional) Int - target location strand
  Description : Getter/setter for target location strand.
  Return type : Int
  Exceptions  : none
  Caller      : Bio::EnsEMBL::IdMapping::SyntenyFramework
  Status      : At Risk
              : under development
 
Code:
click to view

◆ to_string()

public String Bio::EnsEMBL::IdMapping::SyntenyRegion::to_string ( )
  Example     :
print LOG $sr->to_string, "\n";
  Description : Returns a string representation of the SyntenyRegion object.
                Useful for debugging and logging.
  Return type : String
  Exceptions  : none
  Caller      : Bio::EnsEMBL::IdMapping::SyntenyFramework
  Status      : At Risk
              : under development
 
Code:
click to view

The documentation for this class was generated from the following file:
Bio::EnsEMBL::IdMapping::SyntenyRegion::source_seq_region_name
public String source_seq_region_name()
Bio::EnsEMBL::IdMapping::SyntenyRegion::source_strand
public Int source_strand()
Bio::EnsEMBL::IdMapping::SyntenyRegion::score
public Int score()
Bio::EnsEMBL::IdMapping::SyntenyRegion::target_end
public Int target_end()
Bio::EnsEMBL::IdMapping::SyntenyRegion::target_seq_region_name
public String target_seq_region_name()
Bio::EnsEMBL::IdMapping::SyntenyRegion::target_start
public Int target_start()
Bio::EnsEMBL::IdMapping::SyntenyRegion::new_fast
public A new_fast()
Bio::EnsEMBL::IdMapping::SyntenyRegion::target_strand
public Int target_strand()
Bio::EnsEMBL::IdMapping::SyntenyRegion::to_string
public String to_string()
Bio::EnsEMBL::IdMapping::SyntenyRegion::score_location_relationship
public Float score_location_relationship()
Bio::EnsEMBL::IdMapping::SyntenyRegion
Definition: SyntenyRegion.pm:33
Bio::EnsEMBL::IdMapping::SyntenyRegion::stretch
public Bio::EnsEMBL::IdMapping::SyntenyRegion stretch()
Bio::EnsEMBL::IdMapping::SyntenyRegion::source_end
public Int source_end()
Bio::EnsEMBL::IdMapping::SyntenyRegion::source_start
public Int source_start()
Bio::EnsEMBL::IdMapping::SyntenyRegion::merge
public Bio::EnsEMBL::IdMapping::SyntenyRegion merge()