# HG changeset patch # User trinity_ctat # Date 1529784377 14400 # Node ID 1717c42112edb84ca264fcd80819f97b9275f18d # Parent b2e6ed40840a760df50dfa6bdbb4ec68e3e29338 Uploaded diff -r b2e6ed40840a -r 1717c42112ed data_manager/add_ctat_resource_lib.py --- 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,