require(GSVA)
require(parallel)
## Get simulated breast cancer gene expression profile data.
Geneexp<-get("Geneexp")
## Obtain sample subtype data and calculate breast cancer subtype-specific drugs.
Subtype<-system.file("extdata", "Subtype_labels.cls", package = "SubtypeDrug")
## Subpathway list data and drug subpathway association data
## were stored in packet `SubtypeDrugData`.
## `SubtypeDrugData` has been uploaded to the github repository.
## If subpathway list data and drug subpathway association data are needed,
## users can download and install through `install_github` function and
## set parameter url=""hanjunwei-lab/SubtypeDrugData".
## After installing and loading package `SubtypeDrugData`,
## users can use the following command to get the data.
## Get subpathway list data.
## If the gene expression profile contains gene Symbol.
## data(SpwSymbolList)
## If the gene expression profile contains gene Entrezid.
## data(SpwEntrezidList)
## Get drug subpathway association data.
## data(DrugSpwData)
## Identify breast subtype-specific drugs.
## Subtype_drugs<-PrioSubtypeDrug(Geneexp,Subtype,"Control",SpwSymbolList,drug.spw.data=DrugSpwData,
## E_FDR=1,S_FDR=1)
## Identify breast cancer-related drugs in only two types of samples: breast cancer and control.
Cancer<-system.file("extdata", "Cancer_normal_labels.cls", package = "SubtypeDrug")
## Disease_drugs<-PrioSubtypeDrug(Geneexp,Cancer,"Control",SpwSymbolList,drug.spw.data=DrugSpwData,
## E_FDR=1,S_FDR=1)
## The function PrioSubtypeDrug() can also support user-defined data.
Geneexp<-get("GeneexpT")
## User-defined drug regulation data should resemble the structure below
UserDS<-get("UserDST")
str(UserDS)
## Need to load gene set data consistent with drug regulation data.
UserGS<-get("UserGST")
str(UserGS)
Drugs<-PrioSubtypeDrug(Geneexp,Cancer,"Control",UserGS,spw.min.sz=1,
drug.spw.data=UserDS,drug.spw.min.sz=1,
nperm=10,E_FDR=1,S_FDR=1)
Run the code above in your browser using DataLab