# HG changeset patch # User sanbi-uwc # Date 1536360083 14400 # Node ID 4852eb1a75e5aebcc091c21011a573254b2f6bbc # Parent a4ee45e7237b725034e2be8c14f8ec641441b197 planemo upload for repository https://github.com/pvanheus/refseq_fasta_data_manager commit b682adad2c3c74567d23e1a5cf2bfcc3df1c96ae diff -r a4ee45e7237b -r 4852eb1a75e5 data_manager/fetch_refseq.py --- a/data_manager/fetch_refseq.py Fri Sep 07 18:08:23 2018 -0400 +++ b/data_manager/fetch_refseq.py Fri Sep 07 18:41:23 2018 -0400 @@ -52,9 +52,9 @@ while input_filename != 'STOP': if debug: print('Reading', input_filename, file=sys.stderr) - with gzip.open(input_filename) as input_file: + with gzip.open(input_filename, 'rb') as input_file: read_chunk = functools.partial(input_file.read, (chunk_size)) - for data in iter(read_chunk, ''): # use '' as a sentinel to stop the loop + for data in iter(read_chunk, b''): # use b'' as a sentinel to stop the loop. note '' != b'' in Python 3 output_file.write(data) os.unlink(input_filename) input_filename = conn.get() diff -r a4ee45e7237b -r 4852eb1a75e5 data_manager/fetch_refseq.xml --- a/data_manager/fetch_refseq.xml Fri Sep 07 18:08:23 2018 -0400 +++ b/data_manager/fetch_refseq.xml Fri Sep 07 18:41:23 2018 -0400 @@ -1,4 +1,4 @@ - + Fetch FASTA data from NCBI RefSeq and update all_fasta data table python