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

Public Member Functions

public Bio::EnsEMBL::SeqEdit new ()
 
public Int start ()
 
public Int end ()
 
public String alt_seq ()
 
public Int length_diff ()
 
public String name ()
 
public String code ()
 
public String description ()
 
public Bio::EnsEMBL::Attribute get_Attribute ()
 
public Reference apply_edit ()
 

Detailed Description

Synopsis

# construct a SeqEdit object using a Transcript attribute
($attribute) = @{ $translation->get_all_Attributes('_rna_edit') };
$seq_edit = Bio::EnsEMBL::SeqEdit( -ATTRIB => $attribute );
print $seq_edit->start(), "\n";
print $seq_edit->end(), "\n";
print $seq_edit->alt_seq(), "\n";
# apply the edit to some sequence
$seq = $transcript->spliced_seq();
print "Before modifiction: $seq\n";
$seq_edit->apply_edit( \$seq );
print "After modification: $seq\n";
# construct an attribute object from a SeqEdit and add it to a
# translation
-CODE => '_selenocysteine',
-NAME => 'Selenocysteine',
-DESC => 'Selenocysteine',
-START => 10,
-END => 10,
-ALT_SEQ => 'U'
);
$attribute = $seq_edit->get_Attribute();
$translation->add_Attributes($attribute);

Description

This is a class used to represent post transcriptional
modifications to sequences.  SeqEdit objects are stored as ordinary
Bio::EnsEMBL::Attributes with a parseable value and can be used to
represent RNA editing, selenocysteines etc.

Also see Bio::EnsEMBL::Attribute

Definition at line 55 of file SeqEdit.pm.

Member Function Documentation

◆ alt_seq()

public String Bio::EnsEMBL::SeqEdit::alt_seq ( )
  Arg [1]    : (optional) string $alt_seq
  Example    :
my $alt_seq = $se_attrib->alt_seq();
  Description: Getter/Setter for the replacement sequence used by this edit.
               The sequence may either be a string of amino acids or
               nucleotides depending on the context in which this edit is
               used.
               In the case of a deletion the replacement sequence is an empty
               string.
  Returntype : string
  Exceptions : none
  Caller     : Transcript, Translation
  Status     : Stable
 
Code:
click to view

◆ apply_edit()

public Reference Bio::EnsEMBL::SeqEdit::apply_edit ( )
  Arg [1]    : reference to string $seqref
  Example    :
$sequence = 'ACTGAATATTTAAGGCA';
$seqedit->apply_edit(\$sequence);
print $sequence, "\n";
  Description: Applies this edit directly to a sequence which is
               passed by reference.  The coordinates of this SeqEdit
               are assumed to be relative to the start of the sequence
               argument.
               If either the start or end of this SeqEdit are not defined
               this function will not do anything to the passed sequence.
  Returntype : reference to the same sequence that was passed in
  Exceptions : none
  Caller     : Transcript, Translation
  Status     : Stable
 
Code:
click to view

◆ code()

public String Bio::EnsEMBL::SeqEdit::code ( )
  Arg [1]    : (optional) string $code
  Example    :
my $code = $seqedit->code();
  Description: Getter/Setter for the code of this SeqEdit
  Returntype : string
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ description()

public String Bio::EnsEMBL::SeqEdit::description ( )
  Arg [1]    : (optional) string $desc
  Example    :
my $desc = $seqedit->description();
  Description: Getter/Setter for the description of this SeqEdit
  Returntype : string
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ end()

public Int Bio::EnsEMBL::SeqEdit::end ( )
  Arg [1]    : (optional) int $end - the new end position
  Example    :
$end = $se_attrib->end();
  Description: Getter/Setter for the end position of the region replaced
               by the alt_seq.
               Coordinates are inclusive and one-based, which means that
               inserts are unusually represented by a start 1bp higher than
               the end.
               E.g. start = 1, end = 1 is a replacement of the first base but
               start = 1, end = 0 is an insert BEFORE the first base.
  Returntype : int
  Exceptions : throws if end  <= 0
  Caller     : Transcript, Translation
  Status     : Stable
 
Code:
click to view

◆ get_Attribute()

public Bio::EnsEMBL::Attribute Bio::EnsEMBL::SeqEdit::get_Attribute ( )
  Arg [1]    : none
  Example    :
my $attrib = $seqedit->get_Attribute();
$transcript->add_Attributes($attrib);
  Description: Converts a SeqEdit object into an Attribute object.  This
               allows the SeqEdit to be stored as any other attribute in the
               ensembl database.  The start/end and alt_seq properties
               should be set before calling this method.
  Returntype : Bio::EnsEMBL::Attribute
  Exceptions : warning if start/end or alt_seq properties are not defined
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ length_diff()

public Int Bio::EnsEMBL::SeqEdit::length_diff ( )
  Arg [1]    : none
  Example    :
my $diff = $sea->length_diff();
  Description: Returns the difference in length caused by applying this
               edit to a sequence.  This may be be negative (deletion),
               positive (insertion) or 0 (replacement).
               If either start or end are not defined 0 is returned.
  Returntype : int
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ name()

public String Bio::EnsEMBL::SeqEdit::name ( )
  Arg [1]    : (optional) string $name
  Example    :
my $name = $seqedit->name();
  Description: Getter/Setter for the name of this SeqEdit
  Returntype : string
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ new()

public Bio::EnsEMBL::SeqEdit Bio::EnsEMBL::SeqEdit::new ( )
  Arg [-ATTRIB] : Bio::EnsEMBL::Attribute
                  Constructs a new SeqEdit from an Attribute.
                  Can only be provided if no other constructor arguments
                  are provided.
  Arg [-START]       : The start position of the edit.
  Arg [-END]         : The end position of the edit.
  Arg [-ALT_SEQ]     : The alternate sequence
  Arg [-CODE]        : A code for this SeqEdit
  Arg [-NAME]        : A name for this SeqEdit
  Arg [-DESCRIPTION] : Arg passed to superclass constructor
  Example    :
my $sea = Bio::EnsEMBL::SeqEdit->new(-ATTRIB => $attrib);
(-START => 10,
-END => 12,
-ALT_SEQ => 'ACG',
-CODE => '_rna_edit',
-NAME => 'RNA Edit',
-DESCRIPTION => 'RNA edit');
  Description: Constructs a SeqEdit representing a single edit to a
               sequence, such as an rna modification or a selenocysteine.
  Returntype : Bio::EnsEMBL::SeqEdit
  Exceptions : throws if attribute set and other args aswell
               throws if start and end not set correctly of attribure not set
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ start()

public Int Bio::EnsEMBL::SeqEdit::start ( )
  Arg [1]    : (optional) int $start - the new start position
  Example    :
$start = $se_attrib->start();
  Description: Getter/Setter for the start position of the region replaced
               by the alt_seq.
               Coordinates are inclusive and one-based, which means that
               inserts are unusually represented by a start 1bp higher than
               the end.
               E.g. start = 1, end = 1 is a replacement of the first base but 
               start = 1, end = 0 is an insert BEFORE the first base.
  Returntype : int
  Exceptions : none
  Caller     : Transcript, Translation
  Status     : Stable
 
Code:
click to view

The documentation for this class was generated from the following file:
Bio::EnsEMBL::SeqEdit::start
public Int start()
Bio::EnsEMBL::SeqEdit::get_Attribute
public Bio::EnsEMBL::Attribute get_Attribute()
Bio::EnsEMBL::SeqEdit::new
public Bio::EnsEMBL::SeqEdit new()
Bio::EnsEMBL::SeqEdit::name
public String name()
Bio::EnsEMBL::Attribute::new
public Bio::EnsEMBL::Attribute new()
Bio::EnsEMBL::SeqEdit
Definition: SeqEdit.pm:55
Bio::EnsEMBL::SeqEdit::length_diff
public Int length_diff()
Bio::EnsEMBL::SeqEdit::end
public Int end()
Bio::EnsEMBL::SeqEdit::alt_seq
public String alt_seq()
Bio::EnsEMBL::SeqEdit::apply_edit
public Reference apply_edit()
Bio::EnsEMBL::Attribute
Definition: Attribute.pm:34
Bio::EnsEMBL::SeqEdit::description
public String description()
Bio::EnsEMBL::SeqEdit::code
public String code()