OESequenceMetadataToJson

Attention

This API is currently available in C++ and Python.

std::string OESequenceMetadataToJson(const OESequenceMetadata& metadata,
                                     const bool prettyPrint = true)

Serializes an OESequenceMetadata object to a JSON-formatted string. The resulting JSON object contains the following fields:

Field

Type

Description

ChainID

string

Chain identifier for this sequence segment.

StartResNum

integer

Residue number of the first residue in the sequence segment.

StartResInsCode

string (single character)

Insertion code of the first residue in the sequence segment.

EndResNum

integer

Residue number of the last residue in the sequence segment.

EndResInsCode

string (single character)

Insertion code of the last residue in the sequence segment.

Sequence

string

One-letter amino acid sequence for this segment.

The prettyPrint argument controls formatting: when true (the default) the JSON is indented for readability; when false a compact single-line representation is produced.