diff --git a/README.md b/README.md index 9a0ad34..f5c287a 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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: @@ -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: