Exemple #1
0
    ## making  ft_string to communicate it to dare

    ft_step_string = ""
    for i in range(0, len(num_step_wus)):
        if (step_type[i] == "data"):
            ft_step_string = ft_step_string + "step_" + str(i)
            if (x != (num_step_wus[i] - 1)):
                ft_step_string = ft_step_string + ", "

    dare_config.set(section_name, "ft_steps", ft_step_string)

    ###############  write the config file for dare.py        #########################################
    try:
        dare_conffile = os.path.join(working_directory,
                                     str(jobid) + "-darejob.cfg")
        dare_cfgfile = open(dare_conffile, 'w')
        dare_config.write(dare_cfgfile)
        dare_cfgfile.close()
    except:
        print("Could not write DARE config file")
        sys.exit(0)

    #start dare
    #print dare_conffile

    #try:
    dare_instance = dare(dare_conffile)
    dare_instance.run()
    #except  :
    #   print "could not a start dare instance"
Exemple #2
0
        config.set(section_name, "environment","") 
        config.set(section_name, "working_directory", working_directory)
        config.set(section_name, "output", os.path.join(working_directory, "stdout-"+ str(dare_uuid) +"-"+str(wus_count)+".txt"))
        config.set(section_name, "error", os.path.join(working_directory, "stderr-"+ str(dare_uuid) +"-"+str(wus_count)+".txt" ))
        config.set(section_name, "appname", "simple")
        config.set(section_name, "resource" , 0)
        wus_count = wus_count + 1
        """
    step = step + 1
       
    
    # ft after result. html
    
    section_name = "wu_"+ str(wus_count)
    config.add_section(section_name)    
    config.set(section_name, "appname", "file_transfer")
    config.set(section_name, "fs_type", "scp")
    config.set(section_name, "source_url", working_directory + "/tophatfusion_out/result.html")
    config.set(section_name, "dest_url",  "[email protected]:" +"/home/cctsg/install/DARE-NGS/darengs/templates/tophat_results/result_"+ jobid+ ".mako"  )    
    wus_count = wus_count + 1    
        
    #write the config file
    config.write(cfgfile)
    cfgfile.close() 
    
    
    #start dare with above written config file
    dare_instance = dare.dare()
    dare_instance.run(dare_conffile)

    
    
    ft_step_string = ""
    for i in range (0, len(num_step_wus)): 
        if (step_type[i] == "data"):
            ft_step_string = ft_step_string + "step_" + str(i)
            if (x != (num_step_wus[i] -1)):
                ft_step_string = ft_step_string + ", "
            
    dare_config.set(section_name , "ft_steps", ft_step_string) 
    

    
###############  write the config file for dare.py        #########################################
    try:
        dare_conffile =  os.path.join(working_directory, str(jobid) +"-darejob.cfg") 
        dare_cfgfile = open(dare_conffile,'w')
        dare_config.write(dare_cfgfile)
        dare_cfgfile.close() 
    except:
        print "Could not write DARE config file"
        sys.exit(0);

    #start dare
    #print dare_conffile
    
    #try:
    dare_instance = dare(dare_conffile)
    dare_instance.run()
    #except  :
     #   print "could not a start dare instance"
        config.set(section_name, "environment","") 
        config.set(section_name, "working_directory", working_directory)
        config.set(section_name, "output", os.path.join(working_directory, "stdout-"+ str(dare_uuid) +"-"+str(wus_count)+".txt"))
        config.set(section_name, "error", os.path.join(working_directory, "stderr-"+ str(dare_uuid) +"-"+str(wus_count)+".txt" ))
        config.set(section_name, "appname", "simple")
        config.set(section_name, "resource" , 0)
        wus_count = wus_count + 1
        """
    step = step + 1
       
    
    # ft after result. html
    
    section_name = "wu_"+ str(wus_count)
    config.add_section(section_name)    
    config.set(section_name, "appname", "file_transfer")
    config.set(section_name, "fs_type", "scp")
    config.set(section_name, "source_url", working_directory + "/tophatfusion_out/result.html")
    config.set(section_name, "dest_url",  "[email protected]:" +"/home/cctsg/install/DARE-NGS/darengs/templates/tophat_results/result_"+ jobid+ ".mako"  )    
    wus_count = wus_count + 1    
        
    #write the config file
    config.write(cfgfile)
    cfgfile.close() 
    
    
    #start dare with above written config file
    dare_instance = dare.dare()
    dare_instance.run(dare_conffile)