LICENSE

Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute Copyright [2016-2024] EMBL-European Bioinformatics Institute

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

CONTACT

Please email comments or questions to the public Ensembl
developers list at <http://lists.ensembl.org/mailman/listinfo/dev>.

Questions may also be sent to the Ensembl help desk at
<http://www.ensembl.org/Help/Contact>.

NAME

Bio::EnsEMBL::RepeatMaskedSlice - Arbitary Slice of a genome

SYNOPSIS

$sa = $db->get_SliceAdaptor();

$slice =
  $sa->fetch_by_region( 'chromosome', 'X', 1_000_000, 2_000_000 );

$repeat_masked_slice = $slice->get_repeatmasked_seq();

# get repeat masked sequence:
my $dna = $repeat_masked_slice->seq();
$dna = $repeat_masked_slice->subseq( 1, 1000 );

DESCRIPTION

This is a specialised Bio::EnsEMBL::Slice class that is used to retrieve repeat masked genomic sequence rather than normal genomic sequence.

METHODS

new

Arg [-REPEAT_MASK] : The logic name of the repeats to be used for masking.
                    If not provided, all repeats in the database are used.
Arg [...]  : Named superclass arguments. See B<Bio::EnsEMBL::Slice>.
Example    : my $slice = Bio::EnsEMBL::RepeatMaskedSlice->new
                (-START  => $start,
                 -END    => $end,
                 -STRAND => $strand,
                 -SEQ_REGION_NAME => $seq_region,
                 -SEQ_REGION_LENGTH => $seq_region_length,
                 -COORD_SYSTEM  => $cs,
                 -ADAPTOR => $adaptor,
                 -REPEAT_MASK => ['repeat_masker'],
                 -SOFT_MASK => 1,
                 -NOT_DEFAULT_MASKING_CASES => {"repeat_class_SINE/MIR" => 1,
                                                "repeat_name_AluSp" => 0});
Description: Creates a Slice which behaves exactly as a normal slice but
             that returns repeat masked sequence from the seq method.
Returntype : Bio::EnsEMBL::RepeatMaskedSlice
Exceptions : none
Caller     : RawComputes (PredictionTranscript creation code).
Status     : Stable

repeat_mask_logic_names

Arg [1]    : reference to list of strings $logic_names (optional)
Example    : $rm_slice->repeat_mask_logic_name(['repeat_masker']);
Description: Getter/Setter for the logic_names of the repeats that are used
             to mask this slices sequence.
Returntype : reference to list of strings
Exceptions : none
Caller     : seq() method
Status     : Stable

soft_mask

Arg [1]    : boolean $soft_mask (optional)
Example    : $rm_slice->soft_mask(0);
Description: Getter/Setter which is used to turn on/off softmasking of the
             sequence returned by seq.
Returntype : boolean
Exceptions : none
Caller     : seq() method
Status     : Stable

not_default_masking_cases

Arg [1]    : hash reference $not_default_masking_cases (optional, default is {})
             The values are 0 or 1 for hard and soft masking respectively
             The keys of the hash should be of 2 forms
             "repeat_class_" . $repeat_consensus->repeat_class,
              e.g. "repeat_class_SINE/MIR"
             "repeat_name_" . $repeat_consensus->name
              e.g. "repeat_name_MIR"
             depending on which base you want to apply the not default masking either 
             the repeat_class or repeat_name. Both can be specified in the same hash
             at the same time, but in that case, repeat_name setting has priority over 
             repeat_class. For example, you may have hard masking as default, and 
             you may want soft masking of all repeat_class SINE/MIR,
             but repeat_name AluSp (which are also from repeat_class SINE/MIR)
Example    : $rm_slice->not_default_masking_cases({"repeat_class_SINE/MIR" => 1,
                                                   "repeat_name_AluSp" => 0});
Description: Getter/Setter which is used to escape some repeat class or name from the default 
             masking in place. 
Returntype : hash reference
Exceptions : none
Caller     : seq() and subseq() methods
Status     : Stable

seq

Arg [1]    : none
Example    : print $rmslice->seq(), "\n";
Description: Retrieves the entire repeat masked sequence for this slice.
             See also the B<Bio::EnsEMBL::Slice> implementation of this 
             method.
Returntype : string
Exceptions : none
Caller     : general
Status     : Stable

subseq

Arg [1]    : none
Example    : print $rmslice->subseq(1, 1000);
Description: Retrieves a repeat masked sequence from a specified subregion
             of this slice.  See also the B<Bio::EnsEMBL::Slice> 
             implementation of this method.
Returntype : string
Exceptions : none
Caller     : general
Status     : Stable

_get_repeat_features

Args [1]   	: Bio::EnsEMBL::Slice to fetch features for 
Description	: Gets repeat features for the given slice
Returntype 	: ArrayRef[Bio::EnsEMBL::RepeatFeature] array of repeats