gffutils.feature.Feature.sequence

Feature.sequence(fasta, use_strand=True)[source]

Retrieves the sequence of this feature as a string.

Uses the pyfaidx package.

Parameters:
  • fasta (str) – If str, then it’s a FASTA-format filename; otherwise assume it’s a pyfaidx.Fasta object.

  • use_strand (bool) – If True (default), the sequence returned will be reverse-complemented for minus-strand features.

Return type:

string