-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
150d27f
commit e8068b7
Showing
10 changed files
with
695 additions
and
108 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from typing import List | ||
from ..creation.individual import Individual | ||
from .validated_individual import ValidatedIndividual | ||
import hpotk | ||
|
||
class CohortValidator: | ||
|
||
def __init__(self, cohort:List[Individual], ontology:hpotk.MinimalOntology, min_var:int, min_hpo:int, min_allele:int=None) -> None: | ||
self._cohort = cohort | ||
self._validated_individual_list = [] | ||
for indi in cohort: | ||
vindi = ValidatedIndividual(individual=indi) | ||
vindi.validate(ontology=ontology, min_hpo=min_hpo, min_allele=min_allele, min_var=min_var) | ||
self._validated_individual_list.append(vindi) | ||
|
||
def get_validated_individual_list(self): | ||
return self._validated_individual_list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,29 @@ | ||
import os | ||
import os | ||
|
||
|
||
|
||
EMPTY_CELL = "" | ||
|
||
class HpoaTableCreator: | ||
""" | ||
Create an HPO "small file" with the following columns | ||
1. #diseaseID | ||
2. diseaseName | ||
3. phenotypeID | ||
4. phenotypeName | ||
5. onsetID | ||
6. onsetName | ||
7. frequency | ||
8. sex | ||
9. negation | ||
10. modifier | ||
11. description | ||
12. publication | ||
13. evidence | ||
14. biocuration | ||
These should be tab separate fields. | ||
""" | ||
|
||
def __init__(self, phenopacket_dir) -> None: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
|
||
from typing import List | ||
import hpotk | ||
from ..validation.validation_result import ValidationResult | ||
from ..validation.validated_individual import ValidatedIndividual | ||
|
||
class QcVisualizer: | ||
def __init__(self, ontology:hpotk.MinimalOntology) -> None: | ||
self._ontology = ontology | ||
|
||
|
||
def to_html(self, validation_result_list:list[ValidationResult]) -> str: | ||
pass | ||
def to_html(self, validated_individual_list:List[ValidatedIndividual]) -> str: | ||
html_lines = [] | ||
n_individuals = len(validated_individual_list) | ||
n_individuals_with_errors = sum([1 for i in validated_individual_list if i.has_error()]) | ||
html_lines.append("<h2>Cohort validation</h2>") | ||
if n_individuals_with_errors == 0: | ||
html_lines.append(f"<p>No errors found for the cohort with {n_individuals} individuals</p>") | ||
return "\n".join(html_lines) | ||
else: | ||
return "HELP" |