Skip to content

Commit

Permalink
modify the p value thresholds to a single constant to use across meth…
Browse files Browse the repository at this point in the history
…ods and experiment with changes more easily
  • Loading branch information
ashuaibi7 committed Jan 15, 2025
1 parent 688dc5d commit 0231bbd
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/dialect/utils/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
DRIVER_GENE_COLOR = "#A3C1DA" # Blue-gray for driver genes
EDGE_COLOR = "black"
EPSILON = 0.02 # DIALECT Threshold for Tau_1X and Tau_X1
PVALUE_THRESHOLD = 0.05


# ---------------------------------------------------------------------------- #
Expand Down Expand Up @@ -171,11 +172,17 @@ def draw_network_gridplot_across_methods(
elif method == "MEGSA":
top_ranking_pairs = top_ranking_pairs[top_ranking_pairs["MEGSA S-Score (LRT)"] > 0]
elif method == "DISCOVER":
top_ranking_pairs = top_ranking_pairs[top_ranking_pairs["Discover ME P-Val"] < 0.05]
top_ranking_pairs = top_ranking_pairs[
top_ranking_pairs["Discover ME P-Val"] < PVALUE_THRESHOLD
]
elif method == "Fisher's Exact Test":
top_ranking_pairs = top_ranking_pairs[top_ranking_pairs["Fisher's ME P-Val"] < 0.05]
top_ranking_pairs = top_ranking_pairs[
top_ranking_pairs["Fisher's ME P-Val"] < PVALUE_THRESHOLD
]
elif method == "WeSME":
top_ranking_pairs = top_ranking_pairs[top_ranking_pairs["WeSME P-Val"] < 0.05]
top_ranking_pairs = top_ranking_pairs[
top_ranking_pairs["WeSME P-Val"] < PVALUE_THRESHOLD
]

edges = top_ranking_pairs[["Gene A", "Gene B"]].values
G = nx.Graph()
Expand Down

0 comments on commit 0231bbd

Please sign in to comment.