Skip to content

Commit

Permalink
Merge pull request #46 from HomoPolyethylen/fix-r0.5.3
Browse files Browse the repository at this point in the history
Fix r0.5.3
  • Loading branch information
mapo9 authored Jul 25, 2024
2 parents 5f1b67d + f97ab32 commit 1e49bed
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
Changelog
============

0.5.4 - Sulfur Io (2024-07-24)
---------------------------------------------

**Added**

**Fixed**

* [#43](https://github.com/qbic-pipelines/querynator/issues/43): issue with disease ontology file path, which resurfaced in docker container
* evidences without specified disease are now excluded if `--cancer` is specified

**Dependencies**

**Deprecated**


0.5.3 - Sulfur Io (2024-07-20)
---------------------------------------------

Expand Down
7 changes: 5 additions & 2 deletions querynator/query_api/civic_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import os
import random
from datetime import date
from os.path import abspath, dirname

import civicpy
import numpy as np
Expand Down Expand Up @@ -443,7 +444,7 @@ def get_evidence_information_from_variant(variant_obj, diseases):

# check special rules for evidences and cancer types
disease, allowed_diseases = diseases
if disease and allowed_diseases and evidence.disease.name not in allowed_diseases:
if disease and allowed_diseases and evidence.disease and evidence.disease.name not in allowed_diseases:
if evidence.evidence_level == "A":
# AMP/ASCO/CAT: level A evidence for other tumor is level C for this tumor
new_dict["evidence_level"] = "C"
Expand Down Expand Up @@ -534,7 +535,9 @@ def create_civic_results(variant_list, out_path, disease, logger, filter_vep):
civic_result_df = pd.DataFrame()

if disease:
doid = ontology.DiseaseOntology("querynator/helper_functions/doid.obo")
proj_root = dirname(dirname(abspath(__file__)))
doid_file = os.path.join(proj_root, "helper_functions/doid.obo")
doid = ontology.DiseaseOntology(doid_file)
diseases = doid.get(disease), doid.get_all_ancestors(disease)
logger.info(f"Mapped specified disease {disease} to Disease Ontology (DO) {str(diseases[0])}")
else:
Expand Down

0 comments on commit 1e49bed

Please sign in to comment.