From 2003681107e353fe0f7737829872afdba0aec020 Mon Sep 17 00:00:00 2001 From: Redmar van den Berg Date: Tue, 2 Aug 2022 11:04:05 +0200 Subject: [PATCH] Refactor using maxsplit --- bin/fuma-gencode-gtf-to-bed | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/fuma-gencode-gtf-to-bed b/bin/fuma-gencode-gtf-to-bed index b8eff79..c40ca77 100755 --- a/bin/fuma-gencode-gtf-to-bed +++ b/bin/fuma-gencode-gtf-to-bed @@ -27,9 +27,8 @@ def attribute_to_dict(line): if not entry: continue # value can contain spaces - key, *value = entry.split() - # Put spaces back into value - value = ' '.join(value) + key, value = entry.split(maxsplit=1) + # value can contain quotes data[key] = value.replace('"','') return data