ensembl-hive  2.8.1
Bio::EnsEMBL::Utils::CigarString Class Reference

Public Member Functions

public A split_hsp ()
 
protected _findStrands ()
 
protected _findTypes ()
 
protected _findIncrements ()
 
public A generate_cigar_string ()
 
protected _sub_cigar_string ()
 
public A generate_cigar_string_by_hsp ()
 

Detailed Description

Description

Sequence alignment hits were previously stored within the core database
as ungapped alignments. This imposed 2 major constraints on alignments:

a) alignments for a single hit record would require multiple rows in the
   database, and
b) it was not possible to accurately retrieve the exact original
   alignment.

Therefore, in the new branch sequence alignments are now stored as
ungapped alignments in the cigar line format (where CIGAR stands for
Concise Idiosyncratic Gapped Alignment Report).

In the cigar line format alignments are stored as follows:

  M: Match
  D: Deletion
  I: Insertion

An example of an alignment for a hypthetical protein match is shown
below:


  Query:   42 PGPAGLP----GSVGLQGPRGLRGPLP-GPLGPPL...
              PG    P    G     GP   R      PLGP
  Sbjct: 1672 PGTP*TPLVPLGPWVPLGPSSPR--LPSGPLGPTD...

This would be stored in the protein_align_feature table as the following
cigar line:

  7M4D12M2I2MD7M

Definition at line 38 of file CigarString.pm.

Member Function Documentation

◆ _findIncrements()

protected Bio::EnsEMBL::Utils::CigarString::_findIncrements ( )

Undocumented method

Code:
click to view

◆ _findStrands()

protected Bio::EnsEMBL::Utils::CigarString::_findStrands ( )

Undocumented method

Code:
click to view

◆ _findTypes()

protected Bio::EnsEMBL::Utils::CigarString::_findTypes ( )

Undocumented method

Code:
click to view

◆ _sub_cigar_string()

protected Bio::EnsEMBL::Utils::CigarString::_sub_cigar_string ( )

Undocumented method

Code:
click to view

◆ generate_cigar_string()

public A Bio::EnsEMBL::Utils::CigarString::generate_cigar_string ( )
  Name : generate_cigar_string
  Usage: $cigar_string = $self->generate_cigar_string(@qchars, @hchars);
  Function: generate the cigar string for a piece of alignment.
  Args:     2 array references. The lengths of 2 arrays are the same
  Return:   a cigar string
 
Code:
click to view

◆ generate_cigar_string_by_hsp()

public A Bio::EnsEMBL::Utils::CigarString::generate_cigar_string_by_hsp ( )
  
  Name :    generate_cigar_string_by_hsp
  Usage :   my $hsp; # a ready GenericHSP object
my $cigar_string = $self->generate_cigar_string_by_hsp($hsp);
  Function: generate a cigar string by given HSP object.
  Args :    a GenericHSP object
  Returns:  a text string of cigar string
 


Code:
click to view

◆ split_hsp()

public A Bio::EnsEMBL::Utils::CigarString::split_hsp ( )
    Name  : split_hsp (this name is derived from the original sub in BlastWorn)
    Usage : my $hsp; # a ready Bio::Search::HSP::GenericHSP object.
my $factory = new Bio::EnsEMBL::Utils::CigarString;
my $cigar_string = $factory->split_hsp($hsp);
    Function: generate cigar string.
    Argument: a HSP object.
    Returns : a text string.
 
Code:
click to view

The documentation for this class was generated from the following file:
Bio::EnsEMBL::Utils::CigarString::split_hsp
public A split_hsp()
Bio::EnsEMBL::Utils::CigarString::_findStrands
protected _findStrands()
Bio::EnsEMBL::Utils::CigarString::_findIncrements
protected _findIncrements()
Bio::EnsEMBL::Utils::CigarString::generate_cigar_string
public A generate_cigar_string()
Bio::EnsEMBL::Utils::CigarString::_findTypes
protected _findTypes()
Bio::EnsEMBL::Utils::CigarString::_sub_cigar_string
protected _sub_cigar_string()
Bio::EnsEMBL::Utils::CigarString::generate_cigar_string_by_hsp
public A generate_cigar_string_by_hsp()