def parse_feature(feature, feature_id):
    """
    helper for building a generic feature object
    :param feature: BioPython feature
    :param feature_id: some unique identifier for this feature
    :return: generic feature object
    """
    return {
        'id': feature_id,
        'protein_id': '.'.join(feature.qualifiers['protein_id']),
        'label': '.'.join(feature.qualifiers['gene']),
        'start': int(feature.location.start),
        'end': int(feature.location.end),
        'strand': feature.location.strand,
        'metadata': feature.qualifiers['note']
    }