-
Notifications
You must be signed in to change notification settings - Fork 9
Installation
- Install R
- Install using BiocManager
- Install using devtools
- Start PhyloProfile GUI tool
- Run PhyloProfile Docker image
- Troubleshooting
PhyloProfile requires R (version ≥ 3.6.0). Please install or update R on your computer before continue.
PhyloProfile is available at Bioconductor. To install PhyloProfile, start R (version ≥ 3.6.0) and enter:
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("PhyloProfile")
To install the development version of PhyloProfile, please use the devel version of Bioconductor:
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install(version='devel')
BiocManager::install("PhyloProfile")
To install the dev version from github:
if (!requireNamespace("devtools"))
install.packages("devtools", repos = "http://cran.us.r-project.org")
devtools::install_github(
"bionf/PhyloProfile",
INSTALL_opts = c('--no-lock'),
build_vignettes = TRUE
)
Since PhyloProfile comes together with a data packages called PhyloProfileData that contains two demo data sets to illustrate running and analysing phylogenetic profiles using the PhyloProfile tool, you will need to install this data package if you want to use those demo data. (NOTE: PhyloProfileData will be automatically installed together with PhyloProfile if you install PhyloProfile via BiocManager)
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("PhyloProfileData")
or
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install(version='devel')
BiocManager::install("PhyloProfileData")
For Windows Users:
Please run R as administrator in order to install the libraries into R library path.
In some cases, you need to install bindrcpp before installing PhyloProfile.
install.packages("bindrcpp", repos = "http://cran.us.r-project.org")
Then follow the steps described above to install PhyloProfile.
library(PhyloProfile)
runPhyloProfile()
Check your web browser, PhyloProfile will be displayed there ;-) For the first time running, the tool will download a pre-caculated taxonomy data. Please be patient until you see a message for uploading input files.
A Docker image containing a ready-to-run PhyloProfile GUI tool is available at Docker Hub. If you already have Docker, or if you don't want to install PhyloProfile by yourself, you can retrieve and use this Docker image by following these steps:
- Install Docker
- Run Docker
- Open the terminal and use this command to pull and run the latest version of PhyloProfile image
docker run -p 8080:80 trvinh/phyloprofile
- Open a web browser and start PhyloProfile by using this address
localhost:8080
In some situations, the installation of PhyloProfile is aborted because the R Cairo package cannot be installed (e.g. due to missing of cairo.h
file). If you encounter this problem, you can try these solutions:
For Linux:
Remember to change USERNAME from the following commands to your actual username
wget https://ftp.gwdg.de/pub/misc/cran/src/base/R-3/R-3.6.1.tar.gz
tar xvfz R-3.6.1.tar.gz
cd R-3.6.1
./configure --prefix=/home/USERNAME/R/3.6.1 --enable-memory-profiling --enable-R-shlib --with-blas --with-cairo --with-lapack --with-x=yes
make -j4
make install
Then append path of newly installed R into ~/.bashrc
file
export LD_LIBRARY_PATH=/home/USERNAME/R/3.6.1/lib:$LD_LIBRARY_PATH
export MANPATH=/home/USERNAME/R/3.6.1/man:$MANPATH
export JAVA_HOME=/share/applications/java/java8
export PATH=/home/USERNAME/R/3.6.1/bin:$JAVA_HOME/bin:$PATH
Source the ~/.bashrc
to make changes
source ~/.bashrc
For Mac:
Download the installation file from https://cran.r-project.org/bin/macosx/ and follow the instruction there. Normally cairo
and X11
will be automatically activated.
For Windows: Do the same as for Mac OS. The link to download R installation file is https://cran.r-project.org/bin/windows/base/.
For Linux:
sudo apt-get install libcairo2-dev
For Mac:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
brew install cairo
If that cannot help, try to install X11 for Mac, which is called xQuartz. It should always solve the problem!
For Windows: install GTK+ toolkit
If all above steps does not work, you can try to install dev version of cairo
library from source using this instruction.
You can check if cairo and X11 are available in R by going to R terminal and type capabilities()
. If you see TRUE
for cairo and X11, they are ready to use.
> capabilities()
jpeg png tiff tcltk X11 aqua
TRUE TRUE TRUE TRUE TRUE TRUE
http/ftp sockets libxml fifo cledit iconv
TRUE TRUE TRUE TRUE TRUE TRUE
NLS profmem cairo ICU long.double libcurl
TRUE TRUE TRUE TRUE TRUE TRUE
If not, you would probably still need to enable them for R (follow the solution for Re-install R from source with the options to enable cairo
and X11
).
If for any reasons some packages cannot be installed automatically (in case you are installing PhyloProfile with devtools::install_github), please do the installation by yourself using the instruction:
# Get list of missing packages
packages <- c(
"ape", "bioDist", "BiocStyle", "Biostrings", "Cairo", "colourpicker",
"data.table", "energy", "ExperimentHub", "ggplot2", "grDevices", "grid",
"gridExtra", "pbapply", "RColorBrewer", "shiny", "shinyBS",
"shinycssloaders", "shinyjs", "stats", "utils", "OmaDB", "plyr", "xml2",
"zoo"
)
missingPkg <- packages[!packages %in% rownames(installed.packages())]
missingPkg
# Then install the missing packages
install.packages(missingPkg, dependencies = TRUE, repos="http://cran.us.r-project.org")
The installation of PhyloProfile can be terminated due to the unsuccessful generation of the vignettes (e.g. due to missing X11 fonts). In this case, you can turn off the option to create the vignettes while installing the tool by setting build_vignettes = FALSE
or just remove this option. For example:
devtools::install_github("bionf/phyloprofile", INSTALL_opts = c('--no-lock'), build_vignettes = FALSE)
For the first time running, the tool will download and process the complete NCBI taxonomy database into a readable format for PhyloProfile. Please be patient until you see a message for uploading input files. It will take normally less than 2 minutes.
If it takes more than 5 minutes (depend on how fast your internet connection is), or you just don't want to wait, you can manually do this task by following these commands:
# Download and preprocess NCBI taxonomy information
library(PhyloProfile)
preProcessedTaxonomy <- processNcbiTaxonomy()
# Find the library path, where PhyloProfile has been installed and identify an output file there
path <- find.package("PhyloProfile")
outFile <- paste0(path, "/PhyloProfile/data/preProcessedTaxonomy.txt")
# Write the preprocessed taxonomy file into PhyloProfile data folder
write.table(
preProcessedTaxonomy,
file = outFile,
col.names = TRUE,
row.names = FALSE,
quote = FALSE,
sep = "\t"
)
Converting OrthoXML files to an input that works with PhyloProfile or manually downloading OMA data is right now done with Python scripts (data/convert_oma_standalone_orthoxml.pl
or data/get_oma_browser.py
), which come with their own dependencies.
These can be installed with pip install bs4
and pip install lxml
.
Additionally, if you want to use scripts/get_oma_browser.py
to get OMA Orthologous Proteins from OMA Browser, you need to install the Core API Library with pip install coreapi
.