Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type checking in extracted results #330

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/pheval/post_processing/post_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,11 +375,11 @@ def generate_pheval_result(
info_log.warning(f"No results found for {tool_result_path.name}")
return
ranked_pheval_result = _create_pheval_result(pheval_result, sort_order_str)
if all(isinstance(result, RankedPhEvalGeneResult) for result in ranked_pheval_result):
if all(isinstance(result, PhEvalGeneResult) for result in pheval_result):
_write_pheval_gene_result(ranked_pheval_result, output_dir, tool_result_path)
elif all(isinstance(result, RankedPhEvalVariantResult) for result in ranked_pheval_result):
elif all(isinstance(result, PhEvalVariantResult) for result in pheval_result):
_write_pheval_variant_result(ranked_pheval_result, output_dir, tool_result_path)
elif all(isinstance(result, RankedPhEvalDiseaseResult) for result in ranked_pheval_result):
elif all(isinstance(result, PhEvalDiseaseResult) for result in pheval_result):
_write_pheval_disease_result(ranked_pheval_result, output_dir, tool_result_path)
else:
raise ValueError("Results are not all of the same type.")
Loading