---
title: "A Short Introduction to the immcp Package"
author: "Author: Yuanlong Hu"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{A Short Introduction to the immcp Package}
  %\VignettePackage{immcp}
  %\VignetteEngine{knitr::rmarkdown}
  %\usepackage[utf8]{inputenc}
  %\VignetteEncoding{UTF-8}
---

<!-- ```{r, message = FALSE, echo = FALSE} -->
<!-- knitr::opts_chunk$set( -->
<!--   collapse = TRUE, -->
<!--   comment = "#>", -->
<!--   fig.width = 4, -->
<!--   fig.height = 3 -->
<!-- ) -->
<!-- ``` -->

This R package was a toolkit for TCM polypharmacology research. Based on the biological descriptors and drug-disease interaction networks, it can analyze the potential polypharmacological mechanisms of TCM and be used for drug repositioning in TCM. 

# 1 Prepare data

```{r,eval=FALSE}
library(immcp)
data(drugdeom)
names(drugdemo)
```

```{r,eval=FALSE}
drug_herb <- PrepareData(drugdemo$drug_herb, from = "drug", to="herb")
herb_compound <- PrepareData(drugdemo$herb_compound, from = "herb", to="compound")
compound_target <- PrepareData(drugdemo$compound_target, from = "compound", to="target")
disease <- PrepareData(drugdemo$disease, diseaseID = "disease",from = "target", to="target")
BasicData <- CreateBasicData(drug_herb, herb_compound, compound_target, diseasenet = disease)
```

# 2 Network Visualization
```{r,eval=FALSE}
DisDrugNet <- CreateDisDrugNet(BasicData, drug = "Drug1",     disease = "disease")
plot_graph(DisDrugNet, size = 20)
```

