crowsetta.formats.seq.generic

crowsetta.formats.seq.generic#

Generic sequence format, meant to be an abstraction of any sequence-like format.

Consists of crowsetta.Annotation instances, each with a crowsetta.Sequence made up of :class:`crowsetta.Segment`s.

Functions in this module load the format from a csv file, or write a csv file in the generic format. Other formats that convert to :class:`~crowsetta.Annotation`s with :class:`~crowsetta.Sequence`s can be converted to this format.

Functions

annot2csv(annot, csv_path[, abspath, basename])

Write sequence-like crowsetta.Annotation to a csv file in the 'generic-seq' format

annot2df(annot[, abspath, basename])

Convert sequence-like crowsetta.Annotation to a :type:`pandas.DataFrame` in the 'generic-seq' format.

csv2annot(csv_path)

Loads a comma-separated values (csv) file containing annotations for song files, returns contents as a list of crowsetta.Annotation instances.

Classes

GenericSeq(annots)

Class that represents annotations from a generic format, meant to be an abstraction of any sequence-like format.

GenericSeqSchema(*args, **kwargs)

A :class: pandera.SchemaModel that validates :type:`pandas.DataFrame`s loaded from a csv file in the ``'generic-seq'`` annotation format.