Merge pull request #9433 from mvdbeek/fix_twobitfile_reading

[20.01] Fix TwoBitFile handle not opened in binary mode
This commit is contained in:
Dannon
2020-02-25 09:56:16 -05:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -392,7 +392,7 @@ class Genomes(object):
# Read and return reference data.
try:
twobit = TwoBitFile(open(twobit_file_name))
twobit = TwoBitFile(open(twobit_file_name, 'rb'))
if chrom in twobit:
seq_data = twobit[chrom].get(int(low), int(high))
return GenomeRegion(chrom=chrom, start=low, end=high, sequence=seq_data)
+1 -1
View File
@@ -222,7 +222,7 @@ def __main__():
continue
elif seq_path and os.path.isfile(seq_path):
if not(twobitfile):
twobitfile = bx.seq.twobit.TwoBitFile(open(seq_path))
twobitfile = bx.seq.twobit.TwoBitFile(open(seq_path, 'rb'))
try:
if options.gff and interpret_features:
# Create sequence from intervals within a feature.