Bio::EnsEMBL::Compara::AlignSlice::Slice Class Reference

Class Summary
Method Documentation
protected Listref Bio::EnsEMBL::Compara::AlignSlice::Slice::_compile_mapped_Genes | ( | ) |
Arg[1] : listref of Bio::EnsEMBL::Gene $mapped_genes Arg[2] : int $max_repetition_length Arg[3] : int $max_gap_length Arg[4] : int $max_intron_length Arg[5] : int $strict_order_of_exon_pieces Arg[6] : int $strict_order_of_exons Example : my $compiled_genes = $align_slice->compile_mapped_Genes($mapped_genes, 100, 1000, 100000, 1, 0); Description: This method compiles all the pieces of gene mapped before into a list of Bio::EnsEMBL::Gene objects. It tries to merge pieces of the same exon, link them according to their original transcript and finally group the transcripts in Bio::EnsEMBL::Gene objects. Merging and linking of Exons is done according to some rules that can be changed with the parameters. Parameters: They are sent as is to _separate_in_incompatible_sets_of_Exons() and _merge_Exons() methods. Please refer to them elsewhere in this document. Returntype : listref of Bio::EnsEMBL::Gene objects. (overrides $mapped_genes) Exceptions : none Caller : $object->methodname

click to view
protected Bio::EnsEMBL::Gene Bio::EnsEMBL::Compara::AlignSlice::Slice::_get_mapped_Gene | ( | ) |
Arg[1] : Bio::EnsEMBL::Gene $original_gene Arg[2] : Bio::EnsEMBL::Compara::GenomicAlign $genomic_align Example : my $mapped_gene = $align_slice->get_mapped_Gene($orignal_gene, $genomic_align); Description: returns a new Bio::EnsEMBL::Gene object. Mapping is based on exons. The object returned contains Bio::EnsEMBL::Transcripts objects. Those mapped transcripts contain Bio::EnsEMBL::Compara::AlignSlice::Exon objects. If no exon can be mapped, the returned object will contain an empty array of transcripts. Since mapped objects are not stored in the DB, they have no dbID and no adaptor. Returntype : Bio::EnsEMBL::Gene object. (new object) Exceptions : returns undef if no part of $original_gene can be mapped using this $genomic_align. This method assumes that the slices of all the exons got from that gene have the same coordinates as the gene slice. It will throw if this is not true. Caller : get_all_Genes

click to view
protected Int Bio::EnsEMBL::Compara::AlignSlice::Slice::_map_position_using_cigar_line | ( | ) |
Arg[1] : string $cigar_line Arg[2] : int $original_position Arg[3] : int $original_length Arg[4] : bool $start Example : my $mapped_start_position = _map_position_using_cigar_line( "16M4I", 10, 20, 1); Example : my $mapped_end_position = _map_position_using_cigar_line( "16M4I", 10, 20, 1); Description: This method is used to locate the start or the end position of a Translation on the Bio::EnsEMBL::Compara::AlignSlice::Exon object using the cigar_line of the object. As the Bio::EnsEMBL::Compara:: AlignSlice::Exon object may result from the fusion of the same Bio::EnsEMBL::Exon object several times, this method returns the best mapping among all the available possibilities. When the original position maps on an insertion in the Bio::EnsEMBL::Compara:: AlignSlice::Exon object, the resulting mapped start position is the next one to the latest mapped one. Returntype : int $mapped_position Exceptions : returns 0 when the end position cannot be mapped. Exceptions : returns a number larger than the length of the Bio::EnsEMBL::Compara:: AlignSlice::Exon when the start position cannot be mapped.

click to view
protected Lisref Bio::EnsEMBL::Compara::AlignSlice::Slice::_merge_Exons | ( | ) |
Arg[1] : listref of Bio::EnsEMBL::Compara::AlignSlice::Exon $set_of_exons Arg[2] : int $max_repetition_length Arg[3] : int $max_gap_length Arg[4] : int $strict_order_of_exon_pieces Example : my $merged_exons = _merge_Exons($exons_to_be_merged, 100, 1000, 1); Description: Takes a list of Bio::EnsEMBL::Compara::AlignSlice::Exon objects and tries to merge them according to exon stable_id and some rules that can be tunned using some optional parameters. This method can overwrite some of the exon in the $set_of_exons. Parameters: MAX_REPETITION_LENGTH. In principle you want to merge together pieces of an exon which do not overlap (the beginning and the end of the exon). With this flag you can to set up what amount of the original exon is allowed on two aligned exons to be merged. MAX_GAP_LENGTH. If the distance between two pieces of exons in the aligned slice is larger than this parameter, they will not be merged. Setting this parameter to -1 will avoid any merging event. STRICT_ORDER_OF_EXON_PIECES. This flag allows you to decide whether two pieces of an exon should be merged or not if they are not in the right order, for instance if the end of the original exon will appear before the start on the merged exon. Returntype : lisref of Bio::EnsEMBL::Compara::AlignSlice::Exon objects. Exceptions : none Caller : methodname

click to view
protected Listref Bio::EnsEMBL::Compara::AlignSlice::Slice::_method_returning_simple_features | ( | ) |
Args[1] : method_name Description : This Slice is made of several Bio::EnsEMBL::Slices mapped on it. This method go through all of them, calls method_name and maps teh result on this Bio::EnsEMBL::Compara::AlignSlice::Slice object. ReturnType : listref of Bio::EnsEMBL::Variation::VariationFeature Exceptions : none Caller : contigview, snpview

click to view
protected Listref Bio::EnsEMBL::Compara::AlignSlice::Slice::_separate_in_incompatible_sets_of_Exons | ( | ) |
Arg[1] : listref of Bio::EnsEMBL::Compara::AlignSlice::Exon $set_of_exons Arg[2] : int $max_repetition_length Arg[3] : int $max_intron_length Arg[4] : int $strict_order_of_exons Example : my $sets_of_exons = _separate_in_incompatible_sets_of_Exons( $set_of_exons, 100, 100000, 0); Description: Takes a list of Bio::EnsEMBL::Compara::AlignSlice::Exon and separate them in sets of comaptible exons. Compatibility is defined taking into account 5 parameters:
- exons must be in the same strand
- exons cannot overlap on the align_slice
- distance between exons cannot be larger than MAX_INTRON_LENGTH
- two exons with the same stable_id can belong to the same transcript only if they represent diferent parts of the original exon. Some overlapping is allowed (see MAX_REPETITION_LENGTH parameter).
- exons must be in the same order as in the original transcript if the STRICT_ORDER_OF_EXONS parameter is true. Parameters: MAX_REPETITION_LENGTH. In principle you want to link together pieces of an exon which do not overlap (the beginning and the end of the exon). With this flag you can to set up what amount of the original exon is allowed on two aligned exons to be linked. MAX_INTRON_LENGTH. If the distance between two exons in the aligned slice is larger than this parameter, they will not be linked. STRICT_ORDER_OF_EXONS. This flag allows you to decide whether two exons should be linked or not if they are not in the original order. Returntype : listref of lisrefs of Bio::EnsEMBL::Compara::AlignSlice::Exon objects. Exceptions : none Caller : methodname

click to view
protected Bio::EnsEMBL::Compara::AlignSlice::Slice::_sort_Exons | ( | ) |
Undocumented method

click to view
public Bio::EnsEMBL::Compara::AlignSlice::Slice::add_Slice_Mapper_pair | ( | ) |
Arg[1] : Bio::EnsEMBL::Slice $slice Arg[2] : Bio::EnsEMBL::Mapper $mapper Arg[3] : integer $start Arg[4] : integer $end Arg[5] : integer $strand Example : $slice->add_Slice_Mapper_pair($slice, $mapper, 124, 542, -1); Description: Attaches a pair of Slice and the corresponding Mapper to this Bio::EnsEMBL::Compara::AlginSlice::Slice object. The Mapper contains the information for mapping coordinates from (to) the Slice to (from) the Bio::EnsEMBL::Compara::AlignSlice. Start, end and strand locates the $slice in the AlignSlice::Slice. $start and $end refer to the Coordinate System. If you are using a sub_Slice, this method will be using the coordinates of the original Bio::EnsEMBL::Compara::AlignSlice::Slice object! Returntype : Exceptions : throws if $slice is not a Bio::EnsEMBL::Slice object Exceptions : throws if $mapper is not a Bio::EnsEMBL::Mapper object

click to view
public String Bio::EnsEMBL::Compara::AlignSlice::Slice::display_Slice_name | ( | ) |
Arg[1] : string $name Example : $slice->display_Slice_name("Homo_sapiens"); Description: getter/setter for the attribute display_Slice_name Returntype : string Caller : $object->methodname

click to view
public Bio::EnsEMBL::Compara::AlignSlice::Slice::expand | ( | ) |
Expanding a Bio::EnsEMBL::Compara::AlignSlice::Slice object is not supported at the moment. You could create a new Bio::EnsEMBL::Slice and fetch a new Bio::EnsEMBL::Compara::AlignSlice from it. On the hand, if you only want to extend the sequence, you could use the subseq method with a negatve start value or an end value larger than the end of this Slice.
This method returns undef

click to view
Reimplemented from Bio::EnsEMBL::Slice.
public Bio::EnsEMBL::Compara::GenomeDB Bio::EnsEMBL::Compara::AlignSlice::Slice::genome_db | ( | ) |
Arg[1] : Bio::EnsEMBL::Compara::GenomeDB $genome_db Example : $slice->genome_db($human_gdb); Description: getter/setter for the attribute genome_db Returntype : Bio::EnsEMBL::Compara::GenomeDB object Exceptions : This attribute should never be unset. Several methods rely on this attribute. Caller : $object->methodname

click to view
public Listref Bio::EnsEMBL::Compara::AlignSlice::Slice::get_all_Attributes | ( | ) |
Arg [1] : optional string $attrib_code The code of the attribute type to retrieve values for. Example : ($htg_phase) = @{$slice->get_all_Attributes('htg_phase')}; @slice_attributes = @{$slice->get_all_Attributes()}; Description: Gets a list of Attributes of all teh underlying slice''s seq_region. Optionally just get Attributes for given code. This Slice is made of several Bio::EnsEMBL::Slices mapped on it. This method go through all of them, retrieves the data and return them in order. There will be one set of Attributes by underlying slice. Returntype : listref Bio::EnsEMBL::Attribute Exceptions : warning if slice does not have attached adaptor Caller : general

click to view
Reimplemented from Bio::EnsEMBL::Slice.
public Ref Bio::EnsEMBL::Compara::AlignSlice::Slice::get_all_constrained_elements | ( | ) |
Arg 1 : (opt) string $method_link_type (default = GERP_CONSTRAINED_ELEMENT) Arg 2 : (opt) listref Bio::EnsEMBL::Compara::GenomeDB $species_set (default, the set of species from the MethodLinkSpeciesSet used to build this AlignSlice) Example : my $constrained_elements = $align_slice->get_all_constrained_elements(); Description: Retrieve the corresponding constrained elements for these alignments. Objects will be mapped on this AlignSlice::Slice, i.e. the reference_slice, reference_slice_start, reference_slice_end and reference_slice_strand will refer to this AlignSlice::Slice object Returntype : ref. to an array of Bio::EnsEMBL::Compara::GenomicAlignBlock objects. Caller : object::methodname Status : At risk

click to view
public Listref Bio::EnsEMBL::Compara::AlignSlice::Slice::get_all_Genes | ( | ) |
Arg [1] : (optional) string $logic_name The name of the analysis used to generate the genes to retrieve Arg [2] : (optional) string $dbtype The dbtype of genes to obtain. Arg [3] : (optional) boolean $load_transcripts This option is always disabled for AlingSlices. It only exists for compatibility with the Bio::EnsEMBL::Slice objects. Example : @genes = @{$slice->get_all_Genes}; Description: Retrieves all genes that overlap this slice. Returntype : listref of Bio::EnsEMBL::Genes Exceptions : none Caller : none

click to view
Reimplemented from Bio::EnsEMBL::Slice.
public Listref Bio::EnsEMBL::Compara::AlignSlice::Slice::get_all_Genes_by_type | ( | ) |
Arg [1] : string $type The biotype of genes wanted. Arg [2] : (optional) string $logic_name Arg [3] : (optional) boolean $load_transcripts If set to true, transcripts will be loaded immediately rather than being lazy-loaded on request. This will result in a significant speed up if the Transcripts and Exons are going to be used (but a slow down if they are not). Example : @genes = @{$slice->get_all_Genes_by_type('protein_coding', 'ensembl')}; Description: Retrieves genes that overlap this slice of biotype $type. This is primarily used by the genebuilding code when several biotypes of genes are used.
The logic name is the analysis of the genes that are retrieved. If not provided all genes will be retrieved instead.
This methods overwrites the core one since it sends a warning message and return an empty array because this AlignSlice::Slice object has no adaptor. This implementation calls the get_all_Genes methdo elsewhere in this module to fulfil the query.
Returntype : listref of Bio::EnsEMBL::Genes Exceptions : none Caller : genebuilder, general Status : Stable

click to view
Reimplemented from Bio::EnsEMBL::Slice.
public Listref Bio::EnsEMBL::Compara::AlignSlice::Slice::get_all_genotyped_VariationFeatures | ( | ) |
Args : none Function : 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. This Slice is made of several Bio::EnsEMBL::Slices mapped on it. This method go through all of them, retrieves the data and maps them on this Bio::EnsEMBL::Compara::AlignSlice::Slice object by changing start, end, strand and slice attributes. ReturnType : listref of Bio::EnsEMBL::Variation::VariationFeature Exceptions : none Caller : contigview, snpview

click to view
Reimplemented from Bio::EnsEMBL::Slice.
public Listref Bio::EnsEMBL::Compara::AlignSlice::Slice::get_all_RepeatFeatures | ( | ) |
Arg [1] : (optional) string $logic_name The name of the analysis performed on the repeat features to obtain. Arg [2] : (optional) string $repeat_type Limits features returned to those of the specified repeat_type Example : @repeat_feats = @{$slice->get_all_RepeatFeatures(undef,'LTR')}; Description: Retrieves the RepeatFeatures which overlap with logic name $logic_name and with score above $score. If $logic_name is not defined features of all logic names are retrieved. This Slice is made of several Bio::EnsEMBL::Slices mapped on it. This method go through all of them, retrieves the data and maps them on this Bio::EnsEMBL::Compara::AlignSlice::Slice object by changing start, end, strand and slice attributes. Returntype : listref of Bio::EnsEMBL::RepeatFeatures Exceptions : warning if slice does not have attached adaptor Caller : general

click to view
Reimplemented from Bio::EnsEMBL::Slice.
public List Bio::EnsEMBL::Compara::AlignSlice::Slice::get_all_Slice_Mapper_pairs | ( | ) |
Arg[1] : [optional] bool $get_gap_slices Example : $slice_mapper_pairs = $slice->get_all_Slice_Mapper_pairs(); Description: Returns all pairs of Slices and Mappers attached to this Bio::EnsEMBL::Compara::AlignSlice::Slice The $get_gap_slice flag is normally used internally to get the the gap slices. These are created when the alignment(s) underlying the AlignSlice correspond to gaps only in one or more species. These are used to tell the difference between gap due to lack of alignments and gaps due to the alignments. If you set this this flag to true you will get these gap slices back but it is your responsability to deal with these gap slices properly. Returntype : list ref of hashes which keys are "slice", "mapper", "start", "end" and "strand". Each hash corresponds to a pair of Slice and Mapper and the coordintes needed to locate the Slice in the AlignSlice::Slice. start and end refer to the Coordinate System. If you are using a sub_Slice, this method will be using the coordinates of the original Bio::EnsEMBL::Compara::AlignSlice::Slice object! Exceptions : return a ref to an empty list if no pairs have been attached so far.

click to view
public Listref Bio::EnsEMBL::Compara::AlignSlice::Slice::get_all_underlying_Slices | ( | ) |
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: This Slice is made of several Bio::EnsEMBL::Slices mapped on it with gaps inside and regions with no matching sequence. This method returns these Slices (or part of them) with the original coordinates and the gapped sequence attached to them. Additionally, extra Slices could be returned in order to fill in gaps between underlying Slices. Returntype : listref of Bio::EnsEMBL::Slice objects Exceptions : end should be at least as big as start Caller : general

click to view
public Listref Bio::EnsEMBL::Compara::AlignSlice::Slice::get_all_VariationFeatures | ( | ) |
Args : none 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. This Slice is made of several Bio::EnsEMBL::Slices mapped on it. This method go through all of them, retrieves the data and maps them on this Bio::EnsEMBL::Compara::AlignSlice::Slice object. ReturnType : listref of Bio::EnsEMBL::Variation::VariationFeature Exceptions : none Caller : contigview, snpview

click to view
Reimplemented from Bio::EnsEMBL::Slice.
public Txt Bio::EnsEMBL::Compara::AlignSlice::Slice::get_cigar_line | ( | ) |
Arg : -none- Description: returns a cigar_line describing the gaps in the mapped sequence This Slice is made of several Bio::EnsEMBL::Slices mapped on it with gaps inside and regions with no matching sequence. The resulting cigar line corresponds to the mapping of all the nucleotides that can be mapepd. If several Slices map on the same positions, the behaviour is undefined. The cigar_line includes 3 types of regions: M for matches/mismatches, D for alignment gaps (formerly known as deletions) and G for gaps between alignment blocks. Returntype : txt Exceptions : Caller : general

click to view
public Bio::EnsEMBL::Compara::AlignSlice::Slice::get_original_seq_region_position | ( | ) |
Arg [1] : int $position relative to start of slice, which is 1. Description: This Slice is made of several Bio::EnsEMBL::Slices mapped on it with gaps inside and regions with no matching sequence. This method returns the original seq_region_position in the original Slice of the requested position in AlignSlice coordinates Example : my ($slice, $seq_region_position) = $as_slice-> get_original_seq_region_position(100); Returntype : ($slice, $seq_region_position), an array where the first element is a Bio::EnsEMBL::Slice and the second one is the requested seq_region_position. Exceptions : if the position corresponds to a gap, the slice will be a fake GAP slice and the position will be the requested one (in AlignSlice coordinates) Caller : general

click to view
public Bio::EnsEMBL::Compara::AlignSlice::Slice::invert | ( | ) |
Maybe at some point...
This method returns undef

click to view
Reimplemented from Bio::EnsEMBL::Slice.
public Listref Bio::EnsEMBL::Compara::AlignSlice::Slice::map_original_Slice | ( | ) |
Arg [1] : Bio::EnsEMBL::Slice $original_slice Description: This Slice is made of several Bio::EnsEMBL::Slices mapped on it with gaps inside and regions with no matching sequence. This method tries to map on this Slice the region(s) corresponding to the provided $original_slice NB: This method does not know how to project Slices onto other coordinate systems. It is your responsability to provide an original Slice on the same coordinate system as the underlying Bio::EnsEMBL::Slices Example : my $slices = $as_slice->map_original_Slice($orginal_slice); Returntype : listref of Bio::EnsEMBL::Compara::AlignSlice::Slice objects which are the sub_Slices of this Bio::EnsEMBL::Compara:: AlignSlice::Slice where the $original_slice maps Exceptions :

click to view
public Bio::EnsEMBL::Compara::AlignSlice::Slice::new | ( | ) |
Arg[1] : Example : Description: Returntype : Exceptions : Caller : Bio::EnsEMBL::Compara::AlignSlice->_create_underlying_Slices()

click to view
Reimplemented from Bio::EnsEMBL::Slice.
public List Bio::EnsEMBL::Compara::AlignSlice::Slice::project | ( | ) |
Arg [1] : string $name The name of the coordinate system to project this slice onto Arg [2] : string $version The version of the coordinate system (such as 'NCBI34') to project this slice onto Example : my $clone_projection = $slice->project('clone');
foreach my $seg (@$clone_projection) { my $clone = $segment->to_Slice(); print $slice->seq_region_name(), ':', $seg->from_start(), '-', $seg->from_end(), ' -> ', $clone->seq_region_name(), ':', $clone->start(), '-',$clone->end(), $clone->strand(), "\\n"; } Description: This Slice is made of several Bio::EnsEMBL::Slices mapped on it. This method go through all of them, porject them and maps the projections on this Bio::EnsEMBL::Compara::AlignSlice::Slice object. The original 'project' method returns the results of 'projecting' a slice onto another coordinate system. Projecting to a coordinate system that the slice is assembled from is analagous to retrieving a tiling path. The original method may also be used to 'project up' to a higher level coordinate system, however.
This method returns a listref of triplets [start,end,slice] which represents the projection. The start and end defined the region of this slice which is made up of the third value of the triplet: a slice in the requested coordinate system.
Because of the gaps in the mapping of the Bio::EnsEMBL::Slices the lenght of the slice returned in the tripet may be different than the distance defined by the start and end of the Bio::EnsEMBL::ProjectionSegment object. Returntype : list reference of Bio::EnsEMBL::ProjectionSegment objects which can also be used as [$start,$end,$slice] triplets Exceptions : none Caller : general

click to view
Reimplemented from Bio::EnsEMBL::Slice.
public String Bio::EnsEMBL::Compara::AlignSlice::Slice::seq | ( | ) |
Arg [1] : none Example : print "SEQUENCE = ", $slice->seq(); Description: Returns the sequence of the region represented by this slice formatted as a string. This Slice is made of several Bio::EnsEMBL::Slices mapped on it with gaps inside and regions with no matching sequence. The resulting string might contain gaps and/or dots as padding characters. If several Slices map on the same positions, the last one will override the positions. Returntype : string Exceptions : none Caller : general

click to view
Reimplemented from Bio::EnsEMBL::Slice.
public Bio::EnsEMBL::Slice Bio::EnsEMBL::Compara::AlignSlice::Slice::sub_Slice | ( | ) |
Arg 1 : int $start Arg 2 : int $end Arge [3] : int $strand Example : none Description: Makes another Slice that covers only part of this slice If a slice is requested which lies outside of the boundaries of this function will return undef. This means that behaviour will be consistant whether or not the slice is attached to the database (i.e. if there is attached sequence to the slice). Alternatively the expand() method or the SliceAdaptor::fetch_by_region method can be used instead. Returntype : Bio::EnsEMBL::Slice or undef if arguments are wrong Exceptions : return undef if $start and $end define a region outside of actual Slice. Caller : general Status : Testing

click to view
Reimplemented from Bio::EnsEMBL::Slice.
public Txt Bio::EnsEMBL::Compara::AlignSlice::Slice::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 This Slice is made of several Bio::EnsEMBL::Slices mapped on it with gaps inside and regions with no matching sequence. The resulting string might contain gaps and/or dots as padding characters. If several Slices map on the same positions, the last one will override the positions. Returntype : txt Exceptions : end should be at least as big as start strand must be set Caller : general

click to view
Reimplemented from Bio::EnsEMBL::Slice.
The documentation for this class was generated from the following file:
- Bio/EnsEMBL/Compara/AlignSlice/Slice.pm