Learn R Programming

⚠️There's a newer version (3.1.0) of this package.Take me there.

MRPC builds on existing PC algorithms and learns a causal network with increased accuracy. The inferred causal network contains directed and undirected edges, with the direction indicating causality. For genomic data, MRPC determines edge direction under the principle of Mendelian randomization when genotype and molecular phenotype (e.g. gene expression) data are both available at the individual level. Nodes in the inferred network may be a genotype or a molecular phenotype.
The R package MRPC is available at https://github.com/audreyqyfu/mrpc.

Installation

1. Installation of the most recent version from GitHub.

First install the R package devtools available on CRAN, if it is not already installed. This package provides function install_github() that enables installing packages directly from github with the following command.

Invoke R and then type with the following command:

R> install.packages ("devtools")
R> library (devtools)
#install R packages that MRPC depends on before running the next line 
#see details below
R>install_github ("audreyqyfu/mrpc")

MRPC depends on several R packages from CRAN and from Bioconductor. It is likely that some of these packages are not installed on your computer. If the R package is available on CRAN, you may use the following command line for installation (change packagename to the name of the package to be installed, e.g, bnlearn, pcalg, etc.) before running function install_github:

R> install.packages("packagename")

Note that the package git2r is one of the required packages. However, currently (as of July 2018) its binary release for OS X is behind its source version and its Windows binary release. If you are using OS X, you need to install the slightly-behind binary release for OS X.

The following Bioconductor packages also need to be installed before running function install_github:

R> source ('https://bioconductor.org/biocLite.R')
R> biocLite ('RBGL')
R> biocLite ('Rgraphviz')
R> biocLite ('GO.db')
R> biocLite ('impute')
R> biocLite ('preprocessCore')

2. Installation from the source of a released package.

Download the package source MRPC_xxx.tar.gz.

In Terminal, navigate to the directory where the package is stored, and run the following command line:

$ R CMD INSTALL MRPC_xxx.tar.gz

Again, you may need to first install the Bioconductor packages that MRPC depends on using the instructions above. Alternatively, you may also run the following command line in R, after changing the working directory to where MRPC_xxx.tar.gz is stored on your computer:

R> install.packages("MRPC_xxx.tar.gz", repos = NULL, type="source")

Using MRPC

After installation, load the MRPC package into R:

R> library (MRPC)

Bring up the documentation of the package:

R> library (help=MRPC)

Copy Link

Version

Install

install.packages('MRPC')

Monthly Downloads

241

Version

2.0.0

License

GPL (>= 2)

Maintainer

Md Badsha

Last Published

October 13th, 2018

Functions in MRPC (2.0.0)

Case_NP

Case for No Parent Generating Simulated Data
RobustCor

Robust Correlation Matrix
mpinv

Function of Calculate Inverse Matrix
seqDiff

Deviation of the Two Sequnces
MRPCtruth

Truth Models for MRPC Examples
Example_Outlier

Impact of outliers on graph inference
ExampleMRPC

Example Data for Simple and Complex Model
aSHD

Adjusted Structural Hamming Distance (aSHD)
MRPCclass-class

Class of MRPC Algorithm Results
Data_GEUVADIS

Data from GEUVADIS
empty

Check empty matrix
SeqFDR

Sequential FDR
simu.data_multiparent

Data for Multiple Parent Model
simu.data_starshaped

Data for Star Model
SimulatedData

Generating Simulated Data
Recall_Precision

Performance Evaluation by Recall and Precision in MRPC
SimulationDemo

Same data but different node orderings.
ModiSkeleton

Draw Undirected Graph using the Modified Skeleton Function
Data_withoutoutlier

Example Data without outliers
InferenceAccuracyExample

Comparison of inference accuracy with and without a v-structure
MRPC

Estimate a causal network using the MRPC Algorithm
simu.data_layered

Data for the Layered Model
simu.data_M0

Data for Model 0
simu.data_M3

Data for Model 3
simu.data_M4

Data for Model 4
Case_1P

Case for One Parent Generating Simulated Data
simu.data_M1

Data for Model 1
simu.data_M2

Data for Model 2
Case_2P

Case for Two Parents Generating Simulated Data
DendroModuleGraph

Visualization of Nodes by Dendrogram with Modules and Inferred Graph
EdgeOrientation

Edge Orientation Rules for the MRPC Algorithm
Case_3P

Case for Three Parent Generating Simulated Data
Data_withoutlier

Example Data with outlier
Cut_Modules

Cut the Modules