humann/tools/build_custom_database.py
def format_diamond_database(fasta_file, output_folder):
    """ Format the input file into a diamond database """
    
    database=os.path.join(output_folder,os.path.splitext(os.path.basename(fasta_file))[0])
    
    command=["diamond","makedb","--in",fasta_file,"--db",database]
    
    print("RUNNING: "+" ".join(command))
    try:
        subprocess.check_call(command)
    except (EnvironmentError, subprocess.CalledProcessError):
        sys.exit("ERROR: Unable to execute diamond database build")
        
    print("Created diamond database: " + database)
 Format the input file into a diamond database 
Format the input file into a diamond database
Format the input file into a diamond database
def format_diamond_database(fasta_file, output_folder):
    database=os.path.join(output_folder,os.path.splitext(os.path.basename(fasta_file))[0])
    command=["diamond","makedb","--in",fasta_file,"--db",database]
    print("RUNNING: "+" ".join(command))
    try:
        subprocess.check_call(command)
    except (EnvironmentError, subprocess.CalledProcessError):
        sys.exit("ERROR: Unable to execute diamond database build")
    print("Created diamond database: " + database)
def format_diamond_database ( fasta_file , output_folder ) : database = os . path . join ( output_folder , os . path . splitext ( os . path . basename ( fasta_file ) ) [ 0 ] ) command = [ "diamond" , "makedb" , "--in" , fasta_file , "--db" , database ] print ( "RUNNING: " + " " . join ( command ) ) try : subprocess . check_call ( command ) except ( EnvironmentError , subprocess . CalledProcessError ) : sys . exit ( "ERROR: Unable to execute diamond database build" ) print ( "Created diamond database: " + database )
Format the input file into a diamond database
Format the input file into a diamond database
""" Format the input file into a diamond database """
fasta_file
output_folder