tetomonti / CBMRtools

R package with common use scripts for transcriptomics analysis
3 stars 0 forks source link

Installing CBMRtools from Github repo

You need R 3.0.0 or higher. If on scc4, before starting R, type:

module load R/R-3.1.1

it is also recommended to ssh with X11 forward (ssh -X)

    library(devtools)
    install_github("montilab/CBMRtools/CBMRtools")

Documentations

documentation for this package is currently found at: http://montilab.bumc.bu.edu/~montilab/CBMRtoolsHtml/web/index.html

See all available functions and datasets:

require(“CBMRtools”)
ls("package:CBMRtools")

See usage for particular functions listed above, e.g.:

?nnAnalysis

for detailed help pages and outputs of example runs: open /inst/web/index.html

Note on Installation on PC: on installation on a PC. You may need to install the devtools and Rtools, and you may encounter some problem installing the required packages. You may need to install these packages manually and then reinstall the CBMRtools, then it will work for your PC.

Contributing to CBMRtools

Set up git repo for CBMRtools:

git clone https://lia978@github.com/montilab/CBMRtools.git

replace lia978 with your username, will prompt for your git password

or, if you already have it, pull the latest version.

Within this github, CBMRtools' code is located at /CBMRtools/R

Add your R function to /CBMRtools/R/ do not add standalone scripts, wrap all R code into functions

Specify dependencies: within the file /CBMRtools/DESCRIPTION, add to the section Depends the list of packages your function depends on (if any). Bioconductor package dependencies should be specified under "biocViews" to ensure proper installation by install_github().

Add license info to the file and roxygen comments at the top of each function you want to document. You don’t need to write this from scratch, see template at template.R and an example of how to use this template at /CBMRtools/R/variationFilter.R.

You can then build the package as follows:

setwd(“<path to CBMRtools>/inst/package_make/”)
source(“CBMRtools.build.R”) 

this script does the package checking, compiling, and installation, also generates html page pages. The help pages are be found in CBMRtools/inst/web, see index.html and make sure your page is properly added.

If the above steps work, sync your changes with the git repo: instructions. Notice that these steps need to be performed only once (or after you modify functions within the package). Thereafter, you only need to include require(CBMRtools) in your R code.

Notes: