def get_args(): global fi global prop global misc global properties_file global genome_name fi = fileutils() # Assign description to the help doc parser = argparse.ArgumentParser( description='Script downloading genome files') parser.add_argument('-p', '--properties_file', type=str, help='''Please provide the properties file, which including workdir''', required=True) parser.add_argument('-g', '--genome_name', type=str, help='''Please provide the genome name which is provided by genome_list.txt''', required=True) args = parser.parse_args() # check args fi.check_exist(args.properties_file) properties_file = args.properties_file prop = properties(properties_file) misc = misc() misc.check_genome_avl(prop.get_attrib("available_genomes"), args.genome_name) # define variables genome_name = args.genome_name print("properties_file:", properties_file) print("genome_name:", genome_name)
FI.copy_file_add_prefix(tg_out_file, outdir, prefix + "_") for fastqc_out_file in fastqc_out_files: FI.copy_file_to_destdir(fastqc_out_file, qcdir) FI.copy_file_to_destdir(fastqc_out_file.replace(".zip", ".html"), qcdir) command("cp -p {}.html {}".format(multiqc_out_prefix, qcdir)).run_comm(0) if if_dedup: for deduped_fq in deduped_fqs: FI.copy_file_add_prefix(deduped_fq, outdir, prefix + "_") if __name__ == '__main__': global FI global MISC FI = fileutils() MISC = misc() get_args() print("\n", "Properties attributes:\n", prop.__dict__) #run the initiation code initiate() #execute the main part of the program execute() #post execution code post_process() print(os.path.realpath(__file__) + " DONE")
def execute(): print "executing..." global identifier identifier = "ID" generate_cluster3() create_image_input_file() generate_images() def post_process(): print "post_processing..." fi.copy_file_to_destdir(workdir + "/" + out_image_fname, outdir) if __name__ == '__main__': getVar = lambda searchList, ind: [searchList[i] for i in ind] misc = misc() get_args() print "\n", "Properties attributes:" print prop.__dict__ #run_blast the initiation code initiate() #execute the main part of the program execute() #post execution code post_process()