def parse_clusters(out_file, clust_file, seq_db=None, db_path=None, seq_dict=None, return_just_seq_ids=False):
raw_clusters = [c.split('<STR_LIT:\n>') for c in open(clust_file, '<STR_LIT:r>').read().split('<STR_LIT>')]<EOL>if return_just_seq_ids:<EOL><INDENT>ids = []<EOL>for rc in raw_clusters:<EOL><INDENT>_ids = []<EOL>for c in rc[<NUM_LIT:1>:]:<EOL><INDENT>if c:<EOL><INDENT>_ids.append(c.split()[<NUM_LIT:2>][<NUM_LIT:1>:-<NUM_LIT:3>])<EOL><DEDENT><DEDENT>ids.append(_ids)<EOL><DEDENT>os.unlink(out_file)<EOL>os.unlink(clust_file)<EOL>return ids<EOL><DEDENT>os.unlink(out_file)<EOL>os.unlink(clust_file)<EOL>clusters = [Cluster(rc, seq_db, db_path, seq_dict) for rc in raw_clusters]<EOL>return CDHITResult(clusters, seq_db=seq_db, db_path=db_path, seq_dict=seq_dict)<EOL>
Parses CD-HIT output.

Args:

    out_file (str): Path to the CD-HIT output file. Required.

    clust_file (str): Path to the CD-HIT cluster file. Required.

    seq_db (sqlite.Connection): SQLite3 `Connection` object. Default is `None`. If not provided and
        `return_just_seq_ids` is False, the returned `Cluster` objects will not contain any sequence
        information beyond the sequence ID.

    db_path (str): Path to a SQLite3 database file. Default is `None`. Must be provided if
        `seq_db` is also provided.

    seq_dict (dict): A `dict` mapping sequence IDs to `abutils.core.sequence.Sequence` objects. Default
        is `None`. Typically used when a relatively small number of sequences are being clustered and
        creating a `sqlite3` database would be overkill.

    temp_dir (str): Path to the temporary directory. If not provided, `'/tmp'` is used.

    make_db (bool): Whether to build a SQlite database of sequence information. Required
        if you want to calculate consensus/centroid sequences for the resulting
        clusters or if you need to access the clustered sequences (not just sequence IDs)
        Default is `True`.

    quiet (bool): If `True`, surpresses printing of output/progress info. Default is `False`.

    threads (int): Number of threads (CPU cores) to be used for clustering. Default is `0`,
        which results in all available cores being used.

    return_just_seq_ids (bool): If `True`, will return a 2D list of sequence IDs
        (a list containing a list of sequence IDs for each cluster) rather than returning a
        list of `Cluster` objects.

    max_memory (int): Max memory (in MB) for CD-HIT. Will be passed directly to CD-HIT through
        the `-M` runtime option. Default is `800`.

    debug (bool): If `True`, print standard output and standard error from CD-HIT. Default is `False`.

Returns:

    A CDHITResult object, or a 2D list of sequence IDs, if `return_just_seq_ids` is `True`.