From 87a87e498dd373e78c5eb58e1e7eebd2fdb9b261 Mon Sep 17 00:00:00 2001 From: Mark Woon Date: Fri, 21 Jun 2024 14:36:36 +0300 Subject: [PATCH] docs: add number of drugs to gene/drug page --- docs/Genes-and-Drugs.md | 2 +- src/main/java/org/pharmgkb/pharmcat/util/GeneDrugSummary.java | 3 ++- src/main/resources/org/pharmgkb/pharmcat/util/summary.md | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/Genes-and-Drugs.md b/docs/Genes-and-Drugs.md index ade16b352..d2fdcbec1 100644 --- a/docs/Genes-and-Drugs.md +++ b/docs/Genes-and-Drugs.md @@ -61,7 +61,7 @@ HLA calls, respectively, using sequencing data. ## Drugs -The following table lists drugs for which PharmCAT has recommendations for, along with their sources. +The following table lists the 175 drugs for which PharmCAT has recommendations for, along with their sources. | Drug | CPIC | DPWG | FDA Label | FDA PGx Assoc | | :--- | :---: | :---: | :---: | :---: | diff --git a/src/main/java/org/pharmgkb/pharmcat/util/GeneDrugSummary.java b/src/main/java/org/pharmgkb/pharmcat/util/GeneDrugSummary.java index 6125a94b8..e401c5948 100644 --- a/src/main/java/org/pharmgkb/pharmcat/util/GeneDrugSummary.java +++ b/src/main/java/org/pharmgkb/pharmcat/util/GeneDrugSummary.java @@ -141,7 +141,8 @@ public void write(Path documentationDir) throws IOException { String phenotypesTemplate = FileUtils.readFileToString(PHENOTYPES_TEMPLATE_FILE.toFile(), Charsets.UTF_8); Path summaryFile = documentationDir.resolve(SUMMARY_FILE_NAME); try (BufferedWriter writer = Files.newBufferedWriter(summaryFile)) { - writer.write(String.format(summaryTemplate, matcherGeneList, outsideCallGeneList, drugList)); + writer.write(String.format(summaryTemplate, matcherGeneList, outsideCallGeneList, drugSourceMap.keySet().size(), + drugList)); } sf_logger.info("Saving summary to {}", summaryFile); diff --git a/src/main/resources/org/pharmgkb/pharmcat/util/summary.md b/src/main/resources/org/pharmgkb/pharmcat/util/summary.md index cc1f11198..8e69cf6a1 100644 --- a/src/main/resources/org/pharmgkb/pharmcat/util/summary.md +++ b/src/main/resources/org/pharmgkb/pharmcat/util/summary.md @@ -35,6 +35,6 @@ HLA calls, respectively, using sequencing data. ## Drugs -The following table lists drugs for which PharmCAT has recommendations for, along with their sources. +The following table lists the %d drugs for which PharmCAT has recommendations for, along with their sources. %s