gffutils.feature.feature_from_line

gffutils.feature.feature_from_line(line, dialect=None, strict=True, keep_order=False)[source]

Given a line from a GFF file, return a Feature object

Parameters:
  • line (string) –

  • strict (bool) –

    If True (default), assume line is a single, tab-delimited string that has at least 9 fields.

    If False, then the input can have a more flexible format, useful for creating single ad hoc features or for writing tests. In this case, line can be a multi-line string (as long as it has a single non-empty line), and, as long as there are only 9 fields (standard GFF/GTF), then it’s OK to use spaces instead of tabs to separate fields in line. But if >9 fields are to be used, then tabs must be used.

  • keep_order – Passed directly to Feature; see docstring for that class for description

  • dialect – Passed directly to Feature; see docstring for that class for description

Return type:

A new Feature object.