def process_cram(cram, **kwargs):
logging.info("<STR_LIT>".format(cram))<EOL>samfile = check_bam(cram, samtype="<STR_LIT>")<EOL>chromosomes = samfile.references<EOL>params = zip([cram] * len(chromosomes), chromosomes)<EOL>with cfutures.ProcessPoolExecutor() as executor:<EOL><INDENT>datadf = pd.DataFrame(<EOL>data=[res for sublist in executor.map(extract_from_bam, params) for res in sublist],<EOL>columns=["<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>",<EOL>"<STR_LIT>", "<STR_LIT>", "<STR_LIT>"]).dropna(axis='<STR_LIT>', how='<STR_LIT:all>').dropna(axis='<STR_LIT:index>', how='<STR_LIT>')<EOL><DEDENT>logging.info("<STR_LIT>".format(<EOL>cram, datadf["<STR_LIT>"].size))<EOL>return ut.reduce_memory_usage(datadf)<EOL>
Combines metrics from cram after extraction.

    Processing function: calls pool of worker functions
    to extract from a cram file the following metrics:
    -lengths
    -aligned lengths
    -qualities
    -aligned qualities
    -mapping qualities
    -edit distances to the reference genome scaled by read length
    Returned in a pandas DataFrame