Skip to content

Commit

Permalink
0.1.15
Browse files Browse the repository at this point in the history
  • Loading branch information
pnrobinson committed Jul 12, 2024
1 parent e342c3d commit 51272f4
Show file tree
Hide file tree
Showing 4 changed files with 427 additions and 32 deletions.
2 changes: 1 addition & 1 deletion GetPhenopackets.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"We found 390 cohorts\n",
"We found 391 cohorts\n",
"Wrote phenopacket collection MarkDown file to docs/collections.md\n"
]
}
Expand Down
1 change: 1 addition & 0 deletions docs/collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ Phenopacket store is a repository of [GA4GH phenopackets](https://pubmed.ncbi.nl
|[WFS1](notebooks/WFS1/WFS1_Wolfram_syndrome_1_individuals.ipynb){:target="_blank"}|10 Phenopackets;[Wolfram syndrome 1](https://omim.org/entry/222300){:target="_blank"}|
|[COL11A1](notebooks/COL11A1/COL11A1_STL2_individuals.ipynb){:target="_blank"}|2 Phenopackets;[Stickler syndrome, type II](https://omim.org/entry/604841){:target="_blank"}|
|[SP7](notebooks/SP7/SP7_OI12_individuals.ipynb){:target="_blank"}|1 Phenopackets;[Osteogenesis imperfecta, type XII](https://omim.org/entry/613849){:target="_blank"}|
|[DOCK11](notebooks/DOCK11/DOCK11_ADMIDX_individuals.ipynb){:target="_blank"}|12 Phenopackets;[Autoinflammatory disease, multisystem, with immune dysregulation, X-linked](https://omim.org/entry/301109){:target="_blank"}|
|[TBX1](notebooks/TBX1/TBX1_Yagi_2003.ipynb){:target="_blank"}|5 Phenopackets;[DiGeorge syndrome](https://omim.org/entry/188400){:target="_blank"}|
|[KCNT1](notebooks/KCNT1/KCNT1_DEE14_individuals.ipynb){:target="_blank"}|8 Phenopackets;[Developmental and epileptic encephalopathy 14](https://omim.org/entry/614959){:target="_blank"}|
|[SKIC3](notebooks/SKIC3/SKIC3_THES1_individuals.ipynb){:target="_blank"}|2 Phenopackets;[Trichohepatoenteric syndrome 1](https://omim.org/entry/222470){:target="_blank"}|
Expand Down
449 changes: 421 additions & 28 deletions ppktstore_stats.ipynb

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions src/ppktstore/stats/_ppkt_store_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def get_cohort_to_phenopacket_d(self):

def _extract_all_phenopackets_df(self) -> pd.DataFrame:
all_ppkt = None
column_names = ['disease', 'disease_id', 'patient_id', 'gene', 'allele_1', 'allele_2', 'PMID', 'cohort', 'filename']
for info in self._archive.infolist():
if info.is_dir():
continue
Expand All @@ -58,11 +59,11 @@ def _extract_all_phenopackets_df(self) -> pd.DataFrame:
continue
L = line.decode("utf-8")
fields = L.strip().split("\t")
if len(fields) != 8:
if len(fields) != len(column_names):
raise ValueError(f"Malformed line with {len(fields)} fields: {L}")
list_of_lists.append(fields)
columns = ['disease', 'disease_id', 'patient_id', 'gene', 'allele_1', 'allele_2', 'PMID','filename']
return pd.DataFrame(data=list_of_lists, columns=columns)

return pd.DataFrame(data=list_of_lists, columns=column_names)

def _extract_all_cohort_phenopackets(self) -> typing.Dict:
cohort_to_ppkt_d = defaultdict(list)
Expand Down

0 comments on commit 51272f4

Please sign in to comment.