Permalink
Browse files

Fix names

  • Loading branch information...
1 parent b6bd60c commit 176dabfc64a17af3eae00584852b1e97b63f1eb8 @cheeyeelim committed Dec 11, 2015
Showing with 153 additions and 1,255 deletions.
  1. +1 −1 DESCRIPTION
  2. +2 −2 NAMESPACE
  3. +2 −2 R/RcppExports.R
  4. +19 −0 R/btr.R
  5. +21 −21 README.md
  6. +11 −0 man/BTR.Rd
  7. +1 −1 man/BoolModel-class.Rd
  8. +1 −1 man/amat_to_bm.Rd
  9. +1 −1 man/bm_to_amat.Rd
  10. +1 −1 man/bm_to_df.Rd
  11. +2 −2 man/bon_bmodel.Rd
  12. +2 −2 man/bon_istate.Rd
  13. +1 −1 man/calc_mscore.Rd
  14. +1 −1 man/calc_roc.Rd
  15. +1 −1 man/check_and.Rd
  16. +2 −2 man/compress_bmodel.Rd
  17. +2 −2 man/decompress_bmodel.Rd
  18. +1 −1 man/decreate_boolmodel.Rd
  19. +1 −1 man/df_to_bm.Rd
  20. +1 −1 man/emodel1.Rd
  21. +1 −1 man/emodel2.Rd
  22. +1 −1 man/emodel3.Rd
  23. +1 −1 man/eval_bool.Rd
  24. +1 −1 man/extract_term.Rd
  25. +1 −1 man/filter_dflist.Rd
  26. +1 −1 man/gen_one_rmodel.Rd
  27. +1 −1 man/gen_singlerule.Rd
  28. +2 −2 man/gen_two_rmodel.Rd
  29. +2 −2 man/gen_two_rmodel_dag.Rd
  30. +1 −1 man/get_encodings.Rd
  31. +1 −1 man/grow_bmodel.Rd
  32. +1 −1 man/initialise_data.Rd
  33. +1 −1 man/initialise_model.Rd
  34. +1 −1 man/initialise_raw_data.Rd
  35. +2 −2 man/krum_bmodel.Rd
  36. +2 −2 man/krum_istate.Rd
  37. +1 −1 man/m_score.Rd
  38. +1 −1 man/man_dist.Rd
  39. +1 −1 man/match_term.Rd
  40. +1 −1 man/minmod_internal.Rd
  41. +1 −1 man/minmod_model.Rd
  42. +1 −1 man/model_consensus.Rd
  43. +1 −1 man/model_dist.Rd
  44. +1 −1 man/model_setdiff.Rd
  45. +3 −8 man/model_train.Rd
  46. +1 −1 man/outgenysis_model.Rd
  47. +1 −1 man/outgraph_model.Rd
  48. +1 −1 man/outstate_graph.Rd
  49. +1 −1 man/plotBM.Rd
  50. +1 −1 man/printBM.Rd
  51. +1 −1 man/rcpp_simulate.Rd
  52. +1 −1 man/rcpp_validate.Rd
  53. +1 −1 man/simulate_model.Rd
  54. +1 −1 man/unique_raw_data.Rd
  55. +1 −1 man/validate_adjmat.Rd
  56. +1 −1 man/vcat.Rd
  57. +1 −1 man/which.random.min.Rd
  58. +2 −2 man/wilson_raw_data.Rd
  59. +2 −2 man/wilson_raw_rnaseq.Rd
  60. +1 −1 man/writeBM.Rd
  61. +2 −2 src/RcppExports.cpp
  62. +0 −604 vignettes/booltrainer.html
  63. +0 −529 vignettes/booltrainer.md
  64. BIN vignettes/booltrainer.pdf
  65. BIN vignettes/booltrainer_files/figure-markdown_github/unnamed-chunk-15-1.png
  66. BIN vignettes/booltrainer_files/figure-markdown_github/unnamed-chunk-17-1.png
  67. BIN vignettes/booltrainer_files/figure-markdown_github/unnamed-chunk-21-1.png
  68. BIN vignettes/booltrainer_files/figure-markdown_github/unnamed-chunk-23-1.png
  69. BIN vignettes/booltrainer_files/figure-markdown_github/unnamed-chunk-29-1.png
  70. BIN vignettes/booltrainer_files/figure-markdown_github/unnamed-chunk-31-1.png
  71. +29 −23 vignettes/{booltrainer.Rmd → btr.Rmd}
View
@@ -1,4 +1,4 @@
-Package: BoolTraineR
+Package: BTR
Type: Package
Title: Tools For Training and Analysing Asynchronous Boolean Models
Version: 1.1.3
View
@@ -1,4 +1,4 @@
-# Generated by roxygen2: do not edit by hand
+# Generated by roxygen2 (4.1.1): do not edit by hand
export(BoolModel)
export(amat_to_bm)
@@ -36,4 +36,4 @@ import(methods)
import(parallel)
importFrom(Rcpp,evalCpp)
importFrom(Rcpp,sourceCpp)
-useDynLib(BoolTraineR)
+useDynLib(BTR)
View
@@ -9,7 +9,7 @@
#' @param inf_mat matrix. It should be adjacency matrix of inferred network.
#' @param true_mat matrix. It should be adjacency matrix of true network.
rcpp_validate <- function(inf_mat, true_mat) {
- .Call('BoolTraineR_rcpp_validate', PACKAGE = 'BoolTraineR', inf_mat, true_mat)
+ .Call('BTR_rcpp_validate', PACKAGE = 'BTR', inf_mat, true_mat)
}
#' @title Simulate a Boolean model.
@@ -21,6 +21,6 @@ rcpp_validate <- function(inf_mat, true_mat) {
#' @param fstate data frame. It must have been initialised by initialise_data(), and has gene names as column names. Must contain only 1 row.
#' @param verbose logical. Indicates whether to output progress.
rcpp_simulate <- function(bmodel, fstate, verbose = FALSE) {
- .Call('BoolTraineR_rcpp_simulate', PACKAGE = 'BoolTraineR', bmodel, fstate, verbose)
+ .Call('BTR_rcpp_simulate', PACKAGE = 'BTR', bmodel, fstate, verbose)
}
View
19 R/btr.R
@@ -0,0 +1,19 @@
+#' @title BTR: A package for studying asynchronous Boolean models
+#'
+#' @description
+#' This package contains tools for Boolean model manipulation, as well as the search for the best Boolean model.
+#'
+#' @docType package
+#' @name BTR
+NULL
+
+## All the Roxygen codes below are for generating the correct NAMESPACE file.
+#' @import methods
+#' @import parallel
+#' @import foreach
+#' @import doParallel
+NULL
+
+#' @useDynLib BTR
+#' @importFrom Rcpp sourceCpp evalCpp
+NULL
View
@@ -2,7 +2,7 @@
- [Installation](#installation)
- [Input data format](#input-data-format)
- [Output format](#output-format)
-- [Useful functions in BoolTraineR](#useful-functions-in-booltrainer)
+- [Useful functions in BTR](#useful-functions-in-BTR)
- [Example workflows](#example-workflows)
- [Inferring model without an initial model](#inferring-model-without-an-initial-model)
- [Full workflow](#full-workflow)
@@ -33,26 +33,26 @@
Brief introduction
==================
-`BoolTraineR` is a model learning algorithm for reconstructing and training asynchronous Boolean models using single-cell expression data. Refer to the paper for more details on the concepts behind the algorithm. This vignette serves as a tutorial to demonstrate example workflows that can be adapted to individual cases experienced by users.
+`BTR` is a model learning algorithm for reconstructing and training asynchronous Boolean models using single-cell expression data. Refer to the paper for more details on the concepts behind the algorithm. This vignette serves as a tutorial to demonstrate example workflows that can be adapted to individual cases experienced by users.
-Running `BoolTraineR` is straightforward. However, note that depending on the (1) size of single-cell expression data and (2) complexity of Boolean model, `BoolTraineR` may take a long time to complete the computation. In such cases, it is advisable to use the built-in parallel processing capability of `BoolTraineR`. This can be easily achieved by using `doParallel` package, as illustrated in the example.
+Running `BTR` is straightforward. However, note that depending on the (1) size of single-cell expression data and (2) complexity of Boolean model, `BTR` may take a long time to complete the computation. In such cases, it is advisable to use the built-in parallel processing capability of `BTR`. This can be easily achieved by using `doParallel` package, as illustrated in the example.
Note that the examples presented in this vignette are different from the results presented in our paper. The examples presented here have been simplified to speed up the processing time.
Installation
============
-`BoolTraineR` can be installed from CRAN.
+`BTR` can be installed from CRAN.
``` r
-install.packages('BoolTraineR')
+install.packages('BTR')
```
Or from Github for the latest version. To install from Gitbub, you will require the `devtools` package.
``` r
install.packages('devtools')
-devtools::install_github("cheeyeelim/booltrainer")
+devtools::install_github("cheeyeelim/BTR")
```
Also install `doParallel` package if you intend to use parallel processing.
@@ -127,22 +127,22 @@ head(krum_istate)
Output format
=============
-BoolTraineR supports several output formats for Boolean models, as shown below.
+BTR supports several output formats for Boolean models, as shown below.
- `outgraph_model` - Outputs a Boolean model in a tab-delimited file with each line being an edge (i.e. gene interaction). This function also outputs a node attribute file, which can be used to distinguish gene and AND nodes in a graph plotting software. This format is readable by both Cytoscape and Gephi.
- `outgenysis_model` - Outputs a Boolean model in a space-delimited file with each line being an edge (i.e. gene interaction). This format is readable by genYsis (used for steady state analysis).
- `writeBM` - Outputs a Boolean model in a comma-delimited file similar in format to the input file format (i.e. two columns: genes and update functions).
-BoolTraineR can also output a state transition graph.
+BTR can also output a state transition graph.
- `outstate_graph` - Outputs a state space of a Boolean model simulated with an initial state. This format is readable by both Cytoscape and Gephi.
-Useful functions in BoolTraineR
+Useful functions in BTR
===============================
-Besides training Boolean models, BoolTraineR can be used for simulating a Boolean model asynchronously and calculate the score of a Boolean model with respect to a data.
+Besides training Boolean models, BTR can be used for simulating a Boolean model asynchronously and calculate the score of a Boolean model with respect to a data.
-- `model_train` - Core function in `BoolTraineR` that performs Boolean model inference.
+- `model_train` - Core function in `BTR` that performs Boolean model inference.
- `simulate_model` - Simulate a Boolean model asynchronously using an initial state, and return its state space.
- `calc_mscore` - Calculate a distance score for a Boolean model with respect to an expression data.
- `model_dist` - Calculate the number of genes in the update functions that differ between two Boolean models.
@@ -158,7 +158,7 @@ Inferring model without an initial model
This workflow is intended for use on inferring a Boolean model without an initial model.
-When no initial model is used, BoolTraineR will reconstruct gene interactions from a list of user-specified genes. If the number of genes in the expression data is low (e.g. in qPCR), it is also possible to use all the genes in the expression data.
+When no initial model is used, BTR will reconstruct gene interactions from a list of user-specified genes. If the number of genes in the expression data is low (e.g. in qPCR), it is also possible to use all the genes in the expression data.
### Full workflow
@@ -168,7 +168,7 @@ Full workflow is included here for easy referencing. Each step is discussed in f
set.seed(0) #use to ensure reproducibility. remove in actual use.
# (1) Setup paths and environment.
-library(BoolTraineR)
+library(BTR)
# If intending to use parallel processing, uncomment the following lines.
# library(doParallel) num_core = 4 #specify the number of cores to be used.
@@ -201,13 +201,13 @@ plotBM(final_model)
### Initial setup
-The first step is to load the `BoolTraineR` package. If you are intending to use parallel processing, you will also need to load the `doParallel` package. Then specify how many cores you intend to use using `registerDoParallel` from the `doParallel` package.
+The first step is to load the `BTR` package. If you are intending to use parallel processing, you will also need to load the `doParallel` package. Then specify how many cores you intend to use using `registerDoParallel` from the `doParallel` package.
``` r
set.seed(0) #use to ensure reproducibility. remove in actual use.
# (1) Setup paths and environment.
-library(BoolTraineR)
+library(BTR)
# If intending to use parallel processing, uncomment the following lines.
# library(doParallel) num_core = 4 #specify the number of cores to be used.
@@ -279,7 +279,7 @@ Full workflow is included here for easy referencing. Each step is discussed in f
set.seed(0) #use to ensure reproducibility. remove in actual use.
# (1) Setup paths and environment.
-library(BoolTraineR)
+library(BTR)
# If intending to use parallel processing, uncomment the following lines.
# library(doParallel) num_core = 4 #specify the number of cores to be used.
@@ -312,13 +312,13 @@ plotBM(final_model)
### Initial setup
-The first step is to load the `BoolTraineR` package. If you are intending to use parallel processing, you will also need to load the `doParallel` package. Then specify how many cores you intend to use using `registerDoParallel` from the `doParallel` package.
+The first step is to load the `BTR` package. If you are intending to use parallel processing, you will also need to load the `doParallel` package. Then specify how many cores you intend to use using `registerDoParallel` from the `doParallel` package.
``` r
set.seed(0) #use to ensure reproducibility. remove in actual use.
# (1) Setup paths and environment.
-library(BoolTraineR)
+library(BTR)
# If intending to use parallel processing, uncomment the following lines.
# library(doParallel) num_core = 4 #specify the number of cores to be used.
@@ -392,7 +392,7 @@ Full workflow is included here for easy referencing. Each step is discussed in f
set.seed(0) #use to ensure reproducibility. remove in actual use.
# (1) Setup paths and environment.
-library(BoolTraineR)
+library(BTR)
# If intending to use parallel processing, uncomment the following lines.
# library(doParallel) num_core = 4 #specify the number of cores to be used.
@@ -438,13 +438,13 @@ plotBM(final_model)
### Initial setup
-The first step is to load the `BoolTraineR` package. If you are intending to use parallel processing, you will also need to load the `doParallel` package. Then specify how many cores you intend to use using `registerDoParallel` from the `doParallel` package.
+The first step is to load the `BTR` package. If you are intending to use parallel processing, you will also need to load the `doParallel` package. Then specify how many cores you intend to use using `registerDoParallel` from the `doParallel` package.
``` r
set.seed(0) #use to ensure reproducibility. remove in actual use.
# (1) Setup paths and environment.
-library(BoolTraineR)
+library(BTR)
# If intending to use parallel processing, uncomment the following lines.
# library(doParallel) num_core = 4 #specify the number of cores to be used.
View
@@ -0,0 +1,11 @@
+% Generated by roxygen2 (4.1.1): do not edit by hand
+% Please edit documentation in R/btr.R
+\docType{package}
+\name{BTR}
+\alias{BTR}
+\alias{BTR-package}
+\title{BTR: A package for studying asynchronous Boolean models}
+\description{
+This package contains tools for Boolean model manipulation, as well as the search for the best Boolean model.
+}
+
View
@@ -1,4 +1,4 @@
-% Generated by roxygen2: do not edit by hand
+% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/boolmodel_class.R
\docType{class}
\name{BoolModel-class}
View
@@ -1,4 +1,4 @@
-% Generated by roxygen2: do not edit by hand
+% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/methods.R
\name{amat_to_bm}
\alias{amat_to_bm}
View
@@ -1,4 +1,4 @@
-% Generated by roxygen2: do not edit by hand
+% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/methods.R
\name{bm_to_amat}
\alias{bm_to_amat}
View
@@ -1,4 +1,4 @@
-% Generated by roxygen2: do not edit by hand
+% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/methods.R
\name{bm_to_df}
\alias{bm_to_df}
View
@@ -1,10 +1,10 @@
-% Generated by roxygen2: do not edit by hand
+% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/data_desc.R
\docType{data}
\name{bon_bmodel}
\alias{bon_bmodel}
\title{HSC Boolean Model from Bonzanni et al.}
-\format{A data frame with 11 rows and 2 columns.
+\format{A data frame with 11 rows and 2 columns.
Rows: each row consists of 1 gene and its associated Boolean rule.
Column 1: target gene
View
@@ -1,10 +1,10 @@
-% Generated by roxygen2: do not edit by hand
+% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/data_desc.R
\docType{data}
\name{bon_istate}
\alias{bon_istate}
\title{Initial state from Bonzanni et al.}
-\format{A data frame with 1 row and 11 columns.
+\format{A data frame with 1 row and 11 columns.
Rows: each row consists of 1 set of Boolean state.
Columns: each column is for 1 gene/variable.}
View
@@ -1,4 +1,4 @@
-% Generated by roxygen2: do not edit by hand
+% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/score_calculation.R
\name{calc_mscore}
\alias{calc_mscore}
View
@@ -1,4 +1,4 @@
-% Generated by roxygen2: do not edit by hand
+% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/score_calculation.R
\name{calc_roc}
\alias{calc_roc}
View
@@ -1,4 +1,4 @@
-% Generated by roxygen2: do not edit by hand
+% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/general.R
\name{check_and}
\alias{check_and}
View
@@ -1,4 +1,4 @@
-% Generated by roxygen2: do not edit by hand
+% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/compression.R
\name{compress_bmodel}
\alias{compress_bmodel}
@@ -14,7 +14,7 @@ compress_bmodel(bmodel, encoding, max_varperrule)
\item{max_varperrule}{integer. Maximum number of terms per rule (combining both act and inh rule). Note that this number must not be smaller than number of variables. Default to 6.}
}
\description{
-This function compresses S4 BoolModel object by representing variables using numbers, and also only the act rules and inh rules are kept.
+This function compresses S4 BoolModel object by representing variables using numbers, and also only the act rules and inh rules are kept.
Return a list of 3 vectors, corresponding to act rules and inh rules.
}
View
@@ -1,4 +1,4 @@
-% Generated by roxygen2: do not edit by hand
+% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/compression.R
\name{decompress_bmodel}
\alias{decompress_bmodel}
@@ -16,7 +16,7 @@ decompress_bmodel(x, encoding, gene = NULL, format = "bmodel")
\item{format}{character. Specifies which format to return. Possible values: 'bmodel', 'df', 'amat', 'simp_df'. Default to 'bmodel'.}
}
\description{
-This function decompresses the bmodel compressed by compress_bmodel().
+This function decompresses the bmodel compressed by compress_bmodel().
Return a S4 BoolModel object.
}
@@ -1,4 +1,4 @@
-% Generated by roxygen2: do not edit by hand
+% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/simulation.R
\name{decreate_boolmodel}
\alias{decreate_boolmodel}
View
@@ -1,4 +1,4 @@
-% Generated by roxygen2: do not edit by hand
+% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/methods.R
\name{df_to_bm}
\alias{df_to_bm}
View
@@ -1,4 +1,4 @@
-% Generated by roxygen2: do not edit by hand
+% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/data_desc.R
\docType{data}
\name{emodel1}
View
@@ -1,4 +1,4 @@
-% Generated by roxygen2: do not edit by hand
+% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/data_desc.R
\docType{data}
\name{emodel2}
View
@@ -1,4 +1,4 @@
-% Generated by roxygen2: do not edit by hand
+% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/data_desc.R
\docType{data}
\name{emodel3}
View
@@ -1,4 +1,4 @@
-% Generated by roxygen2: do not edit by hand
+% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/simulation.R
\name{eval_bool}
\alias{eval_bool}
View
@@ -1,4 +1,4 @@
-% Generated by roxygen2: do not edit by hand
+% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/general.R
\name{extract_term}
\alias{extract_term}
View
@@ -1,4 +1,4 @@
-% Generated by roxygen2: do not edit by hand
+% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/general.R
\name{filter_dflist}
\alias{filter_dflist}
View
@@ -1,4 +1,4 @@
-% Generated by roxygen2: do not edit by hand
+% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/rand_model.R
\name{gen_one_rmodel}
\alias{gen_one_rmodel}
View
@@ -1,4 +1,4 @@
-% Generated by roxygen2: do not edit by hand
+% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/rand_model.R
\name{gen_singlerule}
\alias{gen_singlerule}
View
@@ -1,4 +1,4 @@
-% Generated by roxygen2: do not edit by hand
+% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/rand_model.R
\name{gen_two_rmodel}
\alias{gen_two_rmodel}
@@ -21,7 +21,7 @@ gen_two_rmodel(var, steps, mvar = length(var), and_bool = F,
\item{self_loop}{logical. Indicates whether to allow self_loop. Default to F.}
}
\description{
-This function generates a random Boolean model, then get another random Boolean model that is a specified number of steps apart by adding and/or removing genes.
+This function generates a random Boolean model, then get another random Boolean model that is a specified number of steps apart by adding and/or removing genes.
Returns a list of two S4 BoolModel objects.
}
\details{
Oops, something went wrong.

0 comments on commit 176dabf

Please sign in to comment.