Commit 7e25a230 authored by Blaise Li's avatar Blaise Li
Browse files

Context-manage gff file opening.

parent fcfaae6c
......@@ -188,7 +188,7 @@ def id_list_gtf2bed(identifiers, gtf_filename, feature_type="transcript", id_kwd
in the feature annotations in the gtf_file. These feature IDs will be
matched against the elements in *identifiers*.
"""
gtf_file = open(gtf_filename, "r")
with open(gtf_filename, "r") as gtf_file:
gtf = BedTool(gtf_file)
if identifiers:
ids = set(identifiers)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment