Skip to content

Commit

Permalink
Merge pull request #328 from monarch-initiative/327-remove-phenopacke…
Browse files Browse the repository at this point in the history
…ts-with-all-negated-phenotypic-terms

Remove phenopackets with no observed phenotypes
  • Loading branch information
yaseminbridges authored May 9, 2024
2 parents ff08622 + 854f093 commit 5712eb1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pheval/prepare/prepare_corpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ def prepare_corpus(
output_dir.joinpath("phenopackets").mkdir(exist_ok=True, parents=True)
for phenopacket_path in all_files(phenopacket_dir):
phenopacket_util = PhenopacketUtil(phenopacket_reader(phenopacket_path))
if not phenopacket_util.observed_phenotypic_features():
info_log.warning(
f"Removed {phenopacket_path.name} from the corpus due to no observed phenotypic features."
)
continue
if variant_analysis:
if phenopacket_util.check_incomplete_variant_record():
info_log.warning(
Expand Down

0 comments on commit 5712eb1

Please sign in to comment.