sugar._io.meme module

Read support for file formats associated with the MEME Suite

sugar._io.meme._read_motifs_meme_txt(f)[source]

Parse MEME txt file and return dictionary of motifs

sugar._io.meme._read_motifs_meme_txt_regex(f)[source]

Parse MEME txt file with regex and return dictionary of motifs

sugar._io.meme.is_fts_meme_txt(f, **kw)[source]
sugar._io.meme.read_fts_meme_txt(f, *, ftype=None, engine='regex')[source]

MEME txt reader

Parameters:
  • ftype (str) – Feature type of returned features

  • engine (str) – Select 'txt' or 'regex' based parsing method, both should give the same result, default is 'regex'

Returns a flat FeatureList of all motif hits. To get a dictionary of motifs call FeatureList.groupby('motif') or FeatureList.groupby('motif_id') on the returned object. Alternatively, use the _read_motifs_meme_txt_regex function directly.

Warning

This function should NOT be called directly, it registers via read_fts(), call this instead.