Skip to content

Commit

Permalink
move logos back into main modisco folder
Browse files Browse the repository at this point in the history
  • Loading branch information
avantikalal committed Nov 9, 2024
1 parent 6f2b748 commit 13f642a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/grelu/interpret/modisco.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def _add_tomtom_to_modisco_report(

# Paths to outputs
html_file = os.path.join(modisco_dir, "motifs.html")
meme_logo_dir = os.path.join(modisco_dir, "trimmed_meme_logos")
modisco_logo_dir = os.path.join(modisco_dir, "trimmed_logos")

# Loading html report
Expand Down Expand Up @@ -63,9 +62,6 @@ def _add_tomtom_to_modisco_report(
motifs = read_meme(meme_file)

# Generating logos for the reference motifs
if not os.path.exists(meme_logo_dir):
os.makedirs(meme_logo_dir)

for i in range(top_n_matches):
name = f"match{i}"
logos = []
Expand All @@ -74,8 +70,8 @@ def _add_tomtom_to_modisco_report(
if pd.isnull(row[name]):
logos.append("NA")
else:
make_logo(row[name], meme_logo_dir, motifs)
logos.append(os.path.join(meme_logo_dir, f"{row[name]}.png"))
make_logo(row[name], modisco_dir, motifs)
logos.append(os.path.join(modisco_dir, f"{row[name]}.png"))
else:
break
report[f"{name}_logo"] = logos
Expand Down

0 comments on commit 13f642a

Please sign in to comment.