From 0f5e0be9ae74a968724d64df7c05bdec2996d8ef Mon Sep 17 00:00:00 2001 From: Sam Minot Date: Thu, 16 Feb 2023 16:23:04 -0800 Subject: [PATCH] Add results columns for max_ebs_hits and mean_ebs_hits (#55) --- templates/aggregate_organisms.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/aggregate_organisms.py b/templates/aggregate_organisms.py index 0dbe4fa..98758b7 100755 --- a/templates/aggregate_organisms.py +++ b/templates/aggregate_organisms.py @@ -326,6 +326,7 @@ def group_sample_organisms(self, df:pd.DataFrame, sample:str, organism:str) -> p for label, d in [ ("all", df), ("public", df.query("public")), + ("hits", df.query("hit == 'TRUE'")), ] if d.shape[0] > 0 for k, v in [ @@ -334,6 +335,7 @@ def group_sample_organisms(self, df:pd.DataFrame, sample:str, organism:str) -> p (f"max_ebs_{label}", d["EBS"].max()), (f"mean_ebs_{label}", d["EBS"].mean()) ] + if k not in ["n_hits_hits", "n_discordant_hits"] } }])