gffutils.interface.FeatureDB.children

FeatureDB.children(id, level=None, featuretype=None, order_by=None, reverse=False, limit=None, completely_within=False)[source]

Return children of feature id.

Parameters:

id : string or a Feature object

level : None or int

If level=None (default), then return all children regardless of level. If level is an integer, then constrain to just that level.

limit : string or tuple

Limit the results to a genomic region. If string, then of the form “seqid:start-end”; if tuple, then (seqid, start, end).

strand : “-” | “+” | ”.”

Limit the results to one strand

featuretype : string or tuple

Limit the results to one or several featuretypes.

order_by : string or tuple

Order results by one or many fields; the string or tuple items must be in: ‘seqid’, ‘source’, ‘featuretype’, ‘start’, ‘end’, ‘score’, ‘strand’, ‘frame’, ‘attributes’, ‘extra’.

reverse : bool

Change sort order; only relevant if order_by is not None. By default, results will be in ascending order, so use reverse=True for descending.

completely_within : bool

If False (default), a single bp overlap with limit is sufficient to return a feature; if True, then the feature must be completely within limit. Only relevant when limit is not None.

Returns:

A generator object that yields Feature objects.