Post processing
ResultType
Bases: Enum
Enumeration of the possible result types.
Source code in src/pheval/post_processing/post_processing.py
20 21 22 23 24 25 | |
SortOrder
Bases: Enum
Enumeration representing sorting orders.
Source code in src/pheval/post_processing/post_processing.py
28 29 30 31 32 33 34 | |
ASCENDING = 1
class-attribute
instance-attribute
Ascending sort order.
DESCENDING = 2
class-attribute
instance-attribute
Descending sort order.
create_empty_pheval_result(phenopacket_dir, output_dir, result_type)
Create an empty PhEval result for a given result type (gene, variant, or disease).
Notes
This is necessary because some tools may not generate a result output for certain cases. By explicitly creating an empty result, which will contain the known entity with a rank and score of 0, we can track and identify false negatives during benchmarking, ensuring that missing predictions are accounted for in the evaluation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
phenopacket_dir
|
Path
|
The directory containing the phenopackets. |
required |
output_dir
|
Path
|
The output directory. |
required |
result_type
|
ResultType
|
The result type. |
required |
Source code in src/pheval/post_processing/post_processing.py
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 | |
generate_disease_result(results, sort_order, output_dir, result_path, phenopacket_dir)
Generate PhEval disease results to a compressed Parquet output. Args: results (pl.DataFrame): The disease results. sort_order (SortOrder): The sort order to use. output_dir (Path): Path to the output directory result_path (Path): Path to the tool-specific result file. phenopacket_dir (Path): Path to the Phenopacket directory
Source code in src/pheval/post_processing/post_processing.py
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | |
generate_gene_result(results, sort_order, output_dir, result_path, phenopacket_dir)
Generate PhEval gene results to a compressed Parquet output. Args: results (pl.DataFrame): The gene results. sort_order (SortOrder): The sort order to use. output_dir (Path): Path to the output directory result_path (Path): Path to the tool-specific result file. phenopacket_dir (Path): Path to the Phenopacket directory
Source code in src/pheval/post_processing/post_processing.py
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | |
generate_variant_result(results, sort_order, output_dir, result_path, phenopacket_dir)
Generate PhEval variant results to a compressed Parquet output. Args: results (pl.DataFrame): The variant results. sort_order (SortOrder): The sort order to use. output_dir (Path): Path to the output directory result_path (Path): Path to the tool-specific result file. phenopacket_dir (Path): Path to the Phenopacket directory
Source code in src/pheval/post_processing/post_processing.py
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | |