Skip to content

Commit

Permalink
Merge pull request #248 from monarch-initiative/it_to_files
Browse files Browse the repository at this point in the history
updated tqdm to print files/sec instead of it/sec
  • Loading branch information
ielis committed Sep 13, 2024
2 parents c5e6996 + 5fc0464 commit 1e3b011
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ a :class:`~gpsea.model.Cohort`:
... phenopackets=phenopackets,
... cohort_creator=cohort_creator,
... )
Patients Created: ...
Individuals Processed: ...

and we will check that there are no Q/C issues:

Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/input-data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ loader function:

>>> from gpsea.preprocessing import load_phenopackets
>>> cohort, qc_results = load_phenopackets(phenopackets, cohort_creator) # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
Patients Created: ...
Individuals Processed: ...
>>> len(cohort)
19

Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/predicates/hpo_predicate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ processed into a cohort
>>> from gpsea.preprocessing import configure_caching_cohort_creator, load_phenopackets
>>> cohort_creator = configure_caching_cohort_creator(hpo)
>>> cohort, _ = load_phenopackets(phenopackets, cohort_creator) # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
Patients Created: ...
Individuals Processed: ...


we can create HPO predicates for testing all 260 HPO terms used in the cohort
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/predicates/variant_predicates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ and we will convert the phenopacket into a :class:`~gpsea.model.Cohort`:

>>> from gpsea.preprocessing import load_phenopackets
>>> cohort, _ = load_phenopackets(phenopackets, cohort_creator) # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
Patients Created: ...
Individuals Processed: ...

To demonstrate the predicate API, we will use the variant ``1_8358231_8358231_T_C`` that corresponds
to a pathogenic variant `VCV000522858.5 <https://www.ncbi.nlm.nih.gov/clinvar/variation/522858/>`_
Expand Down
4 changes: 2 additions & 2 deletions docs/user-guide/stats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ with the default cohort creator:
>>> from gpsea.preprocessing import configure_caching_cohort_creator, load_phenopackets
>>> cohort_creator = configure_caching_cohort_creator(hpo)
>>> cohort, qc_results = load_phenopackets(phenopackets, cohort_creator) # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
Patients Created: ...
Individuals Processed: ...
>>> qc_results.summarize() # doctest: +SKIP
Validated under none policy
No errors or warnings were found
Expand Down Expand Up @@ -344,7 +344,7 @@ which we will use to preprocess the cohort

>>> from gpsea.preprocessing import load_phenopackets
>>> cohort, _ = load_phenopackets(phenopackets, cohort_creator) # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
Patients Created: ...
Individuals Processed: ...


resulting in a cohort consisting of 19 individuals
Expand Down
2 changes: 1 addition & 1 deletion src/gpsea/preprocessing/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ def load_phenopackets(
# Turn phenopackets into a cohort using the cohort creator.
# Keep track of the progress by wrapping the list of phenopackets
# with TQDM 😎
cohort_iter = tqdm(phenopackets, desc="Patients Created", file=sys.stdout)
cohort_iter = tqdm(phenopackets, desc="Individuals Processed", file=sys.stdout, unit="individuals")
notepad = cohort_creator.prepare_notepad("Phenopackets")
cohort = cohort_creator.process(cohort_iter, notepad)

Expand Down

0 comments on commit 1e3b011

Please sign in to comment.