Complex Portal
Complex Portal is a manually curated resource of macromolecular complexes maintained by EMBL-EBI. It provides two complementary datasets:
- Experimental – complexes with direct experimental evidence.
- Predicted – computationally predicted complexes.
Both files are distributed in the ComplexTAB flat-file format and are filtered to human complexes (NCBI taxonomy ID 9606) during ingestion.
The resulting MolecularComplex dataset is used downstream in the deCODE proteomics pipeline to annotate multi-protein SomaScan aptamers with a molecularComplexId.
gentropy.datasource.complex_portal.ComplexTab
dataclass
¶
Bases: Dataset
Parser for the Complex Portal ComplexTAB flat-file format.
This class reads the ComplexTAB TSV files distributed by the
Complex Portal and transforms them
into the MolecularComplex dataset. It is not instantiated directly;
use from_complex_tab to produce a MolecularComplex object.
Class attributes
HUMAN_TAXONOMY_ID (int): NCBI taxonomy ID for Homo sapiens (9606). Rows with a different taxonomy are discarded during ingestion.
Source code in src/gentropy/datasource/complex_portal/__init__.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | |
from_complex_tab(session: Session, experimental: str, predicted: str) -> MolecularComplex
classmethod
¶
Parse experimental and predicted ComplexTAB files into a MolecularComplex dataset.
Both input files are read with the ComplexTAB schema, unioned, and filtered
to human complexes (taxonomy ID 9606). The following fields are extracted
and renamed to match the MolecularComplex schema:
#Complex ac→idDescription→descriptionComplex properties→propertiesComplex assembly→assemblyExpanded participant list→components(parsed by_parse_components)Evidence Code→evidenceCodes(parsed by_parse_evidence_code)Cross references→crossReferences(parsed by_parse_cross_references)Source→source(parsed by_parse_source)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
Active Gentropy Spark session. |
required |
experimental
|
str
|
Path to the experimental ComplexTAB TSV file. |
required |
predicted
|
str
|
Path to the predicted ComplexTAB TSV file. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
MolecularComplex |
MolecularComplex
|
Parsed and filtered molecular complex dataset. |
Source code in src/gentropy/datasource/complex_portal/__init__.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |
get_schema() -> t.StructType
classmethod
¶
Return the raw Spark schema matching the ComplexTAB TSV column layout.
The schema covers all columns present in the ComplexTAB export, including complex accession, taxonomy, participant list, evidence codes, cross references, and descriptive fields.
Returns:
| Type | Description |
|---|---|
StructType
|
t.StructType: Raw ComplexTAB schema with original column names. |
Source code in src/gentropy/datasource/complex_portal/__init__.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |