Skip to content

Commit

Permalink
fix: enhance likely passenger proportion plot
Browse files Browse the repository at this point in the history
- switch from boxplot to violinplot to better show distribution of subtypes
- modify postprocessing scripts to better handle me and co cases
  • Loading branch information
ashuaibi7 committed Feb 1, 2025
1 parent 22a36d2 commit 89d5557
Show file tree
Hide file tree
Showing 6 changed files with 273 additions and 443 deletions.
22 changes: 12 additions & 10 deletions analysis/cbase_results_analysis.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
"""TODO: Add docstring."""

from argparse import ArgumentParser
from pathlib import Path

import pandas as pd
from argparse import ArgumentParser

from dialect.utils.helpers import (
load_likely_passenger_genes,
load_putative_driver_genes,
)
from dialect.utils.plotting import (
draw_cbase_likely_passenger_proportion_barplot,
draw_cbase_top_likely_passenger_upset,
draw_gene_expected_and_observed_mutations_barplot,
)

from dialect.utils.helpers import (
load_putative_driver_genes,
load_likely_passenger_genes,
)


# ------------------------------------------------------------------------------------ #
# HELPER FUNCTIONS #
Expand Down Expand Up @@ -59,8 +59,12 @@ def load_all_subtype_single_gene_results(results_dir: Path, num_genes: int) -> d
"""TODO: Add docstring."""
subtype_to_results_df = {}
for single_gene_results_fn in results_dir.iterdir():
subtype = single_gene_results_fn.stem # TODO change for real data
subtype_results_df = pd.read_csv(single_gene_results_fn) # TODO update path
subtype = (
single_gene_results_fn.stem
) # TODO: update to take in server results dir
subtype_results_df = pd.read_csv(
single_gene_results_fn
) # TODO: update to take in server results dir
sorted_subtype_results_df = subtype_results_df.sort_values(
by="CBaSE Pos. Sel. Phi",
ascending=False,
Expand Down Expand Up @@ -166,8 +170,6 @@ def main() -> None:
putative_driver_genes,
out_fn=args.out_dir / f"{subtype}",
)
print(args.out_dir / f"{subtype}")
quit()


if __name__ == "__main__":
Expand Down
214 changes: 0 additions & 214 deletions analysis/decoy_genes_top_ranking_pairs.py

This file was deleted.

Loading

0 comments on commit 89d5557

Please sign in to comment.