Permalink
Please sign in to comment.
Showing
with
5,206 additions
and 0 deletions.
- +22 −0 DESCRIPTION
- +44 −0 NAMESPACE
- +69 −0 R/RcppExports.R
- +17 −0 R/boolmodel_class.R
- +19 −0 R/booltrainer.R
- +309 −0 R/compression.R
- +128 −0 R/data_desc.R
- +644 −0 R/general.R
- +181 −0 R/initialisation.R
- +300 −0 R/methods.R
- +249 −0 R/model_modification.R
- +277 −0 R/output_format.R
- +543 −0 R/rand_model.R
- +162 −0 R/score_calculation.R
- +272 −0 R/search.R
- +102 −0 R/simulation.R
- +18 −0 booltrainer.Rproj
- BIN data/bon_bmodel.rda
- BIN data/bon_istate.rda
- BIN data/bon_moig_istate.rda
- BIN data/bon_sstate.rda
- BIN data/bon_wilson_istate.rda
- BIN data/bonkrum_geneid_map.rda
- BIN data/krum_bmodel.rda
- BIN data/krum_istate.rda
- BIN data/krum_sstate.rda
- BIN data/krum_wilson_istate.rda
- BIN data/moig_raw_data.rda
- BIN data/real_param.rda
- BIN data/wilson_raw_data.rda
- BIN data/wilson_raw_rnaseq.rda
- +22 −0 man/BoolModel-class.Rd
- +11 −0 man/BoolTraineR.Rd
- +17 −0 man/amat_to_bm.Rd
- +17 −0 man/bin_to_real.Rd
- +17 −0 man/bm_to_amat.Rd
- +15 −0 man/bm_to_df.Rd
- +18 −0 man/bon_bmodel.Rd
- +17 −0 man/bon_istate.Rd
- +19 −0 man/bon_moig_istate.Rd
- +25 −0 man/calc_mscore.Rd
- +15 −0 man/calc_roc.Rd
- +19 −0 man/check_bmodel.Rd
- +20 −0 man/compress_bmodel.Rd
- +22 −0 man/decompress_bmodel.Rd
- +15 −0 man/decreate_boolmodel.Rd
- +16 −0 man/df_to_bm.Rd
- +21 −0 man/equi_model.Rd
- +19 −0 man/eval_bool.Rd
- +15 −0 man/extract_term.Rd
- +19 −0 man/filter_dflist.Rd
- +25 −0 man/gen_one_rmodel.Rd
- +23 −0 man/gen_randata.Rd
- +23 −0 man/gen_randata_bn.Rd
- +24 −0 man/gen_singlerule.Rd
- +30 −0 man/gen_two_rmodel.Rd
- +25 −0 man/gen_two_rmodel_dag.Rd
- +18 −0 man/get_encodings.Rd
- +17 −0 man/grow_bmodel.Rd
- +17 −0 man/initialise_data.Rd
- +16 −0 man/initialise_model.Rd
- +22 −0 man/initialise_raw_data.Rd
- +18 −0 man/krum_bmodel.Rd
- +17 −0 man/krum_istate.Rd
- +21 −0 man/m_score.Rd
- +18 −0 man/match_state.Rd
- +17 −0 man/match_state_loop.Rd
- +20 −0 man/match_term.Rd
- +17 −0 man/minmod_internal.Rd
- +19 −0 man/minmod_model.Rd
- +21 −0 man/model_consensus.Rd
- +21 −0 man/model_dist.Rd
- +23 −0 man/model_setdiff.Rd
- +24 −0 man/model_simplify.Rd
- +31 −0 man/model_train.Rd
- +17 −0 man/moig_data.Rd
- +17 −0 man/moig_raw_data.Rd
- +17 −0 man/outcyto_model.Rd
- +24 −0 man/outcyto_stategraph.Rd
- +17 −0 man/outgenysis_model.Rd
- +17 −0 man/param_bimodal.Rd
- +17 −0 man/printBM.Rd
- +17 −0 man/rcpp_ham_dist.Rd
- +15 −0 man/rcpp_m_score.Rd
- +17 −0 man/rcpp_man_dist.Rd
- +19 −0 man/rcpp_simulate.Rd
- +17 −0 man/rcpp_validate.Rd
- +14 −0 man/real_param.Rd
- +19 −0 man/simulate_model.Rd
- +17 −0 man/unique_raw_data.Rd
- +17 −0 man/validate_adjmat.Rd
- +17 −0 man/vcat.Rd
- +17 −0 man/which.random.min.Rd
- +21 −0 man/writeBM.Rd
- +79 −0 src/RcppExports.cpp
- +56 −0 src/general.cpp
- +254 −0 src/score_calculation.cpp
- +262 −0 src/simulation.cpp
22
DESCRIPTION
| @@ -0,0 +1,22 @@ | ||
| +Package: BoolTraineR | ||
| +Type: Package | ||
| +Title: Tools For Training and Analysing Asynchronous Boolean Models | ||
| +Version: 1.0.1 | ||
| +Date: 2015-10-22 | ||
| +Author: Chee Yee Lim | ||
| +Maintainer: Chee Yee Lim <cyl49@cam.ac.uk> <cheeyee.lim@gmail.com> | ||
| +Description: This package contains tools for Boolean model manipulation, as well as the search for the best Boolean model. | ||
| +Depends: | ||
| + R (>= 3.0.3), | ||
| + methods | ||
| +Imports: | ||
| + parallel, | ||
| + Rcpp (>= 0.11.4), | ||
| + foreach (>= 1.4.1), | ||
| + doParallel (>= 1.0.8), | ||
| + poweRlaw (>= 0.30.0), | ||
| + MASS (>= 7.3-44), | ||
| + diptest (>= 0.75-7) | ||
| +LinkingTo: Rcpp | ||
| +License: GPL-3 | ||
| +LazyData: true |
| @@ -0,0 +1,44 @@ | ||
| +# Generated by roxygen2 (4.1.1): do not edit by hand | ||
| + | ||
| +export(BoolModel) | ||
| +export(amat_to_bm) | ||
| +export(bin_to_real) | ||
| +export(bm_to_amat) | ||
| +export(bm_to_df) | ||
| +export(calc_mscore) | ||
| +export(calc_roc) | ||
| +export(check_bmodel) | ||
| +export(compress_bmodel) | ||
| +export(decompress_bmodel) | ||
| +export(df_to_bm) | ||
| +export(equi_model) | ||
| +export(gen_randata) | ||
| +export(gen_randata_bn) | ||
| +export(gen_two_rmodel) | ||
| +export(gen_two_rmodel_dag) | ||
| +export(get_encodings) | ||
| +export(grow_bmodel) | ||
| +export(initialise_data) | ||
| +export(initialise_model) | ||
| +export(initialise_raw_data) | ||
| +export(model_consensus) | ||
| +export(model_dist) | ||
| +export(model_setdiff) | ||
| +export(model_train) | ||
| +export(outcyto_model) | ||
| +export(outcyto_stategraph) | ||
| +export(outgenysis_model) | ||
| +export(param_bimodal) | ||
| +export(printBM) | ||
| +export(simulate_model) | ||
| +export(unique_raw_data) | ||
| +export(validate_adjmat) | ||
| +export(writeBM) | ||
| +exportClasses(BoolModel) | ||
| +import(doParallel) | ||
| +import(foreach) | ||
| +import(methods) | ||
| +import(parallel) | ||
| +importFrom(Rcpp,evalCpp) | ||
| +importFrom(Rcpp,sourceCpp) | ||
| +useDynLib(BoolTraineR) |
| @@ -0,0 +1,69 @@ | ||
| +# This file was generated by Rcpp::compileAttributes | ||
| +# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 | ||
| + | ||
| +#' @title Find a match between two data frames. | ||
| +#' | ||
| +#' @description | ||
| +#' (&&&Not for public use&&&)This function finds a match between two df of states. Used in match_state(). Return an row index vector indicating which row of mstate matches the rows in xstate. | ||
| +#' | ||
| +#' @param mstate data frame. It should be a state(row) x gene(column) df. | ||
| +#' @param xstate data frame. It should be a state(row) x gene(column) df. | ||
| +match_state_loop <- function(mstate, xstate) { | ||
| + .Call('BoolTraineR_match_state_loop', PACKAGE = 'BoolTraineR', mstate, xstate) | ||
| +} | ||
| + | ||
| +#' @title Calculating pairwise scores between model and data states. | ||
| +#' | ||
| +#' @description | ||
| +#' This function calculates the pairwise scores between each row of model and data states. The score is calculated using a custom binary distance measure. | ||
| +#' | ||
| +#' @param x_df matrix. It should be numerical matrix of model states. | ||
| +#' @param y_df matrix. It should be numerical matrix of data states. | ||
| +rcpp_man_dist <- function(x_df, y_df) { | ||
| + .Call('BoolTraineR_rcpp_man_dist', PACKAGE = 'BoolTraineR', x_df, y_df) | ||
| +} | ||
| + | ||
| +#' @title Calculating Hamming pairwise scores between model and data states. | ||
| +#' | ||
| +#' @description | ||
| +#' This function calculates the pairwise scores between each row of model and data states. The score is calculated using a custom binary distance measure. | ||
| +#' | ||
| +#' @param x_df matrix. It should be logical matrix of model states. | ||
| +#' @param y_df matrix. It should be logical matrix of data states. | ||
| +rcpp_ham_dist <- function(x_df, y_df) { | ||
| + .Call('BoolTraineR_rcpp_ham_dist', PACKAGE = 'BoolTraineR', x_df, y_df) | ||
| +} | ||
| + | ||
| +#' @title Inner core for m_score() | ||
| +#' | ||
| +#' @description | ||
| +#' This function takes in a df with columns ranked wrt each row, and try to assign each row to a unique column without repetition. | ||
| +#' | ||
| +#' @param x_df matrix. Matrix with columns ranked wrt each row. | ||
| +rcpp_m_score <- function(x_df) { | ||
| + .Call('BoolTraineR_rcpp_m_score', PACKAGE = 'BoolTraineR', x_df) | ||
| +} | ||
| + | ||
| +#' @title Calculating validation scores between two adjacency matrices | ||
| +#' | ||
| +#' @description | ||
| +#' This function calculates the validation scores between two adjacency matrices. | ||
| +#' | ||
| +#' @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) | ||
| +} | ||
| + | ||
| +#' @title Simulate a Boolean model. | ||
| +#' | ||
| +#' @description | ||
| +#' (&&&Not for public use&&&)This function simulates the Boolean model using an initial state. For use within simulate_model(). Returns a matrix of full asynchronous state space. | ||
| +#' | ||
| +#' @param bmodel list. A list of 4 lists created by decreate_model(). | ||
| +#' @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) | ||
| +} | ||
| + |
| @@ -0,0 +1,17 @@ | ||
| +#' @title An S4 class to represent a Boolean Model | ||
| +#' | ||
| +#' @description | ||
| +#' This class represents Boolean Model in a S4 BoolModel object. | ||
| +#' | ||
| +#' @field target character vector. It should contain gene symbols. | ||
| +#' @field targer_var character vector. It should contain the internal representation of gene variables, in the form of "v[0-9]+s" | ||
| +#' @field rule_act list of character vectors. Each element in the list should contain the activating gene variables for a particular target gene. | ||
| +#' @field rule_inh list of character vectors. Each element in the list should contain the inhibiting gene variables for a particular target gene. | ||
| +#' | ||
| +#' @export BoolModel | ||
| +#' @exportClass BoolModel | ||
| +BoolModel = setClass('BoolModel', | ||
| + slots=c(target='character', target_var='character', | ||
| + rule_act='list', rule_inh='list') | ||
| + ) | ||
| + |
| @@ -0,0 +1,19 @@ | ||
| +#' @title BoolTraineR: 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 BoolTraineR | ||
| +NULL | ||
| + | ||
| +## All the Roxygen codes below are for generating the correct NAMESPACE file. | ||
| +#' @import methods | ||
| +#' @import parallel | ||
| +#' @import foreach | ||
| +#' @import doParallel | ||
| +NULL | ||
| + | ||
| +#' @useDynLib BoolTraineR | ||
| +#' @importFrom Rcpp sourceCpp evalCpp | ||
| +NULL |
Oops, something went wrong.
0 comments on commit
8b58e81