OpenMS
Loading...
Searching...
No Matches
UniProtXMLFile.h File Reference
#include <OpenMS/FORMAT/XMLFile.h>
#include <functional>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

struct  UniProtFeature
 A single <feature> element from a UniProtKB XML entry. More...
 
struct  UniProtIsoform
 One <isoform> definition from <comment type="alternative products">. More...
 
struct  UniProtEntry
 A single <entry> from a UniProtKB XML file, in a parser-neutral form. More...
 
class  UniProtXMLFile
 Reads UniProtKB XML protein databases (.xml or transparently .xml.gz). More...
 

Namespaces

namespace  OpenMS
 Main OpenMS namespace.
 

Class Documentation

◆ OpenMS::UniProtFeature

struct OpenMS::UniProtFeature

A single <feature> element from a UniProtKB XML entry.

Fields mirror the UniProt schema after the <location> has been collapsed: a feature is either a single point (HasPosition / position) or a range (HasRange / begin / end). A status="unknown" coordinate is encoded as 0 (the caller decides whether that is legal for its target PEFF key).

Class Members
int begin {0} 1-based range start (0 = unknown / absent)
string description feature/@description (raw, before any cleanup)
int end {0} 1-based range end (0 = unknown / absent)
bool has_position {false} a single <position> element was present
bool has_range {false} a <begin> / <end> pair was present
string id feature/@id, e.g. "VSP_021275" (referenced by isoform definitions)
string location_sequence <location sequence="...">: accession of the isoform the coordinates refer to; empty = the entry's canonical sequence
string original <original> text (sequence or splice variant)
int position {0} 1-based position (0 = unknown / absent)
string type feature/@type, e.g. "modified residue", "disulfide bond", "sequence variant"
string variation <variation> text (sequence or splice variant; first occurrence only)

◆ OpenMS::UniProtIsoform

struct OpenMS::UniProtIsoform

One <isoform> definition from <comment type="alternative products">.

UniProtKB XML does not store isoform sequences verbatim: an isoform either "displays" the canonical sequence (sequence_type "displayed") or is "described" by the splice-variant features listed in sequence_ref, which transform the canonical sequence (a referenced range without a replacement is deleted, one with a <variation> is substituted). The remaining types ("external", "not described") carry no reconstructable sequence.

Class Members
string id first <id> (isoform accession, e.g. "P02768-2"); later ids are secondary
string name first <name> (e.g. "2" or "VEGF121"); later <name> elements are synonyms
string sequence_ref <sequence ref="...">: space-separated <feature type="splice variant"> ids
string sequence_type <sequence type="...">: "displayed", "described", "external" or "not described"

◆ OpenMS::UniProtEntry

struct OpenMS::UniProtEntry

A single <entry> from a UniProtKB XML file, in a parser-neutral form.

Captures the fields needed to build PEFF descriptor lines. The canonical sequence is stored verbatim; isoform sequences are not present in the XML and must be reconstructed by applying the splice-variant features listed in each UniProtIsoform's sequence_ref to the canonical sequence.

Class Members
string accession first <accession> (primary id)
vector< string > alt_accessions second and subsequent <accession> entries
string dataset entry/@dataset, e.g. "Swiss-Prot" or "TrEMBL"
string entry_version <entry version="...">
vector< UniProtFeature > features <feature> elements in document order
string full_name <protein>/<recommendedName>/<fullName> (first occurrence)
vector< UniProtIsoform > isoforms isoform definitions from <comment type="alternative products">
string name first <name> under <entry> (mnemonic id, e.g. "KSINK_HUMAN")
string ncbi_tax_id <organism>/<dbReference type="NCBI Taxonomy" id="...">
string primary_gene <gene>/<name type="primary"> (first occurrence)
string protein_existence <proteinExistence type="..."> (raw type string, e.g. "evidence at protein level")
string sequence canonical <sequence> text (whitespace stripped); isoform sequences are not stored in the XML
string sequence_version <sequence version="...">
string tax_name <organism>/<name type="scientific">