scdori.load_motif_database#
- scdori.load_motif_database(motif_path, final_tfs)#
Read a .meme motif file and select only the motifs corresponding to TFs of interest.
- Parameters:
motif_path (pathlib.Path) – The path to the .meme file.
final_tfs (list of str) – A list of TF names for which we want motifs.
- Return type:
- Returns:
(pwms_sub, key_to_tf) : tuple of (dict, dict) pwms_sub : dict
A dictionary of PWM matrices (motif_name -> PWM) only for the desired TFs.
- key_to_tfdict
A mapping from motif_name to TF name (one motif per TF).
Notes
This function expects that each motif key in the meme file can be parsed to extract a TF name. We assume a format like “MOTIF something Tbx5_…”.