load#

lightmotif.load(file, format='jaspar', *, protein=False)#

Load the motifs contained in a file.

Parameters:
  • file (os.PathLike or file-like object) – The file containing the motifs to load, as either a path to a filesystem location, or a file-like object open in binary mode.

  • format (str) – The format of the motif file. Supported formats are jaspar, jaspar16, uniprobe and transfac.

  • protein (bool) – Set to True if the loader should be expecting a protein motif rather than a DNA motif.

Returns:

Loader – A loader configured to load one or more Motif from the given file.