Mercurial > repos > cathywise > truststore_browse
comparison TrustStoreGalaxyBrowse.py @ 17:eefb47f4f438
Try again.
author | Wise, Catherine (Digital, Acton) <Catherine.Wise@csiro.au> |
---|---|
date | Thu, 25 Jun 2015 12:49:20 +1000 |
parents | bc3e29a97709 |
children | dd8e0066e9f5 |
comparison
equal
deleted
inserted
replaced
16:bc3e29a97709 | 17:eefb47f4f438 |
---|---|
188 filename = "".join(c in SAFE_CHARS and c or '-' for c in location.name) | 188 filename = "".join(c in SAFE_CHARS and c or '-' for c in location.name) |
189 extension = os.path.splitext(filename)[1].strip(".") | 189 extension = os.path.splitext(filename)[1].strip(".") |
190 name = construct_multi_filename(hda_id, filename, extension) | 190 name = construct_multi_filename(hda_id, filename, extension) |
191 target_output_filename = None | 191 target_output_filename = None |
192 data_type = "new_primary_dataset" | 192 data_type = "new_primary_dataset" |
193 # if first: | |
194 # target_output_filename = file_name | |
195 # dataset = "new_primary_dataset" | |
196 # first = False | |
197 # else: | |
198 target_output_filename = os.path.normpath(os.path.join(extra_files_path, name)) | 193 target_output_filename = os.path.normpath(os.path.join(extra_files_path, name)) |
199 download = truststore.getFile(store, location) | 194 download = truststore.getFile(store, location) |
200 if download is None: | 195 if download is None: |
201 print("File %s not found." % location.name) | 196 print("File %s not found." % location.name) |
202 sys.exit(4) | 197 sys.exit(4) |
198 if first: | |
199 first = False | |
200 target_output_filename = download | |
203 ungzip(download, target_output_filename) | 201 ungzip(download, target_output_filename) |
204 # ext = sniff.handle_uploaded_dataset_file(target_output_filename, datatypes_registry, ext=ext) | 202 # ext = sniff.handle_uploaded_dataset_file(target_output_filename, datatypes_registry, ext=ext) |
205 # print("Guessed file type: " + ext) | 203 # print("Guessed file type: " + ext) |
206 print("in file: " + properties_file) | 204 print("in file: " + properties_file) |
207 metadata_file.write( | 205 metadata_file.write( |