Skip to content

Commit

Permalink
compare expression values between full vs partial tcga cohort
Browse files Browse the repository at this point in the history
  • Loading branch information
skanwal committed Jul 11, 2024
1 parent a395332 commit 617b0bb
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions inst/scripts/compare_piedb.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
require(dplyr)
require(readr)
require(here)
require(glue)
require(tibble)
require(tidyr)

dev <- readr::read_csv("~/UMCCR/data/wts/RNAsum/reference_update_comp/SBJ04426/dev/genes.expr.perc.csv")
pro <- readr::read_csv("~/UMCCR/data/wts/RNAsum/reference_update_comp/SBJ04426/pro/genes.expr.perc.csv")
dev <- readr::read_csv("~/UMCCR/data/wts/RNAsum/reference_update_comp/SBJ04187/dev/genes.expr.perc.csv")
pro <- readr::read_csv("~/UMCCR/data/wts/RNAsum/reference_update_comp/SBJ04187/pro/genes.expr.perc.csv")
cancer_genes <- readr::read_tsv("~/UMCCR/research/data/cancer_gene_list/somatic_panel-v24.03.0.tsv")

# now explore expression differences in reference and patient columns
# between dev and prod.
df <- dplyr::left_join(dev, pro, by = "Gene", suffix = c(".dev", ".pro")) |>
dplyr::mutate(
# Ref_equal = `KIRP (TCGA).dev` == `KIRP (TCGA).pro`,
# Ref_equal = `PANCAN (TCGA).dev` == `PANCAN (TCGA).pro`,
Ref_equal = `BRCA (TCGA).dev` == `BRCA (TCGA).pro`,
Pat_equal = Patient.dev == Patient.pro,
# Ref_diff = abs(`PANCAN (TCGA).dev` - `PANCAN (TCGA).pro`),
Ref_diff = abs(`BRCA (TCGA).dev` - `BRCA (TCGA).pro`),
Pat_diff = abs(Patient.dev - Patient.pro)
) |>
dplyr::select(Gene, contains("BRCA"), contains("PANCAN"), Ref_diff, contains("Patient"), Pat_diff, contains("equal")) |>
dplyr::filter(Pat_diff > 0) |>
dplyr::filter(Gene %in% cancer_genes$ensembl_gene_symbol) |>
dplyr::arrange(desc(Pat_diff)) |>
dplyr::arrange(desc(Ref_diff)) |>
datatable()

# plot Ref_diff values
hist(df$Ref_diff, breaks = 100)

0 comments on commit 617b0bb

Please sign in to comment.