comparison data_manager/add_ctat_resource_lib.py @ 32:9b7dc7d09fda draft

Fixing some indentation errors in build_the_library.
author trinity_ctat
date Thu, 25 Oct 2018 10:31:19 -0400
parents 0df7a729910d
children 91319ae21a16
comparison
equal deleted inserted replaced
31:0df7a729910d 32:9b7dc7d09fda
715 else: 715 else:
716 print "gmap_the_library(): This code should never be printed. Something is wrong." 716 print "gmap_the_library(): This code should never be printed. Something is wrong."
717 return 717 return
718 718
719 719
720 def build_the_library(genome_source_directory, genome_build_directory, force_new_build, gmap_build): 720 def build_the_library(genome_source_directory, genome_build_directory, force_new_build=False, gmap_build=False):
721 """ genome_source_directory is the location of the source_data needed to build the library. 721 """ genome_source_directory is the location of the source_data needed to build the library.
722 Normally it is fully specified, but could be relative. 722 Normally it is fully specified, but could be relative.
723 genome_build_directory is the location where the library will be built. 723 genome_build_directory is the location where the library will be built.
724 It can be relative to the current working directory or an absolute path. 724 It can be relative to the current working directory or an absolute path.
725 build specifies whether to run prep_genome_lib.pl even if it was run before. 725 build specifies whether to run prep_genome_lib.pl even if it was run before.
806 # Create the gmap success file. 806 # Create the gmap success file.
807 gmap_success_filename = "{:s}.{:s}".format(src_filename, _GmapSuccessFile) 807 gmap_success_filename = "{:s}.{:s}".format(src_filename, _GmapSuccessFile)
808 gmap_success_full_file_path = os.path.join(cannonical_destination, gmap_success_filename) 808 gmap_success_full_file_path = os.path.join(cannonical_destination, gmap_success_filename)
809 create_success_file(gmap_success_full_file_path, \ 809 create_success_file(gmap_success_full_file_path, \
810 "gmap of:\n\t{:s}\nsucceeded.".format(cannonical_destination)) 810 "gmap of:\n\t{:s}\nsucceeded.".format(cannonical_destination))
811 elif (build_success_filename in files_in_sourcedir): 811 elif (build_success_filename in files_in_sourcedir):
812 print "The build success file exists, so no build is being attempted:" 812 print "The build success file exists, so no build is being attempted:"
813 print "\t{:s}".format(build_success_file_path) 813 print "\t{:s}".format(build_success_file_path)
814 print "Remove the file or set <force new build> if you want a new build to occur." 814 print "Remove the file or set <force new build> if you want a new build to occur."
815 # We might still need to do a gmap_build.
815 if gmap_build: 816 if gmap_build:
816 print "Checking if we need to gmap the library." 817 print "Checking if we need to gmap the library."
817 gmap_the_library(cannonical_destination, force_new_build) 818 gmap_the_library(cannonical_destination, force_new_build)
818 # gmap_the_library creates a gmap success file if it succeeds. 819 # gmap_the_library creates a gmap success file if it succeeds.
819 else: 820 else:
820 print "build_the_library(): This code should never be printed. Something is wrong." 821 print "build_the_library(): This code should never be printed. Something is wrong."
822
821 return 823 return
822 # End of build_the_library() 824 # End of build_the_library()
823 825
824 def find_path_to_mutation_lib_integration(): 826 def find_path_to_mutation_lib_integration():
825 # We are assuming that we exist inside of a conda environment and that the directory that we want 827 # We are assuming that we exist inside of a conda environment and that the directory that we want