From b1f29195d4e8339de26eb090ed633641f5c76979 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Al=C3=A1n=20Mu=C3=B1oz?= <amuoz@ed.ac.uk> Date: Mon, 20 Dec 2021 15:31:56 +0000 Subject: [PATCH] add support to index-based position --- aliby/pipeline.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/aliby/pipeline.py b/aliby/pipeline.py index b1d75dae..b4bc4315 100644 --- a/aliby/pipeline.py +++ b/aliby/pipeline.py @@ -146,9 +146,13 @@ class Pipeline(ProcessABC): # Filter TODO integrate filter onto class and add regex if isinstance(strain_filter, str): - image_ids = {k: v for k, v in image_ids.items() if k.startswith(strain_filter)} + image_ids = { + k: v for k, v in image_ids.items() if k.startswith(strain_filter) + } elif isinstance(strain_filter, int): - image_ids = {k:v for i,( k,v ) in enumerate( image_ids.items() ) if i==0} + image_ids = { + k: v for i, (k, v) in enumerate(image_ids.items()) if i == strain_filter + } if distributed != 0: # Gives the number of simultaneous processes with Pool(distributed) as p: -- GitLab