Mercurial > repos > devteam > ncbi_blast_plus
comparison tools/ncbi_blast_plus/check_no_duplicates.py @ 26:2889433c7ae1 draft
v0.3.3 - fixed legacy dependecy definition
author | peterjc |
---|---|
date | Sat, 20 Jul 2019 18:36:36 -0400 |
parents | 31e517610e1f |
children |
comparison
equal
deleted
inserted
replaced
25:e25d3acf6e68 | 26:2889433c7ae1 |
---|---|
29 with open(filename, "rb") as binary_handle: | 29 with open(filename, "rb") as binary_handle: |
30 magic = binary_handle.read(2) | 30 magic = binary_handle.read(2) |
31 if not magic: | 31 if not magic: |
32 # Empty file, special case | 32 # Empty file, special case |
33 continue | 33 continue |
34 elif magic == b'\x1f\x8b': | 34 elif magic == b"\x1f\x8b": |
35 # Gzipped | 35 # Gzipped |
36 handle = gzip.open(filename, "rt") | 36 handle = gzip.open(filename, "rt") |
37 elif magic[0:1] == b">": | 37 elif magic[0:1] == b">": |
38 # Not gzipped, shoudl be plain FASTA | 38 # Not gzipped, shoudl be plain FASTA |
39 handle = open(filename, "r") | 39 handle = open(filename, "r") |