Post processing
PhEvalDiseaseResult
dataclass
Bases: PhEvalResult
Minimal data required from tool-specific output for disease prioritisation
Parameters:
Name | Type | Description | Default |
---|---|---|---|
disease_name |
str
|
Disease name for the result entry |
required |
disease_identifier |
str
|
Identifier for the disease result entry in the OMIM namespace |
required |
score |
str
|
Score for the disease result entry |
required |
Notes
While we recommend providing the disease identifier in the OMIM namespace, any matching format used in Phenopacket interpretations is acceptable for result matching purposes in the analysis.
Source code in src/pheval/post_processing/post_processing.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
|
PhEvalGeneResult
dataclass
Bases: PhEvalResult
Minimal data required from tool-specific output for gene prioritisation result
Parameters:
Name | Type | Description | Default |
---|---|---|---|
gene_symbol |
str
|
The gene symbol for the result entry |
required |
gene_identifier |
str
|
The ENSEMBL gene identifier for the result entry |
required |
score |
float
|
The score for the gene result entry |
required |
Notes
While we recommend providing the gene identifier in the ENSEMBL namespace, any matching format used in Phenopacket interpretations is acceptable for result matching purposes in the analysis.
Source code in src/pheval/post_processing/post_processing.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
|
PhEvalResult
dataclass
Base class for PhEval results.
Source code in src/pheval/post_processing/post_processing.py
24 25 26 |
|
PhEvalVariantResult
dataclass
Bases: PhEvalResult
Minimal data required from tool-specific output for variant prioritisation
Parameters:
Name | Type | Description | Default |
---|---|---|---|
chromosome |
str
|
The chromosome position of the variant recommended to be provided in the following format. |
required |
start |
int
|
The start position of the variant |
required |
end |
int
|
The end position of the variant |
required |
ref |
str
|
The reference allele of the variant |
required |
alt |
str
|
The alternate allele of the variant |
required |
score |
float
|
The score for the variant result entry |
required |
Notes
While we recommend providing the variant's chromosome in the specified format, any matching format used in Phenopacket interpretations is acceptable for result matching purposes in the analysis.
Source code in src/pheval/post_processing/post_processing.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
RankedPhEvalDiseaseResult
dataclass
Bases: PhEvalDiseaseResult
PhEval disease result with corresponding rank
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rank |
int
|
The rank for the result entry |
required |
Source code in src/pheval/post_processing/post_processing.py
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 |
|
from_disease_result(pheval_disease_result, rank)
staticmethod
Return RankedPhEvalDiseaseResult from a PhEvalDiseaseResult and rank
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pheval_disease_result |
PhEvalDiseaseResult
|
The disease result entry |
required |
rank |
int
|
The corresponding rank for the result entry |
required |
Returns:
Name | Type | Description |
---|---|---|
RankedPhEvalDiseaseResult | The result as a RankedPhEvalDiseaseResult |
Source code in src/pheval/post_processing/post_processing.py
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
|
RankedPhEvalGeneResult
dataclass
Bases: PhEvalGeneResult
PhEval gene result with corresponding rank
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rank |
int
|
The rank for the result entry |
required |
Source code in src/pheval/post_processing/post_processing.py
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 |
|
from_gene_result(pheval_gene_result, rank)
staticmethod
Return RankedPhEvalGeneResult from a PhEvalGeneResult and rank
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pheval_gene_result |
PhEvalGeneResult
|
The gene result entry |
required |
rank |
int
|
The corresponding rank for the result entry |
required |
Returns:
Name | Type | Description |
---|---|---|
RankedPhEvalGeneResult | The result as a RankedPhEvalGeneResult |
Source code in src/pheval/post_processing/post_processing.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
|
RankedPhEvalVariantResult
dataclass
Bases: PhEvalVariantResult
PhEval variant result with corresponding rank
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rank |
int
|
The rank for the result entry |
required |
Source code in src/pheval/post_processing/post_processing.py
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 |
|
from_variant_result(pheval_variant_result, rank)
staticmethod
Return RankedPhEvalVariantResult from a PhEvalVariantResult and rank
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pheval_variant_result |
PhEvalVariantResult
|
The variant result entry |
required |
rank |
int
|
The corresponding rank for the result entry |
required |
Returns:
Name | Type | Description |
---|---|---|
RankedPhEvalVariantResult | The result as a RankedPhEvalVariantResult |
Source code in src/pheval/post_processing/post_processing.py
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|
ResultSorter
Class for sorting PhEvalResult instances based on a given sort order.
Source code in src/pheval/post_processing/post_processing.py
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 218 219 220 221 222 223 224 225 226 227 |
|
__init__(pheval_results, sort_order)
Initialise ResultSorter
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pheval_results |
[PhEvalResult]
|
List of PhEvalResult instances to be sorted |
required |
sort_order |
SortOrder
|
Sorting order to be applied |
required |
Source code in src/pheval/post_processing/post_processing.py
187 188 189 190 191 192 193 194 195 196 |
|
sort_pheval_results()
Sort results based on the specified sort order.
Returns:
Type | Description |
---|---|
[PhEvalResult]
|
[PhEvalResult]: Sorted list of PhEvalResult instances. |
Source code in src/pheval/post_processing/post_processing.py
216 217 218 219 220 221 222 223 224 225 226 227 |
|
SortOrder
Bases: Enum
Enumeration representing sorting orders.
Source code in src/pheval/post_processing/post_processing.py
175 176 177 178 179 180 181 |
|
ASCENDING = 1
class-attribute
Ascending sort order.
DESCENDING = 2
class-attribute
Descending sort order.
calculate_end_pos(variant_start, variant_ref)
Calculate the end position for a variant
Parameters:
Name | Type | Description | Default |
---|---|---|---|
variant_start |
int
|
The start position of the variant |
required |
variant_ref |
str
|
The reference allele of the variant |
required |
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
The end position of the variant |
Source code in src/pheval/post_processing/post_processing.py
12 13 14 15 16 17 18 19 20 21 |
|
generate_pheval_result(pheval_result, sort_order_str, output_dir, tool_result_path)
Generate PhEval variant, gene or disease TSV result based on input results.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pheval_result |
[PhEvalResult]
|
List of PhEvalResult instances to be processed. |
required |
sort_order_str |
str
|
String representation of the desired sorting order. |
required |
output_dir |
Path
|
Path to the output directory. |
required |
tool_result_path |
Path
|
Path to the tool-specific result file. |
required |
Raises:
Type | Description |
---|---|
ValueError
|
If the results are not all the same type or an error occurs during file writing. |
Source code in src/pheval/post_processing/post_processing.py
356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 |
|