knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.width = 4, fig.height = 3 )
Traditional Chinese Medicine(TCM) has a history of more than 2000 years and has accumulated a great deal of clinical experience. The herbal prescription is one of the main treatment methods of traditional Chinese medicine. How to find a candidate prescription for a disease defined by modern medicine is an urgent problem to be solved.
The pathway fingerprint (Ye, et.al,2012) is a method to indicate the profile of significant pathways being influenced by drugs, which may hint drug functions. Potential therapeutic prescription can be found based on the similarity of pathway fingerprints between disease and prescription.
drugSample is a demo dataset, which contains two data frame and two vector:
PrepareData can prepare the format of input data.
CreateBasicData can craete a
drug_herb <- PrepareData(drugSample$drug_herb, col1 = "drug", col2 = "herb") herb_target <- PrepareData(drugSample$herb_target, col1 = "herb", col2 = "target", format = "basket", sep = ", ") drug_target <- CreateBasicData(drug_herb, herb_target)
extrFP() can calculate the pathway fingerprints based on
KEGG pathawy(except "Human Diseases" and "Drug Development").
disease_biomarker is a a vector of gene symbol, you can use
method = "enrich", such as
disease_biomarker is a a vector of logFC values named by gene symbol, you can use
method = "gsea", such as
FP <- extrFP(drug_target = drug_target, disease_biomarker = drugSample$disease_biomarker, method = "enrich")
score_fp() can calculate the Tanimoto coefficient of pathway fingerprint between disease and prescription as score. The score is adjusted by permutation test. The results contain:
res <- score_fp(FP, n = 100)
get_result(res, pvalueCutoff = 0.05)
We can look at our distribution using
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.