Skip to content

Extras Reference ​

Every model uses an extras dict to preserve unmodeled XML attributes through roundtrip. This page documents the known extras keys, their types, and meanings.

All extras values are strings unless noted otherwise.


SgffFeature ​

Accessed via feature.extras.

KeyTypeDescription
recentIDstrInternal SnapGene ID for the feature
translationMWstrMolecular weight of translated protein (Da)
hitsStopCodonstr"1" if translation hits a stop codon
consecutiveTranslationNumberingstr"1" to use consecutive numbering

readingFrame was formerly in extras; it is now the typed field reading_frame.

SgffSegment ​

Accessed via segment.extras.

KeyTypeDescription
namestrOptional segment name

type and translated were formerly in extras; they are now typed fields.

SgffPrimer ​

Accessed via primer.extras.

KeyTypeDescription
recentIDstrInternal SnapGene ID
colorstrHex color (e.g., "#FF0000")
descriptionstrUser-provided description
dateAddedstrCreation date

SgffBindingSite ​

Accessed via binding_site.extras.

KeyTypeDescription
ComponentdictNested structure with hybridization details (hybridizedRange, bases)

SgffHistoryTreeNode ​

Accessed via node.extras.

KeyTypeDescription
hideHistorystr"1" to hide node from history tree view
customMapLabelstrCustom label for map view
useCustomMapLabelstr"1" to enable custom map label
upstreamStickinessstrUpstream sticky end sequence (e.g., "AATT")
downstreamStickinessstrDownstream sticky end sequence (e.g., "TTAA")
RegeneratedSitedictEnzyme info ({"name": "BamHI"})

SgffInputSummary ​

Accessed via summary.extras.

KeyTypeDescription
strainNamestrBacterial strain (e.g., "DH5alpha")
methylationChangesstrMethylation pattern (e.g., "dam+")
dam2str"1" for Dam methylation flag

SgffAlignment ​

Accessed via alignment.extras.

KeyTypeDescription
IDstrUnique identifier
sortOrderstrDisplay ordering index
trimmedRangestrQuality trimming range (e.g., "5-100")
isTracestr"0" or "1"

Wrapper-level Extras ​

List models store wrapper-level extras in _wrapper_extras (not part of the public API but preserved for lossless roundtrip).

SgffPrimerList ​

KeyTypeDescription
HybridizationParamsdictHybridization parameters (minContinuous, etc.)
nextValidIDstrNext available primer ID counter

SgffFeatureList ​

KeyTypeDescription
nextValidIDstrNext available feature ID counter
recycledIDsstrComma-separated list of deleted feature IDs

SgffAlignmentList ​

KeyTypeDescription
trimStringencystrAlignment quality threshold (e.g., "0.05")

Released under the MIT License.