mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-24 02:04:04 +08:00
Merge pull request #9433 from mvdbeek/fix_twobitfile_reading
[20.01] Fix TwoBitFile handle not opened in binary mode
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user