Documentation

PlasmidFeature

FinalYes

Coordinates are 1-based inclusive, the convention used by GenBank and EMBL feature tables. Start and end are only validated to be at least 1 here : since a lone feature does not know the length of the plasmid it will belong to, the upper bound is checked by Plasmid when the feature is attached. A start strictly greater than end is valid and means the feature crosses the origin.

The optional phase is GFF3's column 8 (0, 1 or 2 : how many bases to skip from the feature's 5' end, in its own orientation, to reach the first complete codon), equivalent to GenBank's /codon_start minus 1. It is only meaningful on a CDS, the only type that accepts one. Class PlasmidFeature

Tags
author

Amélie DUVERNET aka Amelaye amelieonline@gmail.com

Table of Contents

Properties

$color  : string|null
$end  : int
$externalId  : string|null
$metadata  : array<string|int, mixed>
$name  : string
$note  : string|null
$phase  : int|null
$start  : int
$strand  : string
$type  : string

Methods

__construct()  : mixed
PlasmidFeature constructor.
crossesOrigin()  : bool
getColor()  : string|null
getEnd()  : int
getExternalId()  : string|null
getLength()  : int
Number of symbols covered by the feature. Requires the length of the plasmid the feature belongs to, since an origin-crossing feature wraps past the last symbol back to the first.
getMetadata()  : array<string|int, mixed>
getName()  : string
getNote()  : string|null
getPhase()  : int|null
getStart()  : int
getStrand()  : string
getType()  : string
assertSerializableMetadata()  : void
Rejects metadata holding anything but scalars, null, or arrays of the same, recursively.

Properties

$color

private string|null $color = null

Strict "#RRGGBB" hexadecimal notation

$metadata

private array<string|int, mixed> $metadata

Only scalars, null and arrays of the same, recursively

Methods

__construct()

PlasmidFeature constructor.

public __construct(string $sName, string $sType, int $iStart, int $iEnd[, string $sStrand = Strand::NONE ][, string|null $sColor = null ][, string|null $sNote = null ][, string|null $sExternalId = null ][, array<string|int, mixed>|null $aMetadata = null ][, int|null $iPhase = null ]) : mixed
Parameters
$sName : string

Must not be empty

$sType : string

One of FeatureType::VALID_TYPES

$iStart : int

1-based inclusive, at least 1

$iEnd : int

1-based inclusive, at least 1

$sStrand : string = Strand::NONE

One of Strand::VALID_STRANDS, defaults to Strand::NONE

$sColor : string|null = null

Strict "#RRGGBB" notation, or null

$sNote : string|null = null
$sExternalId : string|null = null
$aMetadata : array<string|int, mixed>|null = null

Only scalars, null and arrays thereof ; a source format's original type or attributes that don't map onto a dedicated property (e.g. a GenBank feature key) belong here rather than being folded into $sNote

$iPhase : int|null = null

0, 1 or 2, only on a CDS ; null when unknown

crossesOrigin()

public crossesOrigin() : bool
Return values
bool —

True when start is strictly after end, meaning the feature crosses the origin of the circular molecule it belongs to.

getColor()

public getColor() : string|null
Return values
string|null

getEnd()

public getEnd() : int
Return values
int —

1-based inclusive

getExternalId()

public getExternalId() : string|null
Return values
string|null

getLength()

Number of symbols covered by the feature. Requires the length of the plasmid the feature belongs to, since an origin-crossing feature wraps past the last symbol back to the first.

public getLength(int $iPlasmidLength) : int
Parameters
$iPlasmidLength : int

Length of the plasmid sequence this feature is on

Return values
int

getMetadata()

public getMetadata() : array<string|int, mixed>
Return values
array<string|int, mixed>

getNote()

public getNote() : string|null
Return values
string|null

getPhase()

public getPhase() : int|null
Return values
int|null —

0, 1 or 2 ; null when unknown or not a CDS

getStart()

public getStart() : int
Return values
int —

1-based inclusive

assertSerializableMetadata()

Rejects metadata holding anything but scalars, null, or arrays of the same, recursively.

private assertSerializableMetadata(string $sName, array<string|int, mixed> $aMetadata) : void
Parameters
$sName : string

The feature's name, for the exception message

$aMetadata : array<string|int, mixed>
On this page

Search results