Mercurial > repos > trinity_ctat > ctat_genome_resource_libs_data_manager_3
comparison data_manager/add_ctat_resource_lib.py @ 46:f4f48007db67 draft
Uploaded
author | trinity_ctat |
---|---|
date | Thu, 25 Oct 2018 20:55:44 -0400 |
parents | 3acb7bc809b5 |
children | fb13fae2c873 |
comparison
equal
deleted
inserted
replaced
45:3acb7bc809b5 | 46:f4f48007db67 |
---|---|
1336 # But I do not get input values from the json file, but rather from command line. | 1336 # But I do not get input values from the json file, but rather from command line. |
1337 # Just leaving the following code as a comment, in case it might be useful to someone later. | 1337 # Just leaving the following code as a comment, in case it might be useful to someone later. |
1338 # params = from_json_string(open(filename).read()) | 1338 # params = from_json_string(open(filename).read()) |
1339 # target_directory = params['output_data'][0]['extra_files_path'] | 1339 # target_directory = params['output_data'][0]['extra_files_path'] |
1340 # os.mkdir(target_directory) | 1340 # os.mkdir(target_directory) |
1341 | |
1342 print "The value of download_url argument is:\n\t{:s}".format(str(args.download_url)) | |
1343 sys.stdout.flush() | |
1344 | 1341 |
1345 lib_was_built = False | 1342 lib_was_built = False |
1346 extracted_directory = None | 1343 extracted_directory = None |
1347 source_data_directory = None | 1344 source_data_directory = None |
1348 genome_build_directory = None | 1345 genome_build_directory = None |
1349 download_url_is_set = (args.download_url is not None) and (args.download_url != "") | 1346 download_url_is_set = (args.download_url is not None) and (args.download_url != "") |
1350 download_location_is_set = (args.download_location is not None) and (args.download_location != "") | 1347 download_location_is_set = (args.download_location is not None) and (args.download_location != "") |
1351 source_location_is_set = (args.source_location is not None) and (args.source_location != "") | 1348 source_location_is_set = (args.source_location is not None) and (args.source_location != "") |
1352 build_location_is_set = (args.build_location is not None) and (args.build_location != "") | 1349 build_location_is_set = (args.build_location is not None) and (args.build_location != "") |
1353 # FIX - need to make sure we are handling all "possible" combinations of arguments. | 1350 |
1354 # Probably would be good if we could simplify/remove some of them. | |
1355 # But I think the current interface is using them all. | |
1356 | |
1357 if download_url_is_set: | 1351 if download_url_is_set: |
1352 print "The value of download_url argument is:\n\t{:s}".format(str(args.download_url)) | |
1353 sys.stdout.flush() | |
1358 if source_location_is_set: | 1354 if source_location_is_set: |
1359 raise ValueError("Argument --source_location cannot be used in combination with --download_url.") | 1355 raise ValueError("Argument --source_location cannot be used in combination with --download_url.") |
1360 if not download_location_is_set: | 1356 if not download_location_is_set: |
1361 raise ValueError("Argument --download_url requires that --download_location be specified.") | 1357 raise ValueError("Argument --download_url requires that --download_location be specified.") |
1362 downloaded_filename_full_path = \ | 1358 downloaded_filename_full_path = \ |