Skip to content

Commit

Permalink
modify epsilon adaptive threshold number to 10 to increase number of …
Browse files Browse the repository at this point in the history
…accountable results
  • Loading branch information
ashuaibi7 committed Jan 15, 2025
1 parent bdfb868 commit 6cdcc85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions analysis/top_ranking_pairs_network_visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,19 @@ def build_argument_parser():
subtypes = os.listdir(args.results_dir)
for subtype in subtypes:
results_fn = os.path.join(args.results_dir, subtype, "complete_pairwise_ixn_results.csv")
cnt_mtx_fn = os.path.join(args.results_dir, subtype, "count_matrix.csv")
decoy_genes_fn = os.path.join(args.decoy_genes_dir, f"{subtype}_decoy_genes.txt")
if not os.path.exists(results_fn) or not os.path.exists(decoy_genes_fn):
logging.info(f"Skipping {subtype} since input files not found")
continue
results_df = pd.read_csv(results_fn)
decoy_genes = set(pd.read_csv(decoy_genes_fn, header=None, names=["Gene"])["Gene"])
num_samples = pd.read_csv(cnt_mtx_fn, index_col=0).shape[0]
draw_network_gridplot_across_methods(
args.top_k,
subtype,
driver_genes,
decoy_genes,
results_df,
num_samples,
)
5 changes: 2 additions & 3 deletions src/dialect/utils/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
DECOY_GENE_COLOR = "#FFB3B3" # Pastel red for decoy genes
DRIVER_GENE_COLOR = "#A3C1DA" # Blue-gray for driver genes
EDGE_COLOR = "black"
EPSILON_MUTATION_COUNT = 20 # minimum count of mutations
EPSILON_MUTATION_COUNT = 10 # minimum count of mutations
PVALUE_THRESHOLD = 1


Expand Down Expand Up @@ -144,6 +144,7 @@ def draw_network_gridplot_across_methods(
driver_genes,
decoy_genes,
results_df,
num_samples,
):
# TODO: move this to shared location to use across this and decoy gene plot
methods = {
Expand All @@ -154,8 +155,6 @@ def draw_network_gridplot_across_methods(
"WeSME": "WeSME P-Val",
}

num_samples = results_df.shape[0]

fig, axes = plt.subplots(2, 3, figsize=(24, 16))
fig.suptitle(f"Top 10 Ranked ME Pairs in {subtype}", fontsize=42, y=0.999)
for idx, (method, col) in enumerate(methods.items()):
Expand Down

0 comments on commit 6cdcc85

Please sign in to comment.