def findPercentMapped(sam_df):
    """
    Takes a SAM dataframe and finds the percent that successfully mapped.
    """
    total = len(sam_df)

    is_mapped = sam_df.FLAG.isin([0,16])

    return len(sam_df[is_mapped]) / total