From 5e447ce4e0683e27c70d1d0d791d4c86f8285ccd Mon Sep 17 00:00:00 2001 From: Nicholas Minor Date: Mon, 21 Oct 2024 12:21:15 -0500 Subject: [PATCH 01/29] changing where the github actions checkout before updating the readme --- .github/workflows/generate_and_render_readme.yml | 1 + scripts/splice_readme.py | 16 +++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/generate_and_render_readme.yml b/.github/workflows/generate_and_render_readme.yml index 512df35..0291a0e 100644 --- a/.github/workflows/generate_and_render_readme.yml +++ b/.github/workflows/generate_and_render_readme.yml @@ -63,6 +63,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: + fetch-depth: 0 python-version: "3.11" - name: Install Dependencies diff --git a/scripts/splice_readme.py b/scripts/splice_readme.py index 5390a6f..4896919 100644 --- a/scripts/splice_readme.py +++ b/scripts/splice_readme.py @@ -24,7 +24,7 @@ def parse_command_line_args() -> argparse.Namespace: Parse a couple named arguments from the command line """ parser = argparse.ArgumentParser( - description="Space a table from one input markdown file into the README." + description="Space a table from one input markdown file into the README.", ) parser.add_argument( "-r", @@ -47,8 +47,10 @@ def parse_command_line_args() -> argparse.Namespace: def splice_readme_lines( - readme_lines: List[str], tally_lines: List[str], new_readme: TextIOWrapper -): + readme_lines: list[str], + tally_lines: list[str], + new_readme: TextIOWrapper, +) -> None: """ Test a few conditions on each line to make sure the tally table is properly spliced into the readme. @@ -79,10 +81,10 @@ def main() -> None: args = parse_command_line_args() # open the input readme and tally md file and collect the lines from each - with open(args.readme, "r", encoding="utf8") as readme_handle: - readme_lines = [line for line in readme_handle.readlines()] - with open(args.tally_file, "r", encoding="utf8") as tally_handle: - tally_lines = [line for line in tally_handle.readlines()] + with open(args.readme, encoding="utf8") as readme_handle: + readme_lines = list(readme_handle.readlines()) + with open(args.tally_file, encoding="utf8") as tally_handle: + tally_lines = list(tally_handle.readlines()) # open the new readme and handle splicing the table into the new readme with open("new_readme.md", "w", encoding="utf8") as new_readme: From 9ff83681aa52470f62121ddc1f053f5a834a57c6 Mon Sep 17 00:00:00 2001 From: Nicholas Minor Date: Mon, 21 Oct 2024 12:25:47 -0500 Subject: [PATCH 02/29] updating the other spot where a github action checks out changes --- .github/workflows/generate_and_render_readme.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/generate_and_render_readme.yml b/.github/workflows/generate_and_render_readme.yml index 0291a0e..a40fd0f 100644 --- a/.github/workflows/generate_and_render_readme.yml +++ b/.github/workflows/generate_and_render_readme.yml @@ -26,6 +26,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: + fetch-depth: 0 python-version: "3.11" - name: Install Dependencies From ab22e79d23283c1c3d67b5c187eceebb32458856 Mon Sep 17 00:00:00 2001 From: Nicholas Minor Date: Mon, 21 Oct 2024 12:28:58 -0500 Subject: [PATCH 03/29] removing a row to test the github action amalgam --- DETECTION_RESULTS.tsv | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/DETECTION_RESULTS.tsv b/DETECTION_RESULTS.tsv index b07b949..1935577 100644 --- a/DETECTION_RESULTS.tsv +++ b/DETECTION_RESULTS.tsv @@ -216,5 +216,4 @@ dholab_30688_12 dholab_carton_0185 2024-10-07 2024-10-12 qPCR DHO_CN_H5specif dholab_30688_13 dholab_carton_0186 2024-10-07 qPCR 36.01 18.3 DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex TRUE WI dholab 2024-10-21 dholab_30688_14 dholab_carton_0187 2024-10-07 qPCR 35.7 23.2 DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex TRUE WI dholab 2024-10-21 dholab_30688_15 dholab_carton_0188 2024-10-07 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 -dholab_30688_16 dholab_carton_0189 2024-10-07 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 -dholab_30688_17 dholab_carton_0190 2024-10-07 qPCR 34.095 77.6 DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex TRUE WI dholab 2024-10-21 \ No newline at end of file +dholab_30688_17 dholab_carton_0190 2024-10-07 qPCR 34.095 77.6 DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex TRUE WI dholab 2024-10-21 From 4fc55ef23910284d32d9208740f79ffa764b43fc Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Mon, 21 Oct 2024 17:29:34 +0000 Subject: [PATCH 04/29] Updated the README file --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3269f03..19d7e73 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ To submit results of your own, read over our [proposal instructions](docs/propos Processing Plant State | Total Cartons | Positive Cartons | Negative Cartons | Latest Date Sampled ------------------------|-----------------|--------------------|--------------------|--------------------- CA | 1 | 0 | 1 | 2024-05-20 -CO | 12 | 9 | 3 | 2024-09-24 +CO | 13 | 9 | 4 | 2024-10-07 FL | 1 | 0 | 1 | 2024-05-20 IA | 10 | 0 | 10 | 2024-07-30 ID | 1 | 0 | 1 | 2024-05-20 @@ -33,7 +33,7 @@ IL | 3 | 0 | 3 IN | 6 | 1 | 5 | 2024-07-02 KS | 2 | 0 | 2 | 2024-07-02 KY | 4 | 1 | 3 | 2024-07-02 -MI | 18 | 14 | 4 | 2024-09-24 +MI | 19 | 15 | 4 | 2024-10-07 MN | 6 | 0 | 6 | 2024-07-02 MO | 3 | 1 | 2 | 2024-09-10 NC | 2 | 0 | 2 | 2024-09-24 @@ -43,7 +43,7 @@ OR | 1 | 0 | 1 TX | 2 | 1 | 1 | 2024-06-05 UT | 1 | 0 | 1 | 2024-05-02 VA | 2 | 0 | 2 | 2024-07-02 -WI | 89 | 7 | 82 | 2024-09-24 +WI | 103 | 10 | 93 | 2024-10-07 ## Sampling Dairy Products for HPAI RNA From 9e6335a449338814641c3a8558d4c247f7426eeb Mon Sep 17 00:00:00 2001 From: Nicholas Minor Date: Mon, 21 Oct 2024 12:31:14 -0500 Subject: [PATCH 05/29] fixed issue #40 --- DETECTION_RESULTS.tsv | 1 + 1 file changed, 1 insertion(+) diff --git a/DETECTION_RESULTS.tsv b/DETECTION_RESULTS.tsv index 1935577..e9367ca 100644 --- a/DETECTION_RESULTS.tsv +++ b/DETECTION_RESULTS.tsv @@ -216,4 +216,5 @@ dholab_30688_12 dholab_carton_0185 2024-10-07 2024-10-12 qPCR DHO_CN_H5specif dholab_30688_13 dholab_carton_0186 2024-10-07 qPCR 36.01 18.3 DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex TRUE WI dholab 2024-10-21 dholab_30688_14 dholab_carton_0187 2024-10-07 qPCR 35.7 23.2 DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex TRUE WI dholab 2024-10-21 dholab_30688_15 dholab_carton_0188 2024-10-07 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 +dholab_30688_16 dholab_carton_0189 2024-10-07 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 dholab_30688_17 dholab_carton_0190 2024-10-07 qPCR 34.095 77.6 DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex TRUE WI dholab 2024-10-21 From d252eb2a5050ac4a4e6da8bb6b5f94290de29a0c Mon Sep 17 00:00:00 2001 From: Nicholas Minor Date: Mon, 21 Oct 2024 12:33:21 -0500 Subject: [PATCH 06/29] tweak to prompt github workflows to rerun --- DETECTION_RESULTS.tsv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DETECTION_RESULTS.tsv b/DETECTION_RESULTS.tsv index e9367ca..284e3af 100644 --- a/DETECTION_RESULTS.tsv +++ b/DETECTION_RESULTS.tsv @@ -216,5 +216,5 @@ dholab_30688_12 dholab_carton_0185 2024-10-07 2024-10-12 qPCR DHO_CN_H5specif dholab_30688_13 dholab_carton_0186 2024-10-07 qPCR 36.01 18.3 DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex TRUE WI dholab 2024-10-21 dholab_30688_14 dholab_carton_0187 2024-10-07 qPCR 35.7 23.2 DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex TRUE WI dholab 2024-10-21 dholab_30688_15 dholab_carton_0188 2024-10-07 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 -dholab_30688_16 dholab_carton_0189 2024-10-07 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 dholab_30688_17 dholab_carton_0190 2024-10-07 qPCR 34.095 77.6 DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex TRUE WI dholab 2024-10-21 +dholab_30688_16 dholab_carton_0189 2024-10-07 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 From 278baeeca6f9bcb524b188a4062f32e1d623c928 Mon Sep 17 00:00:00 2001 From: Nicholas Minor Date: Mon, 21 Oct 2024 12:41:47 -0500 Subject: [PATCH 07/29] manually updating positivity tally before merging so that github workflows will be on track --- assets/positivity_tally.tsv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/positivity_tally.tsv b/assets/positivity_tally.tsv index 4b9a14d..838b5bc 100644 --- a/assets/positivity_tally.tsv +++ b/assets/positivity_tally.tsv @@ -18,4 +18,4 @@ OR 1 0 1 2024-05-20 TX 2 1 1 2024-06-05 UT 1 0 1 2024-05-02 VA 2 0 2 2024-07-02 -WI 103 10 93 2024-10-07 +WI 104 10 93 2024-10-07 From bad8ac8a9df1521a819fef2ba313407c33a74b67 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Mon, 21 Oct 2024 17:42:22 +0000 Subject: [PATCH 08/29] Updated the README file --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 19d7e73..719e6ea 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ OR | 1 | 0 | 1 TX | 2 | 1 | 1 | 2024-06-05 UT | 1 | 0 | 1 | 2024-05-02 VA | 2 | 0 | 2 | 2024-07-02 -WI | 103 | 10 | 93 | 2024-10-07 +WI | 104 | 10 | 93 | 2024-10-07 ## Sampling Dairy Products for HPAI RNA From cd0d149ae0de51f4508ca902d52ff207ea22ccfb Mon Sep 17 00:00:00 2001 From: Nicholas Minor Date: Mon, 21 Oct 2024 12:47:33 -0500 Subject: [PATCH 09/29] reverting to previous version of positivity tally --- DETECTION_RESULTS.tsv | 16 ---------------- assets/positivity_tally.tsv | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/DETECTION_RESULTS.tsv b/DETECTION_RESULTS.tsv index 284e3af..f2be2a7 100644 --- a/DETECTION_RESULTS.tsv +++ b/DETECTION_RESULTS.tsv @@ -202,19 +202,3 @@ dholab_30642_13 dholab_carton_0170 2024-09-24 2024-10-31 qPCR DHO_CN_H5specif dholab_30642_14 dholab_carton_0171 2024-09-24 2024-10-31 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE CO dholab 2024-10-07 dholab_30642_15 dholab_carton_0172 2024-09-24 2024-10-01 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-07 dholab_30642_16 dholab_carton_0173 2024-09-24 2024-11-29 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE CO dholab 2024-10-07 -dholab_30688_01 dholab_carton_0174 2024-10-07 2024-10-17 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE CO dholab 2024-10-21 -dholab_30688_02 dholab_carton_0175 2024-10-07 2024-12-07 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 -dholab_30688_03 dholab_carton_0176 2024-10-07 2024-10-14 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 -dholab_30688_04 dholab_carton_0177 2024-10-07 2024-10-17 qPCR 33.16 156.5 DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex TRUE MI dholab 2024-10-21 -dholab_30688_05 dholab_carton_0178 2024-10-07 2024-12-06 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 -dholab_30688_06 dholab_carton_0179 2024-10-07 2024-11-02 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 -dholab_30688_07 dholab_carton_0180 2024-10-07 2024-11-07 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 -dholab_30688_08 dholab_carton_0181 2024-10-07 2024-11-07 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 -dholab_30688_10 dholab_carton_0183 2024-10-07 2024-11-19 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 -dholab_30688_11 dholab_carton_0184 2024-10-07 2024-10-12 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 -dholab_30688_12 dholab_carton_0185 2024-10-07 2024-10-12 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 -dholab_30688_13 dholab_carton_0186 2024-10-07 qPCR 36.01 18.3 DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex TRUE WI dholab 2024-10-21 -dholab_30688_14 dholab_carton_0187 2024-10-07 qPCR 35.7 23.2 DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex TRUE WI dholab 2024-10-21 -dholab_30688_15 dholab_carton_0188 2024-10-07 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 -dholab_30688_17 dholab_carton_0190 2024-10-07 qPCR 34.095 77.6 DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex TRUE WI dholab 2024-10-21 -dholab_30688_16 dholab_carton_0189 2024-10-07 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 diff --git a/assets/positivity_tally.tsv b/assets/positivity_tally.tsv index 838b5bc..c3284b2 100644 --- a/assets/positivity_tally.tsv +++ b/assets/positivity_tally.tsv @@ -18,4 +18,4 @@ OR 1 0 1 2024-05-20 TX 2 1 1 2024-06-05 UT 1 0 1 2024-05-02 VA 2 0 2 2024-07-02 -WI 104 10 93 2024-10-07 +WI 89 7 82 2024-09-24 From 8e845683ded5c48579788d08a58488146cf72e05 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Mon, 21 Oct 2024 17:47:50 +0000 Subject: [PATCH 10/29] Updating positivity tally --- assets/positivity_tally.tsv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/positivity_tally.tsv b/assets/positivity_tally.tsv index c3284b2..33f9440 100644 --- a/assets/positivity_tally.tsv +++ b/assets/positivity_tally.tsv @@ -1,6 +1,6 @@ Processing Plant State Total Cartons Positive Cartons Negative Cartons Latest Date Sampled CA 1 0 1 2024-05-20 -CO 13 9 4 2024-10-07 +CO 12 9 3 2024-09-24 FL 1 0 1 2024-05-20 IA 10 0 10 2024-07-30 ID 1 0 1 2024-05-20 @@ -8,7 +8,7 @@ IL 3 0 3 2024-06-17 IN 6 1 5 2024-07-02 KS 2 0 2 2024-07-02 KY 4 1 3 2024-07-02 -MI 19 15 4 2024-10-07 +MI 18 14 4 2024-09-24 MN 6 0 6 2024-07-02 MO 3 1 2 2024-09-10 NC 2 0 2 2024-09-24 From 7dc47614343be94a52536500df231311125025e4 Mon Sep 17 00:00:00 2001 From: Nicholas Minor Date: Mon, 21 Oct 2024 12:47:58 -0500 Subject: [PATCH 11/29] re-adding new detection results to make sure tallying is working correctly --- DETECTION_RESULTS.tsv | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/DETECTION_RESULTS.tsv b/DETECTION_RESULTS.tsv index f2be2a7..e9367ca 100644 --- a/DETECTION_RESULTS.tsv +++ b/DETECTION_RESULTS.tsv @@ -202,3 +202,19 @@ dholab_30642_13 dholab_carton_0170 2024-09-24 2024-10-31 qPCR DHO_CN_H5specif dholab_30642_14 dholab_carton_0171 2024-09-24 2024-10-31 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE CO dholab 2024-10-07 dholab_30642_15 dholab_carton_0172 2024-09-24 2024-10-01 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-07 dholab_30642_16 dholab_carton_0173 2024-09-24 2024-11-29 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE CO dholab 2024-10-07 +dholab_30688_01 dholab_carton_0174 2024-10-07 2024-10-17 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE CO dholab 2024-10-21 +dholab_30688_02 dholab_carton_0175 2024-10-07 2024-12-07 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 +dholab_30688_03 dholab_carton_0176 2024-10-07 2024-10-14 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 +dholab_30688_04 dholab_carton_0177 2024-10-07 2024-10-17 qPCR 33.16 156.5 DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex TRUE MI dholab 2024-10-21 +dholab_30688_05 dholab_carton_0178 2024-10-07 2024-12-06 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 +dholab_30688_06 dholab_carton_0179 2024-10-07 2024-11-02 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 +dholab_30688_07 dholab_carton_0180 2024-10-07 2024-11-07 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 +dholab_30688_08 dholab_carton_0181 2024-10-07 2024-11-07 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 +dholab_30688_10 dholab_carton_0183 2024-10-07 2024-11-19 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 +dholab_30688_11 dholab_carton_0184 2024-10-07 2024-10-12 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 +dholab_30688_12 dholab_carton_0185 2024-10-07 2024-10-12 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 +dholab_30688_13 dholab_carton_0186 2024-10-07 qPCR 36.01 18.3 DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex TRUE WI dholab 2024-10-21 +dholab_30688_14 dholab_carton_0187 2024-10-07 qPCR 35.7 23.2 DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex TRUE WI dholab 2024-10-21 +dholab_30688_15 dholab_carton_0188 2024-10-07 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 +dholab_30688_16 dholab_carton_0189 2024-10-07 qPCR DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex FALSE WI dholab 2024-10-21 +dholab_30688_17 dholab_carton_0190 2024-10-07 qPCR 34.095 77.6 DHO_CN_H5specific01_primers.fasta DHO_CN_H5specific01_probe.fasta 400ul sample added to MagMax wastewater ultra x96 isolation on Kingfisher Apex TRUE WI dholab 2024-10-21 From 7b7546a76e08633f1c4f267083e67eb037dc4f53 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Mon, 21 Oct 2024 17:48:21 +0000 Subject: [PATCH 12/29] Updating positivity tally --- assets/positivity_tally.tsv | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/positivity_tally.tsv b/assets/positivity_tally.tsv index 33f9440..4b9a14d 100644 --- a/assets/positivity_tally.tsv +++ b/assets/positivity_tally.tsv @@ -1,6 +1,6 @@ Processing Plant State Total Cartons Positive Cartons Negative Cartons Latest Date Sampled CA 1 0 1 2024-05-20 -CO 12 9 3 2024-09-24 +CO 13 9 4 2024-10-07 FL 1 0 1 2024-05-20 IA 10 0 10 2024-07-30 ID 1 0 1 2024-05-20 @@ -8,7 +8,7 @@ IL 3 0 3 2024-06-17 IN 6 1 5 2024-07-02 KS 2 0 2 2024-07-02 KY 4 1 3 2024-07-02 -MI 18 14 4 2024-09-24 +MI 19 15 4 2024-10-07 MN 6 0 6 2024-07-02 MO 3 1 2 2024-09-10 NC 2 0 2 2024-09-24 @@ -18,4 +18,4 @@ OR 1 0 1 2024-05-20 TX 2 1 1 2024-06-05 UT 1 0 1 2024-05-02 VA 2 0 2 2024-07-02 -WI 89 7 82 2024-09-24 +WI 103 10 93 2024-10-07 From 979203d31eaf0748be4e8ff1843bc613ffa7b34a Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Mon, 21 Oct 2024 17:48:37 +0000 Subject: [PATCH 13/29] Updated the README file --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 719e6ea..3269f03 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ To submit results of your own, read over our [proposal instructions](docs/propos Processing Plant State | Total Cartons | Positive Cartons | Negative Cartons | Latest Date Sampled ------------------------|-----------------|--------------------|--------------------|--------------------- CA | 1 | 0 | 1 | 2024-05-20 -CO | 13 | 9 | 4 | 2024-10-07 +CO | 12 | 9 | 3 | 2024-09-24 FL | 1 | 0 | 1 | 2024-05-20 IA | 10 | 0 | 10 | 2024-07-30 ID | 1 | 0 | 1 | 2024-05-20 @@ -33,7 +33,7 @@ IL | 3 | 0 | 3 IN | 6 | 1 | 5 | 2024-07-02 KS | 2 | 0 | 2 | 2024-07-02 KY | 4 | 1 | 3 | 2024-07-02 -MI | 19 | 15 | 4 | 2024-10-07 +MI | 18 | 14 | 4 | 2024-09-24 MN | 6 | 0 | 6 | 2024-07-02 MO | 3 | 1 | 2 | 2024-09-10 NC | 2 | 0 | 2 | 2024-09-24 @@ -43,7 +43,7 @@ OR | 1 | 0 | 1 TX | 2 | 1 | 1 | 2024-06-05 UT | 1 | 0 | 1 | 2024-05-02 VA | 2 | 0 | 2 | 2024-07-02 -WI | 104 | 10 | 93 | 2024-10-07 +WI | 89 | 7 | 82 | 2024-09-24 ## Sampling Dairy Products for HPAI RNA From a8a22b45570133ae3c3e56486ca15be80198fd36 Mon Sep 17 00:00:00 2001 From: Nicholas Minor Date: Mon, 21 Oct 2024 12:57:31 -0500 Subject: [PATCH 14/29] yet another attempt to rerun the workflows --- assets/positivity_tally.tsv | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/assets/positivity_tally.tsv b/assets/positivity_tally.tsv index 4b9a14d..8b13789 100644 --- a/assets/positivity_tally.tsv +++ b/assets/positivity_tally.tsv @@ -1,21 +1 @@ -Processing Plant State Total Cartons Positive Cartons Negative Cartons Latest Date Sampled -CA 1 0 1 2024-05-20 -CO 13 9 4 2024-10-07 -FL 1 0 1 2024-05-20 -IA 10 0 10 2024-07-30 -ID 1 0 1 2024-05-20 -IL 3 0 3 2024-06-17 -IN 6 1 5 2024-07-02 -KS 2 0 2 2024-07-02 -KY 4 1 3 2024-07-02 -MI 19 15 4 2024-10-07 -MN 6 0 6 2024-07-02 -MO 3 1 2 2024-09-10 -NC 2 0 2 2024-09-24 -NY 5 1 4 2024-09-24 -OH 3 0 3 2024-07-28 -OR 1 0 1 2024-05-20 -TX 2 1 1 2024-06-05 -UT 1 0 1 2024-05-02 -VA 2 0 2 2024-07-02 -WI 103 10 93 2024-10-07 + From 069c7e5b8e49ae9783b96003eb65ccfde626e701 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Mon, 21 Oct 2024 17:58:03 +0000 Subject: [PATCH 15/29] Updated the README file --- README.md | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 3269f03..bed199d 100644 --- a/README.md +++ b/README.md @@ -22,28 +22,8 @@ To submit results of your own, read over our [proposal instructions](docs/propos ## Positivity Tally by State -Processing Plant State | Total Cartons | Positive Cartons | Negative Cartons | Latest Date Sampled -------------------------|-----------------|--------------------|--------------------|--------------------- -CA | 1 | 0 | 1 | 2024-05-20 -CO | 12 | 9 | 3 | 2024-09-24 -FL | 1 | 0 | 1 | 2024-05-20 -IA | 10 | 0 | 10 | 2024-07-30 -ID | 1 | 0 | 1 | 2024-05-20 -IL | 3 | 0 | 3 | 2024-06-17 -IN | 6 | 1 | 5 | 2024-07-02 -KS | 2 | 0 | 2 | 2024-07-02 -KY | 4 | 1 | 3 | 2024-07-02 -MI | 18 | 14 | 4 | 2024-09-24 -MN | 6 | 0 | 6 | 2024-07-02 -MO | 3 | 1 | 2 | 2024-09-10 -NC | 2 | 0 | 2 | 2024-09-24 -NY | 5 | 1 | 4 | 2024-09-24 -OH | 3 | 0 | 3 | 2024-07-28 -OR | 1 | 0 | 1 | 2024-05-20 -TX | 2 | 1 | 1 | 2024-06-05 -UT | 1 | 0 | 1 | 2024-05-02 -VA | 2 | 0 | 2 | 2024-07-02 -WI | 89 | 7 | 82 | 2024-09-24 + + ## Sampling Dairy Products for HPAI RNA From f385656a7e39a15dfce0024a7ef1b9c8b4e779f7 Mon Sep 17 00:00:00 2001 From: Nicholas Minor Date: Mon, 21 Oct 2024 13:08:48 -0500 Subject: [PATCH 16/29] updating github readme workflow to run with any intermediate commits --- .github/workflows/generate_and_render_readme.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_and_render_readme.yml b/.github/workflows/generate_and_render_readme.yml index a40fd0f..0bbe851 100644 --- a/.github/workflows/generate_and_render_readme.yml +++ b/.github/workflows/generate_and_render_readme.yml @@ -22,11 +22,12 @@ jobs: steps: - name: Checkout Code uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v4 with: - fetch-depth: 0 python-version: "3.11" - name: Install Dependencies @@ -60,11 +61,17 @@ jobs: steps: - name: Checkout Code uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Pull latest changes from proposals + run: | + git fetch origin proposals + git pull origin proposals - name: Set up Python uses: actions/setup-python@v4 with: - fetch-depth: 0 python-version: "3.11" - name: Install Dependencies From 62bcd84cc5bcda1ec2f6f44b05fc16a52c9a8455 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Mon, 21 Oct 2024 18:09:06 +0000 Subject: [PATCH 17/29] Updating positivity tally --- assets/positivity_tally.tsv | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/assets/positivity_tally.tsv b/assets/positivity_tally.tsv index 8b13789..4b9a14d 100644 --- a/assets/positivity_tally.tsv +++ b/assets/positivity_tally.tsv @@ -1 +1,21 @@ - +Processing Plant State Total Cartons Positive Cartons Negative Cartons Latest Date Sampled +CA 1 0 1 2024-05-20 +CO 13 9 4 2024-10-07 +FL 1 0 1 2024-05-20 +IA 10 0 10 2024-07-30 +ID 1 0 1 2024-05-20 +IL 3 0 3 2024-06-17 +IN 6 1 5 2024-07-02 +KS 2 0 2 2024-07-02 +KY 4 1 3 2024-07-02 +MI 19 15 4 2024-10-07 +MN 6 0 6 2024-07-02 +MO 3 1 2 2024-09-10 +NC 2 0 2 2024-09-24 +NY 5 1 4 2024-09-24 +OH 3 0 3 2024-07-28 +OR 1 0 1 2024-05-20 +TX 2 1 1 2024-06-05 +UT 1 0 1 2024-05-02 +VA 2 0 2 2024-07-02 +WI 103 10 93 2024-10-07 From d75356a29478c90c2c31144cf50a4a122fc3c791 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Mon, 21 Oct 2024 18:09:22 +0000 Subject: [PATCH 18/29] Updated the README file --- README.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bed199d..19d7e73 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,28 @@ To submit results of your own, read over our [proposal instructions](docs/propos ## Positivity Tally by State - - +Processing Plant State | Total Cartons | Positive Cartons | Negative Cartons | Latest Date Sampled +------------------------|-----------------|--------------------|--------------------|--------------------- +CA | 1 | 0 | 1 | 2024-05-20 +CO | 13 | 9 | 4 | 2024-10-07 +FL | 1 | 0 | 1 | 2024-05-20 +IA | 10 | 0 | 10 | 2024-07-30 +ID | 1 | 0 | 1 | 2024-05-20 +IL | 3 | 0 | 3 | 2024-06-17 +IN | 6 | 1 | 5 | 2024-07-02 +KS | 2 | 0 | 2 | 2024-07-02 +KY | 4 | 1 | 3 | 2024-07-02 +MI | 19 | 15 | 4 | 2024-10-07 +MN | 6 | 0 | 6 | 2024-07-02 +MO | 3 | 1 | 2 | 2024-09-10 +NC | 2 | 0 | 2 | 2024-09-24 +NY | 5 | 1 | 4 | 2024-09-24 +OH | 3 | 0 | 3 | 2024-07-28 +OR | 1 | 0 | 1 | 2024-05-20 +TX | 2 | 1 | 1 | 2024-06-05 +UT | 1 | 0 | 1 | 2024-05-02 +VA | 2 | 0 | 2 | 2024-07-02 +WI | 103 | 10 | 93 | 2024-10-07 ## Sampling Dairy Products for HPAI RNA From 698d271fb33ba900779d7fb2ac8e0c1a461ad638 Mon Sep 17 00:00:00 2001 From: Nicholas Minor Date: Mon, 21 Oct 2024 14:37:06 -0500 Subject: [PATCH 19/29] overhauling the positive tally counter script --- assets/positivity_tally.tsv | 22 +-- scripts/__init__.py | 0 scripts/__main__.py | 0 scripts/normalize.py | 0 scripts/positivity_tally.py | 271 ++++++++++++++++++++++++++---------- scripts/splice_readme.py | 0 scripts/tsv_to_md.py | 0 7 files changed, 200 insertions(+), 93 deletions(-) mode change 100644 => 100755 scripts/__init__.py mode change 100644 => 100755 scripts/__main__.py mode change 100644 => 100755 scripts/normalize.py mode change 100644 => 100755 scripts/positivity_tally.py mode change 100644 => 100755 scripts/splice_readme.py mode change 100644 => 100755 scripts/tsv_to_md.py diff --git a/assets/positivity_tally.tsv b/assets/positivity_tally.tsv index 4b9a14d..8b13789 100644 --- a/assets/positivity_tally.tsv +++ b/assets/positivity_tally.tsv @@ -1,21 +1 @@ -Processing Plant State Total Cartons Positive Cartons Negative Cartons Latest Date Sampled -CA 1 0 1 2024-05-20 -CO 13 9 4 2024-10-07 -FL 1 0 1 2024-05-20 -IA 10 0 10 2024-07-30 -ID 1 0 1 2024-05-20 -IL 3 0 3 2024-06-17 -IN 6 1 5 2024-07-02 -KS 2 0 2 2024-07-02 -KY 4 1 3 2024-07-02 -MI 19 15 4 2024-10-07 -MN 6 0 6 2024-07-02 -MO 3 1 2 2024-09-10 -NC 2 0 2 2024-09-24 -NY 5 1 4 2024-09-24 -OH 3 0 3 2024-07-28 -OR 1 0 1 2024-05-20 -TX 2 1 1 2024-06-05 -UT 1 0 1 2024-05-02 -VA 2 0 2 2024-07-02 -WI 103 10 93 2024-10-07 + diff --git a/scripts/__init__.py b/scripts/__init__.py old mode 100644 new mode 100755 diff --git a/scripts/__main__.py b/scripts/__main__.py old mode 100644 new mode 100755 diff --git a/scripts/normalize.py b/scripts/normalize.py old mode 100644 new mode 100755 diff --git a/scripts/positivity_tally.py b/scripts/positivity_tally.py old mode 100644 new mode 100755 index d3788a6..f104deb --- a/scripts/positivity_tally.py +++ b/scripts/positivity_tally.py @@ -1,106 +1,233 @@ #!/usr/bin/env python3 """ -Python Script to Generate the positivity_tally.tsv from DETECTION_RESULTS.tsv for display on Github. +This script processes detection results for HPAI (Highly Pathogenic Avian Influenza) and generates a summary report. + +Usage: + python positivity_tally.py + +Arguments: + : Path to the input TSV file containing detection results. + : Path where the output TSV file will be saved. + +Input file format: + The input file should be a tab-separated values (TSV) file with the following columns: + - date_purchased: Date of purchase (will be converted to a date object) + - processing_plant_state: State where the processing plant is located + - carton: Carton identifier + - positive_for_HPAI: Boolean indicating whether the sample tested positive for HPAI + +Output: + The script will generate a TSV file with the following columns: + - Processing Plant State: State where the processing plant is located + - Total Cartons: Total number of cartons tested + - Positive Cartons: Number of cartons that tested positive for HPAI + - Negative Cartons: Number of cartons that tested negative for HPAI + - Latest Date Sampled: Most recent date when samples were taken for each state + +Required libraries: + - polars + +Example: + python positivity_tally.py input_data.tsv output_summary.tsv """ import sys -import pandas as pd +import polars as pl -## Function to count unique strings in column 'carton' by a specific condition in column 'positive_for_HPAI' and sum by column 'processing_plant_state' -def count_unique_by_condition(df, condition): - filtered_df = df[df["positive_for_HPAI"] == condition] - unique_counts = ( - filtered_df.groupby("processing_plant_state")["carton"].nunique().reset_index() +def parse_input_results(detection_results: str) -> pl.LazyFrame: + """ + Parse input results from a TSV file and apply transformations. + + This function reads a TSV file containing detection results, + converts the date_purchased column to a date column, and + renames the processing_plant_state column. + + Args: + detection_results (str): Path to the input TSV file. + + Returns: + pl.LazyFrame: A LazyFrame with the parsed and transformed data. + """ + return ( + pl.scan_csv(detection_results, separator="\t", infer_schema_length=1000) + .with_columns( + pl.col("date_purchased").str.to_date().alias("date_purchased"), + ) + .rename({"processing_plant_state": "Processing Plant State"}) ) - unique_counts.columns = ["processing_plant_state", f"Unique_Counts_{condition}"] - return unique_counts -def count_unique_cartons(df): - unique_counts = ( - df.groupby("processing_plant_state")["carton"].nunique().reset_index() + +def tally_all_cartons(detections: pl.LazyFrame) -> pl.LazyFrame: + """ + Tally all cartons in the detection results. + + This function counts the total number of cartons for each processing plant state. + + Args: + detections (pl.LazyFrame): A LazyFrame containing the detection results. + + Returns: + pl.LazyFrame: A LazyFrame with the total carton count for each state. + """ + return ( + detections.select("Processing Plant State", "carton") + .group_by("Processing Plant State") + .len() + .rename({"len": "Total Cartons"}) ) - unique_counts.columns = ["processing_plant_state", "Unique_Counts_Total"] - return unique_counts -def main() -> None: +def count_positive_detections(detections: pl.LazyFrame) -> pl.LazyFrame: """ - script entrypoint + Count the number of positive HPAI detections for each processing plant state. + + This function filters the detections for positive HPAI results, + counts the number of positive cartons for each state, and renames + the resulting column. + + Args: + detections (pl.LazyFrame): A LazyFrame containing the detection results. + + Returns: + pl.LazyFrame: A LazyFrame with the positive carton count for each state. """ + return ( + detections.filter(pl.col("positive_for_HPAI").eq(True)) # noqa: FBT003 + .select("Processing Plant State", "carton") + .group_by("Processing Plant State") + .len() # this should be changed to `.n_unique()` for unique cartons only + .rename({"len": "Positive Cartons"}) + ) - detection_results = sys.argv[1] - output_path = sys.argv[2] - ## Read in the DETECTION_RESULTS.tsv after pulling the latest version from github (https://github.com/dholab/dairy-hpai-monitoring) - df = pd.read_csv(detection_results, sep="\t") +def count_negative_detections(detections: pl.LazyFrame) -> pl.LazyFrame: + """ + Count the number of negative HPAI detections for each processing plant state. - ## Convert the date column to datetime format - df["date_purchased"] = pd.to_datetime(df["date_purchased"]) + This function filters the detections for negative HPAI results, + counts the number of negative cartons for each state, and renames + the resulting column. - ## Make sure needed columns are in string format - columns_to_convert = ["positive_for_HPAI", "processing_plant_state", "carton"] - df[columns_to_convert] = df[columns_to_convert].astype(str) + Args: + detections (pl.LazyFrame): A LazyFrame containing the detection results. + + Returns: + pl.LazyFrame: A LazyFrame with the negative carton count for each state. + """ + return ( + detections.filter(pl.col("positive_for_HPAI").eq(False)) # noqa: FBT003 + .select("Processing Plant State", "carton") + .group_by("Processing Plant State") + .len() # this should be changed to `.n_unique()` for unique cartons only + .rename({"len": "Negative Cartons"}) + ) - ## Count for True - true_counts = count_unique_by_condition(df, "True") - ## Count for Total - total_counts = count_unique_cartons(df) +def find_latest_sampling_dates(detections: pl.LazyFrame) -> pl.LazyFrame: + """ + Find the latest sampling dates for each processing plant state. - ## Merge the results into the results dataframe - results_df = pd.merge( - total_counts, true_counts, on="processing_plant_state", how="outer" - ).fillna(0) + This function groups the detections by processing plant state, + finds the maximum (latest) date for each state, and renames + the result column. - ## Rename the columns to match the required format - results_df.columns = [ - "Processing Plant State", - "Total Cartons", - "Positive Cartons", - ] + Args: + detections (pl.LazyFrame): A LazyFrame containing the detection results. - ## Calculate column "Negative Cartons" as the difference of columns "Total Cartons" and "Positive Cartons" - results_df["Negative Cartons"] = ( - results_df["Total Cartons"] - results_df["Positive Cartons"] + Returns: + pl.LazyFrame: A LazyFrame with the latest sampling date for each state. + """ + return ( + detections.select("Processing Plant State", "date_purchased") + .group_by("Processing Plant State") + .max() + .rename({"date_purchased": "Latest Date Sampled"}) ) - ## Find the latest date for each unique string in column "date_purchased" - latest_dates = ( - df.groupby("processing_plant_state")["date_purchased"].max().reset_index() + +def generate_final_results( + total_tested: pl.LazyFrame, + negative_counts: pl.LazyFrame, + positive_counts: pl.LazyFrame, + latest_dates: pl.LazyFrame, +) -> pl.LazyFrame: + """ + Generate final results by joining different LazyFrames. + + This function takes four LazyFrames containing different aspects of the + detection results and joins them together to create a final result set. + It also applies some additional transformations to the data. + + Args: + total_tested (pl.LazyFrame): LazyFrame with total carton counts. + negative_counts (pl.LazyFrame): LazyFrame with negative detection counts. + positive_counts (pl.LazyFrame): LazyFrame with positive detection counts. + latest_dates (pl.LazyFrame): LazyFrame with latest sampling dates. + + Returns: + pl.LazyFrame: A LazyFrame with the final combined results. + """ + return ( + total_tested.join( + positive_counts, + on="Processing Plant State", + how="left", + validate="1:1", + ) + .join( + negative_counts, + on="Processing Plant State", + how="left", + validate="1:1", + ) + .join( + latest_dates, + on="Processing Plant State", + how="left", + validate="1:1", + ) + .fill_null(0) + .sort("Processing Plant State") ) - latest_dates.columns = ["Processing Plant State", "Latest Date Sampled"] - ## Merge the latest dates into the "Results DataFrame" - results_df = pd.merge( - results_df, latest_dates, on="Processing Plant State", how="left" + +def main() -> None: + """ + Script entrypoint + """ + # pull input and output information from the command line + detection_results = sys.argv[1] + output_path = sys.argv[2] + + # parse the input detection results + detections = parse_input_results(detection_results) + + # determine how many cartons were tested + total_tested = tally_all_cartons(detections) + + # count positive detections + positive_counts = count_positive_detections(detections) + + # count negative detections + negative_counts = count_negative_detections(detections) + + # count the latest dates in which testing occurred for each state + latest_dates = find_latest_sampling_dates(detections) + + # use a series of left joins to generate the final results that will be written + # out to a TSV + final_results = generate_final_results( + total_tested, + positive_counts, + negative_counts, + latest_dates, ) - ## Rearrange columns - sorted_results_df = results_df[ - [ - "Processing Plant State", - "Total Cartons", - "Negative Cartons", - "Positive Cartons", - "Latest Date Sampled", - ] - ] - - ## Sort the results DataFrame alphabetically by state - sorted_results_df = results_df.sort_values(by="Processing Plant State") - - # Make all the numbers integers so we don't have to bother with float formatting - int_cols = ["Total Cartons", - "Negative Cartons", - "Positive Cartons", - ] - sorted_results_df[int_cols] = sorted_results_df[int_cols].astype(int) - - ## Save sorted_results_df as a tsv file - sorted_results_df.to_csv(output_path, sep="\t", index=False) + # do the writing + final_results.sink_csv(output_path, separator="\t") if __name__ == "__main__": diff --git a/scripts/splice_readme.py b/scripts/splice_readme.py old mode 100644 new mode 100755 diff --git a/scripts/tsv_to_md.py b/scripts/tsv_to_md.py old mode 100644 new mode 100755 From ec3d9caabb4f903cbd23572e0ddf32520d8ef3bf Mon Sep 17 00:00:00 2001 From: Nicholas Minor Date: Mon, 21 Oct 2024 14:38:41 -0500 Subject: [PATCH 20/29] heeding a polars exception about lazy csv writing --- scripts/positivity_tally.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/positivity_tally.py b/scripts/positivity_tally.py index f104deb..65ce0b4 100755 --- a/scripts/positivity_tally.py +++ b/scripts/positivity_tally.py @@ -227,7 +227,7 @@ def main() -> None: ) # do the writing - final_results.sink_csv(output_path, separator="\t") + final_results.collect().write_csv(output_path, separator="\t") if __name__ == "__main__": From 84a13395b7bc994f5ed78c22ceb1ff65fec24bfd Mon Sep 17 00:00:00 2001 From: Nicholas Minor Date: Mon, 21 Oct 2024 14:39:53 -0500 Subject: [PATCH 21/29] rerunning positivity tallying --- assets/positivity_tally.tsv | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/assets/positivity_tally.tsv b/assets/positivity_tally.tsv index 8b13789..4b9a14d 100644 --- a/assets/positivity_tally.tsv +++ b/assets/positivity_tally.tsv @@ -1 +1,21 @@ - +Processing Plant State Total Cartons Positive Cartons Negative Cartons Latest Date Sampled +CA 1 0 1 2024-05-20 +CO 13 9 4 2024-10-07 +FL 1 0 1 2024-05-20 +IA 10 0 10 2024-07-30 +ID 1 0 1 2024-05-20 +IL 3 0 3 2024-06-17 +IN 6 1 5 2024-07-02 +KS 2 0 2 2024-07-02 +KY 4 1 3 2024-07-02 +MI 19 15 4 2024-10-07 +MN 6 0 6 2024-07-02 +MO 3 1 2 2024-09-10 +NC 2 0 2 2024-09-24 +NY 5 1 4 2024-09-24 +OH 3 0 3 2024-07-28 +OR 1 0 1 2024-05-20 +TX 2 1 1 2024-06-05 +UT 1 0 1 2024-05-02 +VA 2 0 2 2024-07-02 +WI 103 10 93 2024-10-07 From e5812ca1ba812217170e1dc0bf2c96b09deb3604 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Mon, 21 Oct 2024 19:40:08 +0000 Subject: [PATCH 22/29] Updating positivity tally --- assets/positivity_tally.tsv | 42 ++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/assets/positivity_tally.tsv b/assets/positivity_tally.tsv index 4b9a14d..fdac1b7 100644 --- a/assets/positivity_tally.tsv +++ b/assets/positivity_tally.tsv @@ -1,21 +1,21 @@ -Processing Plant State Total Cartons Positive Cartons Negative Cartons Latest Date Sampled -CA 1 0 1 2024-05-20 -CO 13 9 4 2024-10-07 -FL 1 0 1 2024-05-20 -IA 10 0 10 2024-07-30 -ID 1 0 1 2024-05-20 -IL 3 0 3 2024-06-17 -IN 6 1 5 2024-07-02 -KS 2 0 2 2024-07-02 -KY 4 1 3 2024-07-02 -MI 19 15 4 2024-10-07 -MN 6 0 6 2024-07-02 -MO 3 1 2 2024-09-10 -NC 2 0 2 2024-09-24 -NY 5 1 4 2024-09-24 -OH 3 0 3 2024-07-28 -OR 1 0 1 2024-05-20 -TX 2 1 1 2024-06-05 -UT 1 0 1 2024-05-02 -VA 2 0 2 2024-07-02 -WI 103 10 93 2024-10-07 +Processing Plant State Total Cartons Negative Cartons Positive Cartons Latest Date Sampled +CA 1 1 0 2024-05-20 +CO 24 10 14 2024-10-07 +FL 1 1 0 2024-05-20 +IA 10 10 0 2024-07-30 +ID 1 1 0 2024-05-20 +IL 3 3 0 2024-06-17 +IN 6 5 1 2024-07-02 +KS 2 2 0 2024-07-02 +KY 6 3 3 2024-07-02 +MI 31 5 26 2024-10-07 +MN 6 6 0 2024-07-02 +MO 4 2 2 2024-09-10 +NC 2 2 0 2024-09-24 +NY 6 4 2 2024-09-24 +OH 5 5 0 2024-07-28 +OR 1 1 0 2024-05-20 +TX 3 1 2 2024-06-05 +UT 1 1 0 2024-05-02 +VA 2 2 0 2024-07-02 +WI 104 93 11 2024-10-07 From 9f2671fec6dbeedbf2106dbc9d22e1842a25da5e Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Mon, 21 Oct 2024 19:40:23 +0000 Subject: [PATCH 23/29] Updated the README file --- README.md | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 19d7e73..1a0a5fa 100644 --- a/README.md +++ b/README.md @@ -22,28 +22,28 @@ To submit results of your own, read over our [proposal instructions](docs/propos ## Positivity Tally by State -Processing Plant State | Total Cartons | Positive Cartons | Negative Cartons | Latest Date Sampled +Processing Plant State | Total Cartons | Negative Cartons | Positive Cartons | Latest Date Sampled ------------------------|-----------------|--------------------|--------------------|--------------------- -CA | 1 | 0 | 1 | 2024-05-20 -CO | 13 | 9 | 4 | 2024-10-07 -FL | 1 | 0 | 1 | 2024-05-20 -IA | 10 | 0 | 10 | 2024-07-30 -ID | 1 | 0 | 1 | 2024-05-20 -IL | 3 | 0 | 3 | 2024-06-17 -IN | 6 | 1 | 5 | 2024-07-02 -KS | 2 | 0 | 2 | 2024-07-02 -KY | 4 | 1 | 3 | 2024-07-02 -MI | 19 | 15 | 4 | 2024-10-07 -MN | 6 | 0 | 6 | 2024-07-02 -MO | 3 | 1 | 2 | 2024-09-10 -NC | 2 | 0 | 2 | 2024-09-24 -NY | 5 | 1 | 4 | 2024-09-24 -OH | 3 | 0 | 3 | 2024-07-28 -OR | 1 | 0 | 1 | 2024-05-20 -TX | 2 | 1 | 1 | 2024-06-05 -UT | 1 | 0 | 1 | 2024-05-02 -VA | 2 | 0 | 2 | 2024-07-02 -WI | 103 | 10 | 93 | 2024-10-07 +CA | 1 | 1 | 0 | 2024-05-20 +CO | 24 | 10 | 14 | 2024-10-07 +FL | 1 | 1 | 0 | 2024-05-20 +IA | 10 | 10 | 0 | 2024-07-30 +ID | 1 | 1 | 0 | 2024-05-20 +IL | 3 | 3 | 0 | 2024-06-17 +IN | 6 | 5 | 1 | 2024-07-02 +KS | 2 | 2 | 0 | 2024-07-02 +KY | 6 | 3 | 3 | 2024-07-02 +MI | 31 | 5 | 26 | 2024-10-07 +MN | 6 | 6 | 0 | 2024-07-02 +MO | 4 | 2 | 2 | 2024-09-10 +NC | 2 | 2 | 0 | 2024-09-24 +NY | 6 | 4 | 2 | 2024-09-24 +OH | 5 | 5 | 0 | 2024-07-28 +OR | 1 | 1 | 0 | 2024-05-20 +TX | 3 | 1 | 2 | 2024-06-05 +UT | 1 | 1 | 0 | 2024-05-02 +VA | 2 | 2 | 0 | 2024-07-02 +WI | 104 | 93 | 11 | 2024-10-07 ## Sampling Dairy Products for HPAI RNA From 5a20602b7a883b915a086426c6d43825d563cdbe Mon Sep 17 00:00:00 2001 From: Nicholas Minor Date: Mon, 21 Oct 2024 16:21:03 -0500 Subject: [PATCH 24/29] reverting to unique carton counts --- assets/positivity_tally.tsv | 22 +--------------------- scripts/positivity_tally.py | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 31 deletions(-) diff --git a/assets/positivity_tally.tsv b/assets/positivity_tally.tsv index fdac1b7..8b13789 100644 --- a/assets/positivity_tally.tsv +++ b/assets/positivity_tally.tsv @@ -1,21 +1 @@ -Processing Plant State Total Cartons Negative Cartons Positive Cartons Latest Date Sampled -CA 1 1 0 2024-05-20 -CO 24 10 14 2024-10-07 -FL 1 1 0 2024-05-20 -IA 10 10 0 2024-07-30 -ID 1 1 0 2024-05-20 -IL 3 3 0 2024-06-17 -IN 6 5 1 2024-07-02 -KS 2 2 0 2024-07-02 -KY 6 3 3 2024-07-02 -MI 31 5 26 2024-10-07 -MN 6 6 0 2024-07-02 -MO 4 2 2 2024-09-10 -NC 2 2 0 2024-09-24 -NY 6 4 2 2024-09-24 -OH 5 5 0 2024-07-28 -OR 1 1 0 2024-05-20 -TX 3 1 2 2024-06-05 -UT 1 1 0 2024-05-02 -VA 2 2 0 2024-07-02 -WI 104 93 11 2024-10-07 + diff --git a/scripts/positivity_tally.py b/scripts/positivity_tally.py index 65ce0b4..d3ccb2c 100755 --- a/scripts/positivity_tally.py +++ b/scripts/positivity_tally.py @@ -1,7 +1,8 @@ #!/usr/bin/env python3 """ -This script processes detection results for HPAI (Highly Pathogenic Avian Influenza) and generates a summary report. +This script processes detection results for HPAI (Highly Pathogenic Avian Influenza) +and generates a summary report. Usage: python positivity_tally.py @@ -20,9 +21,9 @@ Output: The script will generate a TSV file with the following columns: - Processing Plant State: State where the processing plant is located - - Total Cartons: Total number of cartons tested - - Positive Cartons: Number of cartons that tested positive for HPAI - - Negative Cartons: Number of cartons that tested negative for HPAI + - Total Cartons: Total number of unique cartons tested + - Positive Cartons: Number of unique cartons that tested positive for HPAI + - Negative Cartons: Number of unique cartons that tested negative for HPAI - Latest Date Sampled: Most recent date when samples were taken for each state Required libraries: @@ -64,7 +65,7 @@ def tally_all_cartons(detections: pl.LazyFrame) -> pl.LazyFrame: """ Tally all cartons in the detection results. - This function counts the total number of cartons for each processing plant state. + This function counts the total number of unique cartons for each processing plant state. Args: detections (pl.LazyFrame): A LazyFrame containing the detection results. @@ -75,7 +76,7 @@ def tally_all_cartons(detections: pl.LazyFrame) -> pl.LazyFrame: return ( detections.select("Processing Plant State", "carton") .group_by("Processing Plant State") - .len() + .n_unique() .rename({"len": "Total Cartons"}) ) @@ -85,7 +86,7 @@ def count_positive_detections(detections: pl.LazyFrame) -> pl.LazyFrame: Count the number of positive HPAI detections for each processing plant state. This function filters the detections for positive HPAI results, - counts the number of positive cartons for each state, and renames + counts the number of unique positive cartons for each state, and renames the resulting column. Args: @@ -98,7 +99,7 @@ def count_positive_detections(detections: pl.LazyFrame) -> pl.LazyFrame: detections.filter(pl.col("positive_for_HPAI").eq(True)) # noqa: FBT003 .select("Processing Plant State", "carton") .group_by("Processing Plant State") - .len() # this should be changed to `.n_unique()` for unique cartons only + .n_unique() # this should be changed to `.n_unique()` for unique cartons only .rename({"len": "Positive Cartons"}) ) @@ -108,7 +109,7 @@ def count_negative_detections(detections: pl.LazyFrame) -> pl.LazyFrame: Count the number of negative HPAI detections for each processing plant state. This function filters the detections for negative HPAI results, - counts the number of negative cartons for each state, and renames + counts the number of unique negative cartons for each state, and renames the resulting column. Args: @@ -121,7 +122,7 @@ def count_negative_detections(detections: pl.LazyFrame) -> pl.LazyFrame: detections.filter(pl.col("positive_for_HPAI").eq(False)) # noqa: FBT003 .select("Processing Plant State", "carton") .group_by("Processing Plant State") - .len() # this should be changed to `.n_unique()` for unique cartons only + .n_unique() # this should be changed to `.n_unique()` for unique cartons only .rename({"len": "Negative Cartons"}) ) From 2cc86518f12aa27f9356d2c3a36ff7e5cdaccad7 Mon Sep 17 00:00:00 2001 From: Nicholas Minor Date: Mon, 21 Oct 2024 16:27:08 -0500 Subject: [PATCH 25/29] fixing a column mis-reference --- scripts/positivity_tally.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/positivity_tally.py b/scripts/positivity_tally.py index d3ccb2c..4998304 100755 --- a/scripts/positivity_tally.py +++ b/scripts/positivity_tally.py @@ -77,7 +77,7 @@ def tally_all_cartons(detections: pl.LazyFrame) -> pl.LazyFrame: detections.select("Processing Plant State", "carton") .group_by("Processing Plant State") .n_unique() - .rename({"len": "Total Cartons"}) + .rename({"carton": "Total Cartons"}) ) @@ -123,7 +123,7 @@ def count_negative_detections(detections: pl.LazyFrame) -> pl.LazyFrame: .select("Processing Plant State", "carton") .group_by("Processing Plant State") .n_unique() # this should be changed to `.n_unique()` for unique cartons only - .rename({"len": "Negative Cartons"}) + .rename({"carton": "Negative Cartons"}) ) From edd9aa60cf98d7f5e489107350adca62be7fda04 Mon Sep 17 00:00:00 2001 From: Nicholas Minor Date: Mon, 21 Oct 2024 16:27:08 -0500 Subject: [PATCH 26/29] fixing a column mis-reference --- assets/positivity_tally.tsv | 22 +++++++++++++++++++++- scripts/positivity_tally.py | 4 ++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/assets/positivity_tally.tsv b/assets/positivity_tally.tsv index 8b13789..4b9a14d 100644 --- a/assets/positivity_tally.tsv +++ b/assets/positivity_tally.tsv @@ -1 +1,21 @@ - +Processing Plant State Total Cartons Positive Cartons Negative Cartons Latest Date Sampled +CA 1 0 1 2024-05-20 +CO 13 9 4 2024-10-07 +FL 1 0 1 2024-05-20 +IA 10 0 10 2024-07-30 +ID 1 0 1 2024-05-20 +IL 3 0 3 2024-06-17 +IN 6 1 5 2024-07-02 +KS 2 0 2 2024-07-02 +KY 4 1 3 2024-07-02 +MI 19 15 4 2024-10-07 +MN 6 0 6 2024-07-02 +MO 3 1 2 2024-09-10 +NC 2 0 2 2024-09-24 +NY 5 1 4 2024-09-24 +OH 3 0 3 2024-07-28 +OR 1 0 1 2024-05-20 +TX 2 1 1 2024-06-05 +UT 1 0 1 2024-05-02 +VA 2 0 2 2024-07-02 +WI 103 10 93 2024-10-07 diff --git a/scripts/positivity_tally.py b/scripts/positivity_tally.py index d3ccb2c..4998304 100755 --- a/scripts/positivity_tally.py +++ b/scripts/positivity_tally.py @@ -77,7 +77,7 @@ def tally_all_cartons(detections: pl.LazyFrame) -> pl.LazyFrame: detections.select("Processing Plant State", "carton") .group_by("Processing Plant State") .n_unique() - .rename({"len": "Total Cartons"}) + .rename({"carton": "Total Cartons"}) ) @@ -123,7 +123,7 @@ def count_negative_detections(detections: pl.LazyFrame) -> pl.LazyFrame: .select("Processing Plant State", "carton") .group_by("Processing Plant State") .n_unique() # this should be changed to `.n_unique()` for unique cartons only - .rename({"len": "Negative Cartons"}) + .rename({"carton": "Negative Cartons"}) ) From a778bbe30f8391b63d1f6811bc0daffd07ca4ac8 Mon Sep 17 00:00:00 2001 From: Nicholas Minor Date: Mon, 21 Oct 2024 16:32:27 -0500 Subject: [PATCH 27/29] prompting another workflow run --- assets/positivity_tally.tsv | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/assets/positivity_tally.tsv b/assets/positivity_tally.tsv index 4b9a14d..8b13789 100644 --- a/assets/positivity_tally.tsv +++ b/assets/positivity_tally.tsv @@ -1,21 +1 @@ -Processing Plant State Total Cartons Positive Cartons Negative Cartons Latest Date Sampled -CA 1 0 1 2024-05-20 -CO 13 9 4 2024-10-07 -FL 1 0 1 2024-05-20 -IA 10 0 10 2024-07-30 -ID 1 0 1 2024-05-20 -IL 3 0 3 2024-06-17 -IN 6 1 5 2024-07-02 -KS 2 0 2 2024-07-02 -KY 4 1 3 2024-07-02 -MI 19 15 4 2024-10-07 -MN 6 0 6 2024-07-02 -MO 3 1 2 2024-09-10 -NC 2 0 2 2024-09-24 -NY 5 1 4 2024-09-24 -OH 3 0 3 2024-07-28 -OR 1 0 1 2024-05-20 -TX 2 1 1 2024-06-05 -UT 1 0 1 2024-05-02 -VA 2 0 2 2024-07-02 -WI 103 10 93 2024-10-07 + From f2c81cd3a279d95810870246a97487b469113861 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Mon, 21 Oct 2024 21:32:44 +0000 Subject: [PATCH 28/29] Updating positivity tally --- assets/positivity_tally.tsv | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/assets/positivity_tally.tsv b/assets/positivity_tally.tsv index 8b13789..8e7f806 100644 --- a/assets/positivity_tally.tsv +++ b/assets/positivity_tally.tsv @@ -1 +1,21 @@ - +Processing Plant State Total Cartons Negative Cartons Positive Cartons Latest Date Sampled +CA 1 1 0 2024-05-20 +CO 13 5 9 2024-10-07 +FL 1 1 0 2024-05-20 +IA 10 10 0 2024-07-30 +ID 1 1 0 2024-05-20 +IL 3 3 0 2024-06-17 +IN 6 5 1 2024-07-02 +KS 2 2 0 2024-07-02 +KY 4 3 1 2024-07-02 +MI 19 5 15 2024-10-07 +MN 6 6 0 2024-07-02 +MO 3 2 1 2024-09-10 +NC 2 2 0 2024-09-24 +NY 5 4 1 2024-09-24 +OH 3 3 0 2024-07-28 +OR 1 1 0 2024-05-20 +TX 2 1 1 2024-06-05 +UT 1 1 0 2024-05-02 +VA 2 2 0 2024-07-02 +WI 103 93 10 2024-10-07 From 5e3f78d084b2afdec3174d899b19348d977e9c01 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Mon, 21 Oct 2024 21:33:01 +0000 Subject: [PATCH 29/29] Updated the README file --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 1a0a5fa..10d58fa 100644 --- a/README.md +++ b/README.md @@ -25,25 +25,25 @@ To submit results of your own, read over our [proposal instructions](docs/propos Processing Plant State | Total Cartons | Negative Cartons | Positive Cartons | Latest Date Sampled ------------------------|-----------------|--------------------|--------------------|--------------------- CA | 1 | 1 | 0 | 2024-05-20 -CO | 24 | 10 | 14 | 2024-10-07 +CO | 13 | 5 | 9 | 2024-10-07 FL | 1 | 1 | 0 | 2024-05-20 IA | 10 | 10 | 0 | 2024-07-30 ID | 1 | 1 | 0 | 2024-05-20 IL | 3 | 3 | 0 | 2024-06-17 IN | 6 | 5 | 1 | 2024-07-02 KS | 2 | 2 | 0 | 2024-07-02 -KY | 6 | 3 | 3 | 2024-07-02 -MI | 31 | 5 | 26 | 2024-10-07 +KY | 4 | 3 | 1 | 2024-07-02 +MI | 19 | 5 | 15 | 2024-10-07 MN | 6 | 6 | 0 | 2024-07-02 -MO | 4 | 2 | 2 | 2024-09-10 +MO | 3 | 2 | 1 | 2024-09-10 NC | 2 | 2 | 0 | 2024-09-24 -NY | 6 | 4 | 2 | 2024-09-24 -OH | 5 | 5 | 0 | 2024-07-28 +NY | 5 | 4 | 1 | 2024-09-24 +OH | 3 | 3 | 0 | 2024-07-28 OR | 1 | 1 | 0 | 2024-05-20 -TX | 3 | 1 | 2 | 2024-06-05 +TX | 2 | 1 | 1 | 2024-06-05 UT | 1 | 1 | 0 | 2024-05-02 VA | 2 | 2 | 0 | 2024-07-02 -WI | 104 | 93 | 11 | 2024-10-07 +WI | 103 | 93 | 10 | 2024-10-07 ## Sampling Dairy Products for HPAI RNA