Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
update R package
  • Loading branch information
Ghanbari committed Sep 7, 2017
1 parent 339bb56 commit cffdbc9
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions README.md
Expand Up @@ -87,8 +87,7 @@ ggplot(dat, aes(x=score,color=name))+ theme_bw() + geom_density(size=1.5)+scale
ggsave(“ScoreDistribution.png”, plot = last_plot(), device =png”)
```

When you decide for the threshold you can visualize the resulted network (see section [Visualization of the network](### Visualization of the network
) ) and get all the links with a score higher than the threshold (see subsection [Get only the links with a score higher than a threshold](####Get only the links with a score higher than a threshold) )
When you decide for the threshold you can visualize the resulted network (see section [Visualization of the network](#visualization-of-the-network) ) and get all the links with a score higher than the threshold (see subsection [Get only the links with a score higher than a threshold](#get-only-the-links-with-a-score-higher-than-a-threshold) )


However, we provide a threshold selection method based on the [fisher z-transformation](https://en.wikipedia.org/wiki/Fisher_transformation). You can compute the threshold for the DREAM4 data with the following command where:
Expand All @@ -99,18 +98,18 @@ However, we provide a threshold selection method based on the [fisher z-transfor
* `nvar` is the number of variables (number of columns of input matrix for (reg-)DPM )

```r
fisher_test(dpmres, alpha=0.05, nsamp=nrow(dream4), nnodes=ncol(dream4))$threshold
fisher_test(regdpmres, alpha=0.05, nsamp=nrow(dream4), nnodes=ncol(dream4))$threshold
tr <- fisher_test(dpmres, alpha=0.05, nsamp=nrow(dream4), nnodes=ncol(dream4))$threshold
tr <- fisher_test(regdpmres, alpha=0.05, nsamp=nrow(dream4), nnodes=ncol(dream4))$threshold
```

You can also get all the significant links based on fisher z-transformation at significance level alpha:
```r
fisher_test(dpmres, alpha=0.05, nsamp=nrow(dream4), nnodes=ncol(dream4))$Listlink
fisher_test(regdpmres, alpha=0.05, nsamp=nrow(dream4), nnodes=ncol(dream4))$Listlink
dpm_sig_links <- fisher_test(dpmres, alpha=0.05, nsamp=nrow(dream4), nnodes=ncol(dream4))$Listlink
regdpm_sig_links <- fisher_test(regdpmres, alpha=0.05, nsamp=nrow(dream4), nnodes=ncol(dream4))$Listlink
```

As an alternative, you can select the top-ranked links based on (reg.)DPM score which are most likely to be true links.
See section [Get only the top-ranked links](####get only the top-ranked links)
See section [Get only the top ranked links](#get-only-the-top-ranked-links)

### Get the list of the links
You need to first install the necessary R packages from CRAN:
Expand Down Expand Up @@ -146,7 +145,7 @@ regdpm_links <- get_link(regdpmres,threshold = 0.2)
dim(regdpm_links)
head(regdpm_links)
```
#### Get only the top-ranked links
#### Get only the top ranked links

If you are interested in extracting the top links with the highest scores, use the parameter `top_ranked` and specify the number of top-ranked links to report:

Expand Down

0 comments on commit cffdbc9

Please sign in to comment.