@@ -43,7 +43,7 @@ def write_meme_file(ppm, bg, fname):
4343
4444def fetch_tomtom_matches (ppm , cwm , is_writing_tomtom_matrix , output_dir ,
4545 pattern_name , motifs_db , background = [0.25 , 0.25 , 0.25 , 0.25 ],
46- tomtom_exec_path = 'tomtom' , trim_threshold = 0.3 , trim_min_length = 3 ):
46+ tomtom_exec_path = 'tomtom' , trim_threshold = 0.3 ):
4747
4848 """Fetches top matches from a motifs database using TomTom.
4949 Args:
@@ -103,7 +103,7 @@ def generate_tomtom_dataframe(modisco_h5py: os.PathLike,
103103 output_dir : os .PathLike , meme_motif_db : Union [os .PathLike , None ],
104104 is_writing_tomtom_matrix : bool , pattern_groups : List [str ],
105105 top_n_matches = 3 , tomtom_exec : str = "tomtom" , trim_threshold = 0.3 ,
106- trim_min_length = 3 ):
106+ ):
107107
108108 tomtom_results = {}
109109
@@ -131,8 +131,7 @@ def generate_tomtom_dataframe(modisco_h5py: os.PathLike,
131131 is_writing_tomtom_matrix = is_writing_tomtom_matrix ,
132132 output_dir = output_dir , pattern_name = pattern_name ,
133133 motifs_db = meme_motif_db , tomtom_exec_path = tomtom_exec ,
134- trim_threshold = trim_threshold ,
135- trim_min_length = trim_min_length )
134+ trim_threshold = trim_threshold )
136135
137136 i = - 1
138137 for i , (target , qval ) in r .iloc [:top_n_matches ].iterrows ():
@@ -150,12 +149,10 @@ def generate_tomtom_dataframe(modisco_h5py: os.PathLike,
150149
151150def tomtomlite_dataframe (
152151 modisco_h5py : os .PathLike ,
153- output_dir : os .PathLike ,
154152 meme_motif_db : Union [os .PathLike , None ],
155153 pattern_groups : List [str ],
156154 top_n_matches = 3 ,
157- trim_threshold = 0.3 ,
158- trim_min_length = 3 ):
155+ trim_threshold = 0.3 ):
159156 """Use tomtom-lite to match patterns to a motif database."""
160157
161158 tomtom_results = {}
@@ -276,7 +273,7 @@ def create_modisco_logos(modisco_h5py: os.PathLike, modisco_logo_dir, trim_thres
276273
277274def report_motifs (modisco_h5py : Path , output_dir : os .PathLike , img_path_suffix : os .PathLike ,
278275 meme_motif_db : Union [os .PathLike , None ], is_writing_tomtom_matrix : bool , top_n_matches = 3 ,
279- trim_threshold = 0.3 , trim_min_length = 3 , ttl = False ):
276+ trim_threshold = 0.3 , ttl = False ):
280277
281278 if not os .path .isdir (output_dir ):
282279 os .mkdir (output_dir )
@@ -316,17 +313,16 @@ def report_motifs(modisco_h5py: Path, output_dir: os.PathLike, img_path_suffix:
316313 motifs = {name : pwm .T for name , pwm in motifs .items ()}
317314
318315 if ttl :
319- tomtom_df = tomtomlite_dataframe (modisco_h5py , output_dir , meme_motif_db ,
316+ tomtom_df = tomtomlite_dataframe (modisco_h5py , meme_motif_db ,
320317 top_n_matches = top_n_matches , pattern_groups = pattern_groups ,
321- trim_threshold = trim_threshold , trim_min_length = trim_min_length )
318+ trim_threshold = trim_threshold )
322319 else :
323320 motifs = {key .split ()[0 ]: value for key , value in motifs .items ()}
324321
325322 tomtom_df = generate_tomtom_dataframe (modisco_h5py , output_dir , meme_motif_db ,
326323 is_writing_tomtom_matrix ,
327324 top_n_matches = top_n_matches , tomtom_exec = 'tomtom' ,
328- pattern_groups = pattern_groups , trim_threshold = trim_threshold ,
329- trim_min_length = trim_min_length )
325+ pattern_groups = pattern_groups , trim_threshold = trim_threshold )
330326
331327 patterns_df = pandas .concat ([patterns_df , tomtom_df ], axis = 1 )
332328
0 commit comments