def cdhit_python(cdhit_path, input_file, output_file, c=0.50, n=3):
    """
    This function executes CD-HIT clustering commands from within Python. To install
    CD-HIT, do so via conda: conda install -c bioconda cd-hit. By default, CD-HIT
    works via a global alignment approach, this can be changed (see CD-HIT docs).
    
    Dependencies: suprocess
    
    Input:
        - cdhit_path: path to CD-HIT software
        - input_file: FASTA file with protein sequences
        - output file: path to output (will be one FASTA file and one .clstr file)
        - c: threshold on identity for clustering
        - n: word length (3 for thresholds between 0.5 and 0.6)
    
    Output: stdout and stderr are the output from the terminal. Results are saved as given
            output_file (and its .clstr sibling).
    """
    
    # change directory
    cd_str = 'cd ' + cdhit_path
    cd_process = subprocess.Popen(cd_str, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
    cd_out, cd_err = cd_process.communicate()
    
    # run clustering
    raw_str = 'cd-hit -i ' + input_file + ' -o ' + output_file + ' -c ' + str(c) + ' -n ' + str(n) + ' -d 0'
    process = subprocess.Popen(raw_str, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
    stdout, stderr = process.communicate()
    
    return stdout, stderr

def cdhit_python(cdhit_path, input_file, output_file, c=0.50, n=3):
    """
    This function executes CD-HIT clustering commands from within Python. To install
    CD-HIT, do so via conda: conda install -c bioconda cd-hit. By default, CD-HIT
    works via a global alignment approach, this can be changed (see CD-HIT docs).
    
    Dependencies: suprocess
    
    Input:
        - cdhit_path: path to CD-HIT software
        - input_file: FASTA file with protein sequences
        - output file: path to output (will be one FASTA file and one .clstr file)
        - c: threshold on identity for clustering
        - n: word length (3 for thresholds between 0.5 and 0.6)
    
    Output: stdout and stderr are the output from the terminal. Results are saved as given
            output_file (and its .clstr sibling).
    """
    
    # change directory
    cd_str = 'cd ' + cdhit_path
    cd_process = subprocess.Popen(cd_str, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
    cd_out, cd_err = cd_process.communicate()
    
    # run clustering
    raw_str = 'cd-hit -i ' + input_file + ' -o ' + output_file + ' -c ' + str(c) + ' -n ' + str(n) + ' -d 0'
    process = subprocess.Popen(raw_str, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
    stdout, stderr = process.communicate()
    
    return stdout, stderr

This function executes CD-HIT clustering commands from within Python. To install     CD-HIT, do so via conda: conda install -c bioconda cd-hit. By default, CD-HIT     works via a global alignment approach, this can be changed (see CD-HIT docs).          Dependencies: suprocess          Input:         - cdhit_path: path to CD-HIT software         - input_file: FASTA file with protein sequences         - output file: path to output (will be one FASTA file and one .clstr file)         - c: threshold on identity for clustering         - n: word length (3 for thresholds between 0.5 and 0.6)          Output: stdout and stderr are the output from the terminal. Results are saved as given             output_file (and its .clstr sibling). # change directory # run clustering