Skip to content

Commit

Permalink
[GEN-1326] Remove panel overlap charts (#570)
Browse files Browse the repository at this point in the history
* Remove panel overlap charts

* Remove unused function

* remove upset

* Remove upsetR
  • Loading branch information
thomasyu888 authored Aug 14, 2024
1 parent 2aabb55 commit 238970f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 83 deletions.
1 change: 0 additions & 1 deletion R/install_packages.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ renv::restore()
library(synapser)
library(dplyr)
library(argparse)
library(UpSetR)
library(rmarkdown)
library(testthat)
library(VariantAnnotation)
Expand Down
82 changes: 0 additions & 82 deletions templates/dashboardTemplate.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ title: '`r release`'
suppressMessages(library(synapser))
foo = capture.output(synLogin())
suppressMessages(library(ggplot2))
suppressMessages(library(UpSetR))
suppressMessages(library(RColorBrewer))
suppressMessages(library(jsonlite))
suppressMessages(library(knitr))
Expand Down Expand Up @@ -57,19 +56,6 @@ getFileDf <- function(fileName, releaseFiles) {
}
}
makePanelList = function(assay, bed) {
return(unique(as.character(bed$Hugo_Symbol[bed$SEQ_PIPELINE_ID == assay])))
}
plotPanelOverlap <- function(bed, assays) {
listInput = lapply(as.list(assays), function(x) { makePanelList(x, bed) })
names(listInput) = assays
upset(fromList(listInput),
order.by = "freq",
nsets = length(assays),
nintersects = 30)
}
plotCenterXRace <- function(genieClinData) {
t = as.data.frame.matrix(table(genieClinData$CENTER,genieClinData$PRIMARY_RACE))
t = data.frame(n = rowSums(t),t)
Expand Down Expand Up @@ -672,74 +658,6 @@ if (!is.null(assay_infodf) & !is.null(this_bed)) {

---

## Gene Panel Overlaps
This section will show the number of genes that overlap between the myeloid, small and large GENIE panels.

```{r bed_process, include=F}
if (!is.null(this_bed)) {
this_bed <- this_bed[this_bed$Feature_Type == "exon",]
#Make it so that I use include in panel
if (!is.null(this_bed$includeInPanel)) {
this_bed <- this_bed[this_bed$includeInPanel == "True",]
}
noneExistentAssays = this_assays[!this_assays %in% this_bed$SEQ_ASSAY_ID]
if (length(noneExistentAssays) > 0) {
print(paste("These assays do not have bed files associated with them: ",
paste(noneExistentAssays, collapse = ", ")))
}
this_assays = this_assays[this_assays %in% this_bed$SEQ_ASSAY_ID]
myeloid_panels = c("VICC-01-MYELOID","UHN-54-V1","UCHI-ONCOHEME55-V1","CHOP-HEMEP","MSK-IMPACT-HEME-399")
myeloid = this_assays[this_assays %in% myeloid_panels]
normal = this_assays[!this_assays %in% myeloid_panels]
seq_pipeline_ids = unique(
this_bed$SEQ_PIPELINE_ID[this_bed$SEQ_ASSAY_ID %in% normal]
)
smallPanels = c()
largePanels = c()
for (panel in seq_pipeline_ids) {
panelDf = this_bed[this_bed$SEQ_PIPELINE_ID == panel,]
if (length(table(panelDf$Hugo_Symbol)) < 100) {
smallPanels = c(smallPanels, panel)
# Don't add to panel if more than 1500 genes
} else if (length(table(panelDf$Hugo_Symbol)) < 1500) {
largePanels = c(largePanels, panel)
}
}
} else {
largePanels = c()
smallPanels = c()
myeloid = c()
}
```

### Meyloid Gene Panels

```{r myeloid_panel_upset}
if (length(myeloid) > 1) {
plotPanelOverlap(this_bed, myeloid)
}
```

### Small (<100) Gene panels

```{r small_panel_upset, fig.height=12}
if (length(smallPanels) > 1) {
plotPanelOverlap(this_bed, smallPanels)
}
```

### Large ($\geq$ 100) Gene panels

```{r large_panel_upset, fig.height=12}
if (length(largePanels) > 1) {
plotPanelOverlap(this_bed, largePanels)
}
```

---

## Possible Non-center Related Data Issues

This section includes QC issues that are mostly related to the Sage Bionetworks pipeline, Genome Nexus or _maybe_ center related issues.
Expand Down

0 comments on commit 238970f

Please sign in to comment.