installation.md
October 6, 2022 ยท View on GitHub
Installation Notes
Installing sumrep
-
Although
sumrepis still in development, we can use thedevtoolspackage to loadsumrepin R as a makeshift pacakge. Follow the instructions from thedevtoolsrepo for installation instructions. -
The following
Rcommand will install almost all of the remainingRpackage dependencies:install.packages(c("alakazam", "ape", "CollessLike", "data.table", "dplyr", "entropy", "jsonlite", "magrittr", "Peptides", "RecordLinkage", "shazam", "seqinr", "stringdist", "stringr", "testthat", "textmineR", "yaml")) -
Biostringsneeds to be installed in a special way:source("https://bioconductor.org/biocLite.R") biocLite("Biostrings")(try
http://ifhttps://URLs are not supported) -
Once all of the above are installed, the following lines will load
sumrepinto your workspace:library(devtools) devtools::load_all("/path/to/sumrep/")where
/path/to/sumrep/is the directory of sumrep fromgit clone. -
If you only want to use the
partisfunctionality, only the followingRpackages need to be installed:install.packages(c("data.table", "dplyr", "magrittr", "stringr"))The section below discusses installing
partisin more detail.
Installing annotation/simulation tools (optional)
- Although
sumrepcan be run with any annotated dataset, several annotation and simulation tools can be invoked withinsumrep. Thesumrepmethods that run these tools are built to outputdata.tables which match the specification in the usage section. To use these features, follow the corresponding installation steps for each desired tool.
Installing partis
-
partiscan be used for annotation and clonal family partitioning withinsumrep; follow the link to its respository for specific installation directions. -
We suggest running the following command after the regular
partisinstall:conda update -y -c bioconda pysamOtherwise, you might encounter the following (or similar) error:
AttributeError: 'csamtools.AlignedRead' object has no attribute 'cigarstring'This issue arises because
conda pysamdoesn't have a recent enough verion ofpysam. -
Once
partisis installed, you will need to either set an environmental variable'PARTIS_PATH'to the path of the partis executable, or supply this path to any function which callspartis(via thepartis_pathargument). To set the variable, add the following line to your~/.bash_profile:export PARTIS_PATH='/path/to/partis/bin/partis'and make sure to either restart your terminal session or re-source the profile script, e.g. via the command
. ~/.bash_profileNOTE: this needs to be the path to the actual partis executable, and not the parent folder, which is also named
partis.
Installing IgBlast + Change-O
-
IgBlast can also be used for annotation within
sumrep; instructions for installing standaloneigblastcan be found here. -
sumrepuseschangeoto process the rawigblastoutput. Installation instructions can be found here. -
Use the
getIgBlastAnnotationsfunction to obtain adata.tablewith annotations from a given input fasta file. You will need to include the binary directories forigblastandchangeovia the argumentsigblast_dirandchangeo_dir, respectively.
Installing IGoR and pygor
- IGoR is an annotation and simulation tool that can be used within
sumrep. Please follow the installation instructions if you wish to access these methods. In particular, you must also install pygor, a Python module which is shipped with IGoR. Once IGoR and pip are installed, execute the command
pip install ./pygor
in IGoR's root directory. To get this working, you may or may not need to install conda (if you haven't already), and create an environment as so:
conda create -n "pygor" python=3 pandas biopython matplotlib numpy scipy
Then, anytime you wish to run getIgorAnnotations you must execute the command
source activate pygor
beforehand (i.e., before running R). When you're finished, run
source deactivate
to exit the custom-made pygor Python environment.
This is particuarly important if you are using other conda environments with sumrep, such as for partis.
Finally, you will need to an environmental variable SUMREP_PATH specifying the parent sumrep folder (e.g. export SUMREP_PATH="/path/to/sumrep/"), as well as an environmental variable PYGOR_PATH specifying the pygor directory (e.g., export PYGOR_PATH="/path/to/IGoR/pygor").
You can add the above lines to your .bash_profile if you wish, and may need to resource this file or reset the terminal.