Skip to content

Commit

Permalink
Merge pull request #21 from Reed-CompBio/figures
Browse files Browse the repository at this point in the history
updated image legends and title
  • Loading branch information
ctrlaltaf authored Sep 16, 2024
2 parents 9ae5361 + c2f5712 commit 32e2f7e
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions generate_figures.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ def create_plot(ax, x_data: list, y_data: list, auc: float, type: str, color) ->
def main():
print("Generating figures")
species_list = ["elegans", "fly", "bsub", "yeast", "zfish"]
species_title = ["C. elegans", "D. melanogaster", "B. subtilis", "S. cerevisiae", "D. rerio"]

file_directories = [
"./results/final-non-inferred-complete/",
"./results/final-inferred-complete/",
Expand Down Expand Up @@ -137,7 +139,7 @@ def main():
ax.set_ylim([0.0, 1.05])
ax.set_xlabel("False Positive Rate")
ax.set_ylabel("True Positive Rate")
ax.set_title(f"{species.capitalize()}")
ax.set_title(f"{species_title[idx].capitalize()}")
ax.legend(loc="lower right")

axes[5].set_visible(False)
Expand Down Expand Up @@ -169,7 +171,7 @@ def main():
ax.set_ylim([0.0, 1.05])
ax.set_xlabel("Recall")
ax.set_ylabel("Precision")
ax.set_title(f"{species.capitalize()}")
ax.set_title(f"{species_title[idx].capitalize()}")
ax.legend(loc="lower right")

axes[5].set_visible(False)
Expand Down Expand Up @@ -234,7 +236,7 @@ def main():
final_rw_data[species][idx]["tpr"],
color=colors[i],
lw=2,
label=f"{species} (area = %0.2f)" % final_rw_data[species][idx]["roc"],
label=f"{species_title[i]} (area = %0.2f)" % final_rw_data[species][0]["roc"],
)

ax.set_xlim([0.0, 1.0])
Expand Down Expand Up @@ -267,7 +269,7 @@ def main():
final_rw_data[species][idx]["precision"],
color=colors[i],
lw=2,
label=f"{species} (area = %0.2f)" % final_rw_data[species][idx]["roc"],
label=f"{species_title[i]} (area = %0.2f)" % final_rw_data[species][0]["pr"],
)

ax.set_xlim([0.0, 1.0])
Expand Down
Binary file modified results/images/pr_complete_inferred_networks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/images/pr_complete_non_inferred_networks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/images/roc_complete_inferred_networks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/images/roc_complete_non_inferred_networks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/images/rw_pr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/images/rw_roc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 32e2f7e

Please sign in to comment.