ensembl-hive  2.6
Bio::EnsEMBL::CircularSlice Class Reference
+ Inheritance diagram for Bio::EnsEMBL::CircularSlice:

Public Member Functions

public Bio::EnsEMBL::CircularSlice new ()
 
public Int centrepoint ()
 
public Int length ()
 
protected _split ()
 
public String seq ()
 
public Txt subseq ()
 
public Bio::EnsEMBL::Slice expand ()
 
public Listref get_all_VariationFeatures ()
 
public Listref get_all_genotyped_VariationFeatures ()
 
public Hashref get_all_DASFeatures ()
 
public List project_to_slice ()
 
public id ()
 
public display_id ()
 
public primary_id ()
 
public desc ()
 
public moltype ()
 
public alphabet ()
 
public accession_number ()
 
public is_circular ()
 
- Public Member Functions inherited from Bio::EnsEMBL::Slice
public Bio::EnsEMBL::Slice new ()
 
public Bio::EnsEMBL::Slice new_fast ()
 
public Bio::EnsEMBL::DBSQL::SliceAdaptor adaptor ()
 
public String seq_region_name ()
 
public Int seq_region_start ()
 
public Int seq_region_end ()
 
public Int seq_region_length ()
 
public Bio::EnsEMBL::CoordSystem coord_system ()
 
public String source ()
 
public String coord_system_name ()
 
public Int centrepoint ()
 
public Int start ()
 
public Int end ()
 
public Int strand ()
 
public String name ()
 
public Int length ()
 
public Int is_reference ()
 
public Int is_toplevel ()
 
public Int has_karyotype ()
 
public Int karyotype_rank ()
 
public Int is_circular ()
 
public Bio::EnsEMBL::Slice invert ()
 
public String seq ()
 
public Txt subseq ()
 
public Bio::EnsEMBL::Utils::Iterator sub_Slice_Iterator ()
 
public String assembly_exception_type ()
 
public Boolean is_chromosome ()
 
public Hashref get_base_count ()
 
public List project ()
 
protected _constrain_to_region ()
 
public Bio::EnsEMBL::Slice expand ()
 
public Bio::EnsEMBL::Slice constrain_to_seq_region ()
 
public Bio::EnsEMBL::Slice sub_Slice ()
 
public Bio::EnsEMBL::Slice seq_region_Slice ()
 
public Int get_seq_region_id ()
 
public Scalar get_genome_component ()
 
public Listref get_all_Attributes ()
 
public Listref get_all_PredictionTranscripts ()
 
public Listref get_all_DnaAlignFeatures ()
 
public Listref get_all_ProteinAlignFeatures ()
 
protected _get_AlignFeatures ()
 
public Listref get_all_SimilarityFeatures ()
 
public Listref get_all_SimpleFeatures ()
 
public Listref get_all_RepeatFeatures ()
 
public Bio::EnsEMBL::Variation::LDFeatureContainer get_all_LD_values ()
 
protected _get_VariationFeatureAdaptor ()
 
protected _get_StructuralVariationFeatureAdaptor ()
 
protected Bio::EnsEMBL::DBSQL::BaseAdaptor _get_VariationAdaptor ()
 
protected Bio::EnsEMBL::DBSQL::BaseAdaptor _get_CoreAdaptor ()
 
protected Bio::EnsEMBL::DBSQL::BaseAdaptor _get_Adaptor ()
 
public Listref get_all_VariationFeatures ()
 
public Listref get_all_somatic_VariationFeatures ()
 
public Listref get_all_somatic_VariationFeatures_by_source ()
 
public Listref get_all_somatic_VariationFeatures_with_phenotype ()
 
public Listref get_all_VariationFeatures_by_Population ()
 
public Listref get_all_Genes ()
 
public Listref get_all_Genes_by_type ()
 
public Listref get_all_Genes_by_source ()
 
public Reference get_all_Transcripts ()
 
public Listref get_all_Transcripts_by_type ()
 
public Listref get_all_Transcripts_by_source ()
 
public Reference get_all_Exons ()
 
public Listref get_all_KaryotypeBands ()
 
public Bio::EnsEMBL::RepeatMaskedSlice get_repeatmasked_seq ()
 
protected void _mask_features ()
 
public Listref get_all_SearchFeatures ()
 
public Listref get_all_AssemblyExceptionFeatures ()
 
public Listref get_all_MiscFeatures ()
 
public Reference get_all_MarkerFeatures ()
 
public Reference get_MarkerFeatures_by_Name ()
 
public Reference get_all_compara_DnaAlignFeatures ()
 
public Arrayref get_all_compara_Syntenies ()
 
public Listref get_all_Haplotypes ()
 
public get_all_DASFactories ()
 
public get_all_DASFeatures_dsn ()
 
public Hashref get_all_DAS_Features ()
 
public get_all_DASFeatures ()
 
public old_get_all_DASFeatures ()
 
public Listref get_all_ExternalFeatures ()
 
public Listref get_all_DitagFeatures ()
 
public Hash get_generic_features ()
 
public List project_to_slice ()
 
public Reference get_all_synonyms ()
 
public void add_synonym ()
 
public String feature_so_acc ()
 
public String feature_so_term ()
 
public Hashref summary_as_hash ()
 
public slice ()
 
public id ()
 
public display_id ()
 
public primary_id ()
 
public desc ()
 
public moltype ()
 
public alphabet ()
 
public accession_number ()
 

Detailed Description

Synopsis

$sa = $db->get_SliceAdaptor;
$slice =
$sa->fetch_by_region( 'chromosome', 'X', 1_000_000, 2_000_000 );
# get some attributes of the slice
my $seqname = $slice->seq_region_name();
my $start = $slice->start();
my $end = $slice->end();
# get the sequence from the slice
my $seq = $slice->seq();
# 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
}

Description

A Slice object represents a region of a genome.  It can be used to
retrieve sequence or features from an area of interest.

Definition at line 48 of file CircularSlice.pm.

Member Function Documentation

◆ _split()

protected Bio::EnsEMBL::CircularSlice::_split ( )

Undocumented method

Code:
click to view

◆ accession_number()

public Bio::EnsEMBL::CircularSlice::accession_number ( )
  Description: Included for Bio::PrimarySeqI interface compliance (1.2)
 
Code:
click to view

◆ alphabet()

public Bio::EnsEMBL::CircularSlice::alphabet ( )
  Description: Included for Bio::PrimarySeqI interface compliance (1.2)
 
Code:
click to view

◆ centrepoint()

public Int Bio::EnsEMBL::CircularSlice::centrepoint ( )
  Arg [1]    : none
  Example    :
$cp = $slice->centrepoint();
  Description: Returns the mid position of this slice relative to the
               start of the sequence region that it was created on.
               Coordinates are inclusive and start at 1.
  Returntype : int
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ desc()

public Bio::EnsEMBL::CircularSlice::desc ( )
Description: Included for Bio::PrimarySeqI interface compliance (1.2)
 
Code:
click to view

◆ display_id()

public Bio::EnsEMBL::CircularSlice::display_id ( )
  Description: Included for Bio::PrimarySeqI interface compliance (1.2)
 
Code:
click to view

◆ expand()

public Bio::EnsEMBL::Slice Bio::EnsEMBL::CircularSlice::expand ( )
  Arg [1]    : (optional) int $five_prime_expand
               The number of basepairs to shift this slices five_prime
               coordinate by.  Positive values make the slice larger,
               negative make the slice smaller.
               coordinate left.
               Default = 0.
  Arg [2]    : (optional) int $three_prime_expand
               The number of basepairs to shift this slices three_prime
               coordinate by. Positive values make the slice larger,
               negative make the slice smaller.
               Default = 0.
  Arg [3]    : (optional) bool $force_expand
               if set to 1, then the slice will be contracted even in the case 
               when shifts $five_prime_expand and $three_prime_expand overlap. 
               In that case $five_prime_expand and $three_prime_expand will be set 
               to a maximum possible number and that will result in the slice 
               which would have only 2pbs.
               Default = 0.
  Arg [4]    : (optional) int* $fpref
               The reference to a number of basepairs to shift this slices five_prime
               coordinate by. Normally it would be set to $five_prime_expand. 
               But in case when $five_prime_expand shift can not be applied and 
               $force_expand is set to 1, then $$fpref will contain the maximum possible
               shift
  Arg [5]    : (optional) int* $tpref
               The reference to a number of basepairs to shift this slices three_prime
               coordinate by. Normally it would be set to $three_prime_expand. 
               But in case when $five_prime_expand shift can not be applied and 
               $force_expand is set to 1, then $$tpref will contain the maximum possible
               shift
  Example    :
my $expanded_slice = $slice->expand( 1000, 1000);
my $contracted_slice = $slice->expand(-1000,-1000);
my $shifted_right_slice = $slice->expand(-1000, 1000);
my $shifted_left_slice = $slice->expand( 1000,-1000);
my $forced_contracted_slice = $slice->expand(-1000,-1000, 1, \$five_prime_shift, \$three_prime_shift);
  Description: Returns a slice which is a resized copy of this slice.  The
               start and end are moved outwards from the center of the slice
               if positive values are provided and moved inwards if negative
               values are provided. This slice remains unchanged.  A slice
               may not be contracted below 1bp but may grow to be arbitrarily
               large.
  Returntype : Bio::EnsEMBL::Slice
  Exceptions : warning if an attempt is made to contract the slice below 1bp
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ get_all_DASFeatures()

public Hashref Bio::EnsEMBL::CircularSlice::get_all_DASFeatures ( )
  Arg [1]    : none
  Example    :
$features = $slice->get_all_DASFeatures;
  Description: Retrieves a hash reference to a hash of DAS feature
               sets, keyed by the DNS, NOTE the values of this hash
               are an anonymous array containing:
                (1) a pointer to an array of features;
                (2) a pointer to the DAS stylesheet
  Returntype : hashref of Bio::SeqFeatures
  Exceptions : ?
  Caller     : webcode
  Status     : Stable
 
Code:
click to view

◆ get_all_genotyped_VariationFeatures()

public Listref Bio::EnsEMBL::CircularSlice::get_all_genotyped_VariationFeatures ( )
    Args       : none
    Description: returns all variation features on this slice that have been genotyped.
                 This function will only work correctly if the variation database has 
                 been attached to the core database.
    ReturnType : listref of Bio::EnsEMBL::Variation::VariationFeature
    Exceptions : none
    Caller     : contigview, snpview, ldview
    Status     : At Risk
               : Variation database is under development.
 
Code:
click to view

◆ get_all_VariationFeatures()

public Listref Bio::EnsEMBL::CircularSlice::get_all_VariationFeatures ( )
    Args       : $filter [optional]
    Description:returns all variation features on this slice. This function will only work 
                correctly if the variation database has been attached to the core database.
                If $filter is "genotyped" return genotyped Snps only... (nice likkle hack);
    ReturnType : listref of Bio::EnsEMBL::Variation::VariationFeature
    Exceptions : none
    Caller     : contigview, snpview
    Status     : At Risk
               : Variation database is under development.
 
Code:
click to view

◆ id()

public Bio::EnsEMBL::CircularSlice::id ( )
  Description: Included for Bio::PrimarySeqI interface compliance (0.7)
 
Code:
click to view

◆ is_circular()

public Bio::EnsEMBL::CircularSlice::is_circular ( )
  Description: Included for Bio::PrimarySeqI interface compliance (1.2)
 
Code:
click to view

◆ length()

public Int Bio::EnsEMBL::CircularSlice::length ( )
  Arg [1]    : none
  Example    :
$length = $slice->length();
  Description: Returns the length of this slice in basepairs
  Returntype : int
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ moltype()

public Bio::EnsEMBL::CircularSlice::moltype ( )
Description: Included for Bio::PrimarySeqI interface compliance (0.7)
 
Code:
click to view

◆ new()

public Bio::EnsEMBL::CircularSlice Bio::EnsEMBL::CircularSlice::new ( )
  Arg [...]  : List of named arguments
               Bio::EnsEMBL::CoordSystem COORD_SYSTEM
               string SEQ_REGION_NAME,
               int    START,
               int    END,
               int    SEQ_REGION_LENGTH, (optional)
               string SEQ (optional)
               int    STRAND, (optional, defaults to 1)
               Bio::EnsEMBL::DBSQL::SliceAdaptor ADAPTOR (optional)
  Example    :
$slice =
-start => 1,
-end => 10000,
-strand => 1,
-seq_region_name => 'X',
-adaptor => $slice_adaptor );
  Description: Creates a new slice object.  A slice represents a
               region of sequence in a particular coordinate system.
               Slices can be used to retrieve sequence and features
               from an area of interest in a genome.
               Coordinates start at 1 and are inclusive.  Negative
               coordinates or coordinates exceeding the length of
               the seq_region are permitted.  Start must be less
               than or equal. to end regardless of the strand.
               Slice objects are immutable. Once instantiated their
               attributes (with the exception of the adaptor) may
               not be altered.  To change the attributes a new slice
               must be created.
  Returntype : Bio::EnsEMBL::CircularSlice
  Exceptions : throws if start, end, coordsystem or seq_region_name not
               specified or not of the correct type
  Caller     : general, Bio::EnsEMBL::SliceAdaptor
  Status     : Stable
 
Code:
click to view

◆ primary_id()

public Bio::EnsEMBL::CircularSlice::primary_id ( )
  Description: Included for Bio::PrimarySeqI interface compliance (1.2)
 
Code:
click to view

◆ project_to_slice()

public List Bio::EnsEMBL::CircularSlice::project_to_slice ( )
  Arg [1]    : Slice to project to.
  Example    :
my $chr_projection = $clone_slice->project_to_slice($chrom_slice);
foreach my $segment ( @$chr_projection ){
$chr_slice = $segment->to_Slice();
print $clone_slice->seq_region_name(). ':'. $segment->from_start(). '-'.
$segment->from_end(). ' -> '.$chr_slice->seq_region_name(). ':'. $chr_slice->start().
'-'.$chr_slice->end().
                         $chr_slice->strand(). " length: ".($chr_slice->end()-$chr_slice->start()+1). "\n";
                }
  Description: Projection of slice to another specific slice. Needed for where we have multiple mappings
               and we want to state which one to project to.
  Returntype : list reference of Bio::EnsEMBL::ProjectionSegment objects which
               can also be used as [$start,$end,$slice] triplets.
  Exceptions : none
  Caller     : none
  Status     : At Risk
 
Code:
click to view

◆ seq()

public String Bio::EnsEMBL::CircularSlice::seq ( )
  Arg [1]    : none
  Example    :
print "SEQUENCE = ", $slice->seq();
  Description: Returns the sequence of the region represented by this
               slice formatted as a string.
  Returntype : string
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ subseq()

public Txt Bio::EnsEMBL::CircularSlice::subseq ( )
  Arg  [1]   : int $startBasePair
               relative to start of slice, which is 1.
  Arg  [2]   : int $endBasePair
               relative to start of slice.
  Arg  [3]   : (optional) int $strand
               The strand of the slice to obtain sequence from. Default
               value is 1.
  Description: returns string of dna sequence
  Returntype : txt
  Exceptions : end should be at least as big as start
               strand must be set
  Caller     : general
  Status     : Stable
 
Code:
click to view

The documentation for this class was generated from the following file:
Bio::EnsEMBL::CircularSlice
Definition: CircularSlice.pm:48
Bio::EnsEMBL::CircularSlice::seq
public String seq()
map
public map()
Bio::EnsEMBL::CircularSlice::new
public Bio::EnsEMBL::CircularSlice new()
Bio::EnsEMBL::Mapper::Gap::new
public Bio::EnsEMBL::Mapper::Gap new()
Bio::EnsEMBL::Slice::adaptor
public Bio::EnsEMBL::DBSQL::SliceAdaptor adaptor()
Bio::EnsEMBL::DBSQL::MergedAdaptor
Definition: MergedAdaptor.pm:36
Bio::EnsEMBL::CircularSlice::length
public Int length()
Bio::EnsEMBL::CircularSlice::_split
protected _split()
Bio::EnsEMBL::CircularSlice::moltype
public moltype()
Bio::EnsEMBL::CircularSlice::desc
public desc()
Bio::EnsEMBL::CircularSlice::get_all_VariationFeatures
public Listref get_all_VariationFeatures()
Bio::EnsEMBL::CircularSlice::accession_number
public accession_number()
Bio::EnsEMBL::Slice::seq_region_name
public String seq_region_name()
Bio::EnsEMBL::Slice::name
public String name()
Bio::EnsEMBL::Slice::seq_region_length
public Int seq_region_length()
Bio::EnsEMBL::Slice::start
public Int start()
Bio::EnsEMBL::Mapper::Gap::start
public Int start()
Bio::EnsEMBL::CircularSlice::subseq
public Txt subseq()
Bio::EnsEMBL::Slice::coord_system
public Bio::EnsEMBL::CoordSystem coord_system()
Bio::EnsEMBL::CircularSlice::display_id
public display_id()
Bio::EnsEMBL::Mapper::Gap
Definition: Gap.pm:14
Bio::EnsEMBL::CircularSlice::get_all_DASFeatures
public Hashref get_all_DASFeatures()
Bio::EnsEMBL::CircularSlice::is_circular
public is_circular()
Bio::EnsEMBL::DBSQL::MergedAdaptor::new
public Bio::EnsEMBL::DBSQL::MergedAdaptor new()
Bio::EnsEMBL::CircularSlice::project_to_slice
public List project_to_slice()
Bio::EnsEMBL::CircularSlice::get_all_genotyped_VariationFeatures
public Listref get_all_genotyped_VariationFeatures()
Bio::EnsEMBL::CircularSlice::centrepoint
public Int centrepoint()
Bio::EnsEMBL::CircularSlice::expand
public Bio::EnsEMBL::Slice expand()
Bio::EnsEMBL::Slice::strand
public Int strand()
Bio::EnsEMBL::Slice::end
public Int end()
Bio::EnsEMBL::CircularSlice::alphabet
public alphabet()
Bio::EnsEMBL::CircularSlice::primary_id
public primary_id()