Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate per-file reports for compendia files #221

Merged
merged 25 commits into from
Jan 25, 2024

Conversation

gaurav
Copy link
Collaborator

@gaurav gaurav commented Jan 13, 2024

This PR adds per-file reports for compendia files that are written into the reports/content/ directory. We also generate an overall content report for compendia files. Since these are JSON files, I've added jq to the Babel image for use in debugging.

This is what the overall content report looks like right now:

{
  "biolink_types": {
    "biolink:Activity": 41367,
    "biolink:Agent": 4222,
    "biolink:AnatomicalEntity": 144778,
    "biolink:Behavior": 4156,
    "biolink:BiologicalEntity": 108,
    "biolink:BiologicalProcess": 26865,
    "biolink:Cell": 8804,
    "biolink:CellularComponent": 12132,
    "biolink:ChemicalEntity": 7406121,
    "biolink:ChemicalMixture": 499,
    "biolink:ClinicalAttribute": 107356,
    "biolink:Cohort": 7353,
    "biolink:ComplexMolecularMixture": 177,
    "biolink:Device": 77193,
    "biolink:Disease": 340566,
    "biolink:DiseaseOrPhenotypicFeature": 29,
    "biolink:Drug": 173458,
    "biolink:Event": 235,
    "biolink:Food": 8468,
    "biolink:Gene": 52825216,
    "biolink:GeneFamily": 27917,
    "biolink:GenomicEntity": 39793,
    "biolink:GeographicLocation": 4667,
    "biolink:GrossAnatomicalStructure": 10321,
    "biolink:Human": 39,
    "biolink:InformationContentEntity": 53702,
    "biolink:MacromolecularComplex": 626,
    "biolink:MolecularActivity": 195552,
    "biolink:MolecularEntity": 14,
    "biolink:MolecularMixture": 10174352,
    "biolink:NamedThing": 31,
    "biolink:NucleicAcidEntity": 449,
    "biolink:OrganismAttribute": 983,
    "biolink:OrganismTaxon": 3205738,
    "biolink:Pathway": 52880,
    "biolink:Phenomenon": 4666,
    "biolink:PhenotypicFeature": 357159,
    "biolink:PhysicalEntity": 6328,
    "biolink:PhysiologicalProcess": 31047,
    "biolink:Polypeptide": 832,
    "biolink:PopulationOfIndividualOrganisms": 4074,
    "biolink:Procedure": 426906,
    "biolink:Protein": 253569392,
    "biolink:Publication": 48564,
    "biolink:SmallMolecule": 106140712
  },
  "count_lines": 435545847,
  "counters": {
    "clique_count": 435545847,
    "cliques_by_description_count": {
      "0": 435144564,
      "1": 389676,
      "19": 1,
      "2": 9652,
      "3": 1720,
      "4": 196,
      "5": 27,
      "6": 7,
      "7": 3,
      "8": 1
    },
    "cliques_by_id_count": {
      "1": 305289449,
      "10": 4454,
      "100": 1,
      "101": 4,
      "103": 3,
      "107": 1,
      "109": 2,
      "11": 11362,
      "111": 1,
      "113": 1,
      "115": 1,
      "117": 2,
      "1181": 1,
      "12": 2077,
      "121": 1,
      "123": 1,
      "125": 2,
      "129": 1,
      "13": 7280,
      "131": 1,
      "133": 1,
      "137": 2,
      "14": 1244,
      "141": 1,
      "145": 1,
      "149": 1,
      "15": 5140,
      "155": 1,
      "156": 1,
      "16": 396,
      "17": 4185,
      "177": 1,
      "179": 1,
      "18": 208,
      "19": 4106,
      "2": 116298876,
      "20": 104,
      "201": 1,
      "21": 4415,
      "217": 1,
      "22": 88,
      "23": 3188,
      "24": 38,
      "25": 524,
      "26": 36,
      "261": 1,
      "27": 241,
      "28": 29,
      "29": 136,
      "291": 1,
      "3": 13186810,
      "30": 14,
      "303": 1,
      "31": 104,
      "32": 15,
      "33": 92,
      "34": 7,
      "35": 60,
      "36": 10,
      "37": 42,
      "38": 10,
      "39": 41,
      "4": 325258,
      "40": 5,
      "41": 33,
      "42": 3,
      "43": 49,
      "44": 2,
      "45": 32,
      "46": 2,
      "47": 20,
      "48": 3,
      "49": 17,
      "5": 274011,
      "50": 4,
      "51": 19,
      "52": 1,
      "53": 13,
      "54": 1,
      "545": 1,
      "55": 6,
      "57": 11,
      "59": 4,
      "6": 34922,
      "60": 1,
      "61": 3,
      "62": 3,
      "63": 6,
      "64": 1,
      "65": 11,
      "66": 2,
      "67": 11,
      "69": 4,
      "7": 56675,
      "71": 2,
      "72": 1,
      "73": 8,
      "74": 1,
      "75": 2,
      "77": 3,
      "79": 2,
      "8": 9716,
      "81": 6,
      "83": 7,
      "84": 1,
      "85": 2,
      "86": 1,
      "87": 6,
      "89": 5,
      "9": 20114,
      "91": 5,
      "93": 5,
      "95": 4,
      "99": 3
    },
    "cliques_by_label_count": {
      "0": 11903945,
      "1": 420628921,
      "10": 262,
      "11": 105,
      "12": 36,
      "13": 27,
      "14": 15,
      "15": 8,
      "16": 8,
      "17": 3,
      "18": 6,
      "19": 3,
      "2": 2716465,
      "22": 3,
      "23": 2,
      "24": 1,
      "26": 1,
      "27": 1,
      "29": 1,
      "3": 231320,
      "4": 32580,
      "42": 1,
      "5": 14426,
      "6": 8130,
      "7": 5551,
      "8": 2482,
      "9": 1544
    },
    "cliques_by_unique_description_count": {
      "0": 435144564,
      "1": 392272,
      "18": 1,
      "2": 7825,
      "3": 1046,
      "4": 116,
      "5": 15,
      "6": 5,
      "7": 3
    },
    "cliques_by_unique_label_count": {
      "0": 11903945,
      "1": 421075499,
      "10": 26,
      "11": 11,
      "12": 6,
      "13": 7,
      "14": 4,
      "15": 4,
      "16": 2,
      "17": 3,
      "18": 1,
      "19": 2,
      "2": 2476928,
      "20": 1,
      "22": 2,
      "23": 1,
      "24": 1,
      "26": 1,
      "28": 1,
      "3": 67163,
      "34": 1,
      "4": 15830,
      "5": 4640,
      "6": 1251,
      "7": 344,
      "8": 130,
      "9": 43
    }
  },
  "prefixes": {
    "CAS": 3546369,
    "CHEBI": 165470,
    "CHEMBL.COMPOUND": 2399641,
    "CL": 2726,
    "ComplexPortal": 1252,
    "DOID": 11443,
    "DRUGBANK": 14955,
    "DrugCentral": 4995,
    "EC": 8633,
    "EFO": 12093,
    "EMAPA": 945,
    "ENSEMBL": 33346859,
    "FB": 30285,
    "FBbt": 114,
    "GO": 42837,
    "GTOPDB": 12347,
    "HGNC": 43861,
    "HGNC.FAMILY": 1779,
    "HMDB": 217920,
    "HP": 17498,
    "ICD10": 2431,
    "ICD9": 2219,
    "INCHIKEY": 110336171,
    "KEGG.COMPOUND": 15802,
    "KEGG.DISEASE": 40,
    "KEGG.REACTION": 5,
    "MEDDRA": 68217,
    "MESH": 343115,
    "MGI": 80206,
    "MONDO": 23620,
    "MP": 10,
    "NCBIGene": 49400812,
    "NCBITaxon": 2525280,
    "NCIT": 56325,
    "OMIM": 27515,
    "OMIM.PS": 546,
    "PANTHER.FAMILY": 26138,
    "PANTHER.PATHWAY": 175,
    "PR": 226207,
    "PUBCHEM.COMPOUND": 122954081,
    "REACT": 107383,
    "RGD": 57172,
    "RHEA": 64447,
    "RXCUI": 122610,
    "SGD": 7161,
    "SMPDB": 30248,
    "SNOMEDCT": 142613,
    "TCDB": 23,
    "UBERON": 14393,
    "UMLS": 3237718,
    "UNII": 121952,
    "UniProtKB": 251772975,
    "WBbt": 18,
    "WormBase": 48781,
    "ZFA": 609,
    "ZFIN": 38078,
    "dictyBase": 13892,
    "orphanet": 10783
  },
  "report_path": "babel_outputs/reports/content/compendia_report.json"
}

Should be merged after PR #201

@gaurav gaurav marked this pull request as ready for review January 14, 2024 20:45
@gaurav gaurav changed the base branch from master to babel-1.3 January 14, 2024 20:45
@gaurav gaurav requested a review from cbizon January 14, 2024 21:26
@cbizon
Copy link
Contributor

cbizon commented Jan 18, 2024

One idea - rather than
"count_cliques_with_65_ids": 11,
What about something like:

"count_cliques_with_n_ids": [
{ "n": 65,
 "num_cliques": 11},
...
]

@gaurav
Copy link
Collaborator Author

gaurav commented Jan 20, 2024

One idea - rather than "count_cliques_with_65_ids": 11, What about something like:

"count_cliques_with_n_ids": [
{ "n": 65,
 "num_cliques": 11},
...
]

How about:

    "cliques_by_unique_description_count": {
      "0": 435144564,
      "1": 392272,
      "18": 1,
      "2": 7825,
      "3": 1046,
      "4": 116,
      "5": 15,
      "6": 5,
      "7": 3
    },

That's what I've currently implemented and this is definitely the easier format to work with on the intermediate files, but I can convert the final report into the "count": [{ "n": 5, "num_cliques": 10 }] format if that would be easier to work with.

@gaurav gaurav requested a review from cbizon January 20, 2024 04:33
@gaurav gaurav mentioned this pull request Jan 20, 2024
Base automatically changed from babel-1.3 to master January 24, 2024 19:17
@gaurav gaurav merged commit 83907b1 into master Jan 25, 2024
@gaurav gaurav deleted the generate-curie-breakdown-report branch January 25, 2024 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants