Mercurial > repos > trinity_ctat > ctat_genome_resource_libs_data_manager_3
changeset 9:1717c42112ed draft
Uploaded
author | trinity_ctat |
---|---|
date | Sat, 23 Jun 2018 16:06:17 -0400 |
parents | b2e6ed40840a |
children | a7cd51b60f58 |
files | data_manager/add_ctat_resource_lib.py |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/data_manager/add_ctat_resource_lib.py Sat Jun 23 15:40:54 2018 -0400 +++ b/data_manager/add_ctat_resource_lib.py Sat Jun 23 16:06:17 2018 -0400 @@ -746,8 +746,13 @@ destination=args.destination_path, \ force_download=args.force_download) else: + if (args.build): + # Then the user wants to build the directory from the data + # in the location that was given in destination_path. + downloaded_directory = args.destination_path genome_build_directory = search_for_genome_build_dir(args.destination_path) + print "\nThe location of the downloaded_directory is {:s}.\n".format(str(downloaded_directory)) print "\nThe location of the CTAT Genome Resource Library is {:s}.\n".format(genome_build_directory) # FIX - We should leave a file indicating build success the same way we do for download success. @@ -756,9 +761,12 @@ # That is why the gmap_build value is sent to build_the_library(), but if we are not building the # library, the user might still be asking for a gmap_build. That is done after rechecking for the # genome_build_directory. - if (download_has_source_data or args.build): + if (downloaded_directory is not None) and (download_has_source_data or args.build): build_the_library(downloaded_directory, genome_build_directory, True, args.gmap_build) lib_was_built = True + elif downloaded_directory is None: + print "No directory was downloaded and there is no source data, " + \ + "so the Resource Library was not built (it may already be built)." # The following looks to see if the library actually exists after the build, # and raises an error if it cannot find the library files. # The reassignment of genome_build_directory should be superfluous,