Documentation

PairwiseAlignmentResult

FinalYes

alignedFirst and alignedSecond are the two input sequences with '-' gap symbols inserted so they share the same length, column by column. first/secondStart and first/secondEnd are zero-based, inclusive positions in the ORIGINAL, ungapped sequences that the aligned region covers : for a global alignment (Needleman-Wunsch) this always spans the whole of both sequences, but the same shape is reused by local alignment (Smith-Waterman), where it identifies the aligned subsequence.

An empty original sequence (aligned as all gaps) is represented as start=0, end=-1, the usual empty-range convention ; it is never used for the aligned strings themselves, which are never empty. Class PairwiseAlignmentResult

Tags
author

Amélie DUVERNET aka Amelaye amelieonline@gmail.com

Table of Contents

Properties

$alignedFirst  : string
$alignedSecond  : string
$firstEnd  : int
$firstStart  : int
$score  : int
$secondEnd  : int
$secondStart  : int

Methods

__construct()  : mixed
PairwiseAlignmentResult constructor.
getAlignedFirst()  : string
getAlignedSecond()  : string
getFirstEnd()  : int
getFirstStart()  : int
getIdentity()  : float
The fraction of columns, among those where neither side is a gap, where both symbols are identical. Gap columns are excluded from both the numerator and the denominator : the "percent identity over aligned positions" convention. It ignores how gapped the alignment is ("ACGT----" against "ACGTTTTT" gives 1) ; BLAST and EMBOSS divide by the whole alignment length instead, see getIdentityOverLength().
getIdentityOverLength()  : float
The fraction of all the alignment's columns, gap columns included, where both symbols are identical : the "Identity" BLAST and EMBOSS (needle, water) report. "ACGT----" against "ACGTTTTT" gives 4 / 8.
getLength()  : int
getScore()  : int
getSecondEnd()  : int
getSecondStart()  : int

Properties

Methods

__construct()

PairwiseAlignmentResult constructor.

public __construct(string $sAlignedFirst, string $sAlignedSecond, int $iScore, int $iFirstStart, int $iFirstEnd, int $iSecondStart, int $iSecondEnd) : mixed
Parameters
$sAlignedFirst : string

First sequence, with '-' gaps inserted

$sAlignedSecond : string

Second sequence, with '-' gaps inserted, same length as $sAlignedFirst

$iScore : int
$iFirstStart : int

Zero-based, inclusive, in the original first sequence

$iFirstEnd : int

Zero-based, inclusive, in the original first sequence

$iSecondStart : int

Zero-based, inclusive, in the original second sequence

$iSecondEnd : int

Zero-based, inclusive, in the original second sequence

getIdentity()

The fraction of columns, among those where neither side is a gap, where both symbols are identical. Gap columns are excluded from both the numerator and the denominator : the "percent identity over aligned positions" convention. It ignores how gapped the alignment is ("ACGT----" against "ACGTTTTT" gives 1) ; BLAST and EMBOSS divide by the whole alignment length instead, see getIdentityOverLength().

public getIdentity() : float
Return values
float —

Between 0 and 1 ; 0 when every column involves a gap

getIdentityOverLength()

The fraction of all the alignment's columns, gap columns included, where both symbols are identical : the "Identity" BLAST and EMBOSS (needle, water) report. "ACGT----" against "ACGTTTTT" gives 4 / 8.

public getIdentityOverLength() : float
Return values
float —

Between 0 and 1

getLength()

public getLength() : int
Return values
int —

Column count of the alignment, gaps included

On this page

Search results