cdm_data_loaders.parsers.uniprot.uniref ¶
UniRef XML File Parser.
Core parser for UniRef XML entries.
Captures the following data about each UniRef cluster: - ID and name - members, including representative member and seed - sequence of the representative member - whether this is UniRef50, 90, or 100.
Data goes into the Cluster, ClusterMember and Entity tables.
generate_dbxref ¶
extract_cluster ¶
Extract the UniRef cluster ID and name from an XSD-converted entry dictionary.
Source code in src/cdm_data_loaders/parsers/uniprot/uniref.py
extract_cross_refs ¶
extract_cross_refs(
dbref: Mapping[str, Any],
cluster_id: str,
is_representative: bool,
) -> dict[str, Any]
Extract UniRef90/50/UniParc cross references from a single dbReference dictionary.
Source code in src/cdm_data_loaders/parsers/uniprot/uniref.py
parse_uniref_entry ¶
parse_uniref_entry(
entry: Mapping[str, Any],
timestamp: datetime,
uniref_variant: str,
) -> dict[str, list[dict[str, Any]]]
Parse a single XSD-converted UniRef entry dictionary into CDM-friendly rows.
Source code in src/cdm_data_loaders/parsers/uniprot/uniref.py
make_uniref_cdm_transform ¶
make_uniref_cdm_transform(
uniref_variant: str, timestamp: datetime | None = None
) -> RecordTransformFn
Create a RecordTransformFn that transforms XSD-parsed UniRef entry dicts into CDM tables.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uniref_variant
|
str
|
protocol label for the UniRef variant (e.g. |
required |
timestamp
|
datetime | None
|
UTC timestamp assigned to |
None
|
Returns:
| Type | Description |
|---|---|
RecordTransformFn
|
|