def from_seqfeature(s, **kwargs):
    """
    Converts a Bio.SeqFeature object to a gffutils.Feature object.

    The GFF fields `source`, `score`, `seqid`, and `frame` are assumed to be
    stored as qualifiers.  Any other qualifiers will be assumed to be GFF
    attributes.
    """
    source = s.qualifiers.get('source', '.')[0]
    score = s.qualifiers.get('score', '.')[0]
    seqid = s.qualifiers.get('seqid', '.')[0]
    frame = s.qualifiers.get('frame', '.')[0]
    strand = _feature_strand[s.strand]

    # BioPython parses 1-based GenBank positions into 0-based for use within
    # Python.  We need to convert back to 1-based GFF format here.
    start = s.location.start.position + 1
    stop = s.location.end.position
    featuretype = s.type
    id = s.id
    attributes = dict(s.qualifiers)
    attributes.pop('source', '.')
    attributes.pop('score', '.')
    attributes.pop('seqid', '.')
    attributes.pop('frame', '.')
    return Feature(seqid, source, featuretype, start, stop, score, strand,
                   frame, attributes, id=id, **kwargs)
Converts a Bio.SeqFeature object to a gffutils.Feature object.

    The GFF fields `source`, `score`, `seqid`, and `frame` are assumed to be
    stored as qualifiers.  Any other qualifiers will be assumed to be GFF
    attributes.