def handle_protein_results(permutation_result):
    """Takes in output from multiprocess_permutation function and converts to
    a better formatted dataframe.

    Parameters
    ----------
    permutation_result : list
        output from multiprocess_permutation

    Returns
    -------
    permutation_df : pd.DataFrame
        formatted output suitable to save
    """
    mycols = ['gene', 'num recurrent', 'normalized graph-smoothed position entropy',
              'normalized graph-smoothed position entropy p-value',
              'Total Mutations', 'Unmapped to Ref Tx']
    permutation_df = pd.DataFrame(permutation_result, columns=mycols)

    # get benjamani hochberg adjusted p-values
    permutation_df['normalized graph-smoothed position entropy BH q-value'] = mypval.bh_fdr(permutation_df['normalized graph-smoothed position entropy p-value'])

    # order output
    permutation_df = permutation_df.set_index('gene', drop=False)  # make sure genes are indices
    col_order = ['gene', 'Total Mutations', 'Unmapped to Ref Tx',
                 'num recurrent',
                 'normalized graph-smoothed position entropy',
                 'normalized graph-smoothed position entropy p-value',
                 'normalized graph-smoothed position entropy BH q-value']
    permutation_df = permutation_df.sort_values(by=['normalized graph-smoothed position entropy p-value'])
    return permutation_df[col_order]