forked from apratap/PCBC_DataExplorer_ShinyApp
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from Sage-Bionetworks/dev
merge develop
- Loading branch information
Showing
6 changed files
with
447 additions
and
412 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
flog.debug("Starting App", name="server") | ||
|
||
#source the heatmap code | ||
source("expression_heatmap.R") | ||
|
||
#source generic heatmap functions | ||
source("generic_annotation_functions.R") | ||
|
||
#get the global functions | ||
source("global_functions.R") | ||
|
||
############################### | ||
## Load precomputed data | ||
############################### | ||
|
||
source("loadPrecomputedData.R") | ||
|
||
############################### | ||
## Load synapse data | ||
############################### | ||
|
||
|
||
## This may break! | ||
## Cache the data thats actually used | ||
# save(list=c("combined_metadata", "eset.mRNA", "eset.miRNA", "eset.meth", "meth_to_gene", "miRNA_to_genes", "pathways_list"), | ||
# file="cached_data.RData") | ||
# f <- File("cached_data.RData", parentId="syn4108202") | ||
# o <- synStore(f) | ||
|
||
# Use only these metadata columns | ||
metadataColsToUse <- c("Cell_Line_Type", "Reprogramming_Gene_Combination", | ||
"Reprogramming_Vector_Type", "Tissue_of_Origin", "Diffname_short", | ||
"Cell_Type_of_Origin", "Gender", "Originating_Lab_ID", | ||
"Cell_Line_of_Origin", "Donor_ID", "Originating_Lab", "Cell_Type", | ||
"Culture_Conditions") | ||
# metadataColsToUse <- c("Cell_Line_Type") | ||
metadataIdCol <- "UID" | ||
|
||
# cacheId <- "syn4108151" | ||
cacheId <- NA | ||
# cacheId <- "local" | ||
|
||
if (!is.na(cacheId)) { | ||
## Caching for testing | ||
if (cacheId == "local") { | ||
load("cached_data.RData") | ||
} | ||
else { | ||
o <- synGet(cacheId) | ||
load(getFileLocation(o)) | ||
} | ||
flog.debug("Using cached data loaded from Synapse", name="server") | ||
} else { | ||
#get the MSigDB data | ||
source("msigdb_data_prep.R") | ||
|
||
#get the mRNA expression data | ||
source("mRNA_data_prep.R") | ||
|
||
#get the miRNA expression data | ||
source("miRNA_data_prep.R") | ||
|
||
#get the methylation data | ||
source("methylation_data_prep.R") | ||
|
||
#prepare single global metadata | ||
combined_metadata <- rbind(mRNA_metadata, miRNA_metadata, meth_metadata, deparse.level = 0) | ||
|
||
# Sample column required for expression matrix filtering | ||
combined_metadata$Sample <- rownames(combined_metadata) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#get the MsigDB object | ||
flog.info('Reading the MSIGDB object from synapse...', name='synapse') | ||
MSIGDB_syn<-synGet("syn2227979") | ||
MSIGDB_syn<-synGet("syn11519351") | ||
load(MSIGDB_syn@filePath) #available as MSigDB R object | ||
pathways_list <- c(MSigDB$C2.CP.BIOCARTA, MSigDB$C2.CP.KEGG, MSigDB$C2.CP.REACTOME) |
Oops, something went wrong.