gatac.tl.read_motifs

Contents

gatac.tl.read_motifs#

gatac.tl.read_motifs(filename, unique=True)#

Read motifs from a MEME format file.

Parameters:
filename str or Path

Path to MEME format file

unique bool, default True

A transcription factor may have multiple motifs. If True, only the motifs with the highest information content will be selected. This matches snapatac2’s cis_bp(unique=True) behavior.

Returns:

list[DNAMotif] List of parsed motifs

Return type:

list[DNAMotif]

Examples

>>> import gatac as ga
>>> motifs = ga.tl.read_motifs("cisBP_human.meme", unique=True)
>>> print(f"Loaded {len(motifs)} motifs")
>>> motifs[0].id, motifs[0].name