Installation

Installing CRESSENT

You can install CRESSENT using either a general-purpose package manager (mamba, conda) or by cloning the repository and setting up the environment manually.

Mamba is a package manager that handles all your dependencies for you. To install CRESSENT using Mamba, you need to create a new environment and activate it before running the cressent command.

mamba create -n cressent 
mamba install -c bioconda -c conda-forge -c defaults cressent 
conda activate cressent

If you prefer to install CRESSENT manually, you can clone the repository and set up the environment:

git clone https://github.com/ricrocha82/cressent.git
cd cressent
mamba env create -f cressent_env.yaml
conda activate cressent

Dependencies

CRESSENT depends on several external tools that must be available in your PATH:

  • IQ-TREE for phylogenetic analysis

  • MAFFT for multiple sequence alignment

  • TrimAl for alignment trimming

  • MEME Suite for motif discovery

  • SeqKit for sequence manipulation

  • BLAST+ for sequence similarity searches

  • CD-HIT for sequence clustering

  • MMseqs2 for fast sequence searches

  • R with required packages for visualization

Verification

After installation, verify that CRESSENT is working correctly:

# Test basic functionality
cressent --help

# Test individual modules
cressent align --help
cressent build_tree --help
cressent plot_tree --help

You should see help messages for each command without any errors.

Running CRESSENT using containers

You can also execute CRESSENT using containerization tools, such as Docker and Podman.

docker pull ricrocha82/cressent:latest
podman pull ricrocha82/cressent:latest

To start a CRESSENT container you have to mount a folder from the host system into the container with the -v argument. The following command mounts the current working directory ($(pwd)) under /app inside the container:

docker run -ti --rm -v "$(pwd):/app" ricrocha82/cressent:latest align --help
docker run -ti --rm -v "$(pwd):/app" ricrocha82/cressent:latest build_tree input.fasta output/
podman run -u 0 -ti --rm -v "$(pwd):/app" ricrocha82/cressent:latest align --help
podman run -u 0 -ti --rm -v "$(pwd):/app" ricrocha82/cressent:latest build_tree input.fasta output/

Database Setup

Some CRESSENT modules require reference databases. If you want use the custom Db from CRESSENT please, set up the databases after installation:

Download Pre-built Databases

# Create database directory
mkdir -p DB
cd DB
  • CAPS: Capsid protein sequences grouped by family

  • REPS: Replication-associated protein sequences grouped by family

  • Contamination DB

  • tree_models.csv: table with the models computed by ModelFinder from IQ-TREE2 for each Rep and Cap DB grouped by family

The Databse is also available on Zenodo DOI

Build Custom Databases

Alternatively, build databases for specific viral families:

# Build database for specific viral families
cressent db_builder \
    -t taxonomy_accession_number.csv \
    -l Family \
    -s "Circoviridae" "Genomoviridae" \
    -o custom_database \
    -e your.email@example.com

Troubleshooting

Common Installation Issues

Conda/Mamba Environment Conflicts

# Clean conda cache and try again
conda clean --all
mamba create -n cressent_clean -c conda-forge -c bioconda [packages]

Missing Dependencies

# Check if all tools are in PATH
which iqtree
which mafft
which trimal
which meme

# Install missing tools individually
conda install -c bioconda iqtree

R Package Issues

# Install R packages manually
R
> install.packages(c("ggplot2", "ape", "dendextend"))
> if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
> BiocManager::install(c("ggtree", "Biostrings"))

Permission Errors

# Ensure proper permissions for installation directory
chmod +x /path/to/cressent/bin/*

Performance Optimization

Memory Usage

  • For large datasets, ensure at least 16GB RAM

  • Use --threads parameter appropriately (typically number of CPU cores)

  • Monitor memory usage with htop or top

Getting Help

If you encounter installation issues:

  1. Check the FAQ for common solutions

  2. Search existing GitHub issues

  3. Create a new issue with:

    • Your operating system and version

    • Complete error messages

    • Installation method used

    • Output of conda list or pip list