From 7a34b048519ff0e3f009aecf0c71af19a4eb2ce0 Mon Sep 17 00:00:00 2001 From: whelena Date: Mon, 6 Jul 2020 17:08:46 -0700 Subject: [PATCH] add sample to match_on option in op.switch_on_column --- oncopipe/oncopipe/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/oncopipe/oncopipe/__init__.py b/oncopipe/oncopipe/__init__.py index 5816dbb2..34d3a1e1 100755 --- a/oncopipe/oncopipe/__init__.py +++ b/oncopipe/oncopipe/__init__.py @@ -420,6 +420,8 @@ def _switch_on_column( sample_id = wildcards.tumour_id elif match_on == "normal": sample_id = wildcards.normal_id + elif match_on == "sample": + sample_id = wildcards.sample_id else: raise ValueError("Invalid value for `match_on`.") subset = samples.loc[samples["seq_type"] == wildcards.seq_type]