Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Remove R script/notebook package installs from gene-set-enrichment and ATRT (Part 3 of N) #703

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions analyses/gene-set-enrichment-analysis/01-conduct-gsea-analysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@ library(optparse)
# Magrittr pipe
`%>%` <- dplyr::`%>%`

if (!("msigdbr" %in% installed.packages())) {
install.packages("msigdbr")
}
if (!("BiocManager" %in% installed.packages())) {
install.packages("BiocManager")
}
library(BiocManager, quietly = TRUE)
if (!("GSVA" %in% installed.packages())) {
BiocManager::install("GSVA")
}
library(msigdbr) ## Contains the hallmark data sets
library(GSVA) ## Performs GSEA analysis

Expand All @@ -69,6 +59,7 @@ option_list <- list(
## Read in arguments
opt_parser <- optparse::OptionParser(option_list = option_list)
opt <- optparse::parse_args(opt_parser)

if (is.na(opt$input_file)) stop("\n\nERROR: You must provide an input file with expression data with the flag --input, assumed to be in the `data/` directory of the OpenPBTA repository..")
if (is.na(opt$output_file)) stop("\n\nERROR: You must provide an output file for saving GSVA scores with the flag --output, assumed to be placed in the `results/` directory of this analysis.")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@ of the repository as follows:
```{r}
# Get `magrittr` pipe
`%>%` <- dplyr::`%>%`

# Install `DT` and `htmlwidgets` packages for displaying tables
if (!("DT" %in% installed.packages())) {
install.packages("DT")
}
if (!("htmlwidgets" %in% installed.packages())) {
install.packages("htmlwidgets")
}
```

## Directories and Files
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,6 @@

#### Set Up --------------------------------------------------------------------

# Install and load in ComplexHeatMap
if (!("ComplexHeatmap" %in% installed.packages())) {
install.packages("ComplexHeatmap")
}
library(ComplexHeatmap)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I accidentally deleted this so I ended up adding in the necessary ComplexHeatmap:: bits.


if (!("matrixStats" %in% installed.packages())) {
install.packages("matrixStats")
}

if (!("ggfortify" %in% installed.packages())) {
install.packages("ggfortify")
}

library(ggfortify)
library(dplyr)

Expand Down Expand Up @@ -102,7 +88,7 @@ annotation_df <- final_df %>%
tibble::column_to_rownames("sample_id")

# Make into an annotation object
column_annotation <- HeatmapAnnotation(df = annotation_df)
column_annotation <- ComplexHeatmap::HeatmapAnnotation(df = annotation_df)

# Plot and save the Heatmap
png(
Expand All @@ -111,7 +97,7 @@ png(
height = 604,
units = "px"
)
Heatmap(
ComplexHeatmap::Heatmap(
high_var_exp,
heatmap_legend_param = list(title = "zscore"),
top_annotation = column_annotation,
Expand Down
Binary file modified analyses/molecular-subtyping-ATRT/plots/atrt_heatmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.