From e4d9e1a29e898af13fcf66e7a4b809d10016bd8e Mon Sep 17 00:00:00 2001 From: M Bernt Date: Sat, 13 Feb 2021 20:38:05 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Nicola Soranzo --- tools/filters/gff/gtf_filter_by_attribute_values_list.py | 3 +-- tools/filters/gff/gtf_filter_by_attribute_values_list.xml | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/filters/gff/gtf_filter_by_attribute_values_list.py b/tools/filters/gff/gtf_filter_by_attribute_values_list.py index cb641f40e05..8be10348557 100644 --- a/tools/filters/gff/gtf_filter_by_attribute_values_list.py +++ b/tools/filters/gff/gtf_filter_by_attribute_values_list.py @@ -60,9 +60,8 @@ def gff_filter(gff_file, attribute_name, ids_file, output_file): continue fields = line.split('\t') attributes = parse_gff_attributes(fields[8]) - if (attribute_name in attributes) and (attributes[attribute_name] in ids_dict): + if attribute_name in attributes and attributes[attribute_name] in ids_dict: output.write(line) - output.close() if __name__ == "__main__": diff --git a/tools/filters/gff/gtf_filter_by_attribute_values_list.xml b/tools/filters/gff/gtf_filter_by_attribute_values_list.xml index 9dee10a0dca..c75b12d65a2 100644 --- a/tools/filters/gff/gtf_filter_by_attribute_values_list.xml +++ b/tools/filters/gff/gtf_filter_by_attribute_values_list.xml @@ -1,8 +1,8 @@ - - python '$__tool_directory__/gtf_filter_by_attribute_values_list.py' '$input' '$attribute_name' '$ids' '$output' - +