Skip to content

Commit 32e2f7e

Browse files
authored
Merge pull request #21 from Reed-CompBio/figures
updated image legends and title
2 parents 9ae5361 + c2f5712 commit 32e2f7e

File tree

7 files changed

+6
-4
lines changed

7 files changed

+6
-4
lines changed

generate_figures.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ def create_plot(ax, x_data: list, y_data: list, auc: float, type: str, color) ->
5555
def main():
5656
print("Generating figures")
5757
species_list = ["elegans", "fly", "bsub", "yeast", "zfish"]
58+
species_title = ["C. elegans", "D. melanogaster", "B. subtilis", "S. cerevisiae", "D. rerio"]
59+
5860
file_directories = [
5961
"./results/final-non-inferred-complete/",
6062
"./results/final-inferred-complete/",
@@ -137,7 +139,7 @@ def main():
137139
ax.set_ylim([0.0, 1.05])
138140
ax.set_xlabel("False Positive Rate")
139141
ax.set_ylabel("True Positive Rate")
140-
ax.set_title(f"{species.capitalize()}")
142+
ax.set_title(f"{species_title[idx].capitalize()}")
141143
ax.legend(loc="lower right")
142144

143145
axes[5].set_visible(False)
@@ -169,7 +171,7 @@ def main():
169171
ax.set_ylim([0.0, 1.05])
170172
ax.set_xlabel("Recall")
171173
ax.set_ylabel("Precision")
172-
ax.set_title(f"{species.capitalize()}")
174+
ax.set_title(f"{species_title[idx].capitalize()}")
173175
ax.legend(loc="lower right")
174176

175177
axes[5].set_visible(False)
@@ -234,7 +236,7 @@ def main():
234236
final_rw_data[species][idx]["tpr"],
235237
color=colors[i],
236238
lw=2,
237-
label=f"{species} (area = %0.2f)" % final_rw_data[species][idx]["roc"],
239+
label=f"{species_title[i]} (area = %0.2f)" % final_rw_data[species][0]["roc"],
238240
)
239241

240242
ax.set_xlim([0.0, 1.0])
@@ -267,7 +269,7 @@ def main():
267269
final_rw_data[species][idx]["precision"],
268270
color=colors[i],
269271
lw=2,
270-
label=f"{species} (area = %0.2f)" % final_rw_data[species][idx]["roc"],
272+
label=f"{species_title[i]} (area = %0.2f)" % final_rw_data[species][0]["pr"],
271273
)
272274

273275
ax.set_xlim([0.0, 1.0])
3.27 KB
Loading
3.24 KB
Loading
3.31 KB
Loading
3.3 KB
Loading

results/images/rw_pr.png

5.73 KB
Loading

results/images/rw_roc.png

5.71 KB
Loading

0 commit comments

Comments
 (0)