-
Although
sumrep
is still in development, we can use thedevtools
package to loadsumrep
in R as a makeshift pacakge. Follow the instructions from thedevtools
repo for installation instructions. -
The following
R
command will install almost all of the remainingR
package dependencies:install.packages(c("alakazam", "ape", "CollessLike", "data.table", "dplyr", "entropy", "jsonlite", "magrittr", "Peptides", "RecordLinkage", "shazam", "seqinr", "stringdist", "stringr", "testthat", "textmineR", "yaml"))
-
Biostrings
needs 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
sumrep
into 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
partis
functionality, only the followingR
packages need to be installed:install.packages(c("data.table", "dplyr", "magrittr", "stringr"))
The section below discusses installing
partis
in more detail.
- Although
sumrep
can be run with any annotated dataset, several annotation and simulation tools can be invoked withinsumrep
. Thesumrep
methods that run these tools are built to outputdata.table
s which match the specification in the usage section. To use these features, follow the corresponding installation steps for each desired tool.
-
partis
can 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
partis
install:conda update -y -c bioconda pysam
Otherwise, you might encounter the following (or similar) error:
AttributeError: 'csamtools.AlignedRead' object has no attribute 'cigarstring'
This issue arises because
conda pysam
doesn't have a recent enough verion ofpysam
. -
Once
partis
is 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_path
argument). 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_profile
NOTE: this needs to be the path to the actual partis executable, and not the parent folder, which is also named
partis
.
-
IgBlast can also be used for annotation within
sumrep
; instructions for installing standaloneigblast
can be found here. -
sumrep
useschangeo
to process the rawigblast
output. Installation instructions can be found here. -
Use the
getIgBlastAnnotations
function to obtain adata.table
with annotations from a given input fasta file. You will need to include the binary directories forigblast
andchangeo
via the argumentsigblast_dir
andchangeo_dir
, respectively.
- 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.