Trinity in Docker
If you have Docker installed, you can pull our image from DockerHub, which contains Trinity and all software used for downstream analyses supported within the larger Trinity framework.
Pull the latest Docker image for Trinity like so:
% docker pull trinityrnaseq/trinityrnaseq
Run Trinity like so (eg. as shown where with a very small test data set):
% docker run --rm -v`pwd`:`pwd` trinityrnaseq/trinityrnaseq Trinity \
--seqType fq \
--left `pwd`/reads_1.fq.gz \
--right `pwd`/reads_2.fq.gz
--max_memory 1G --CPU 4 --output `pwd`/trinity_out_dir
Trinity is installed in the Docker container at '/usr/local/bin/trinityrnaseq'.
Just use that path to access all tools installed within Trinity.
eg.
% docker run -v`pwd`:`pwd` trinityrnaseq/trinityrnaseq \
/usr/local/bin/trinityrnaseq/util/align_and_estimate_abundance.pl
With the above, just be sure to specify full paths to inputs and outputs.
Singularity is easier and safer to use than Docker, and is our preferred method for running Trinity. All modern releases of Trinity have a Singularity image (.simg) offered for download from our Trinity Singularity Image Archive. If you have Singularity installed and the .simg file downloaded, you can run Trinity like so:
% singularity exec -e Trinity.simg Trinity \
--seqType fq \
--left `pwd`/reads_1.fq.gz \
--right `pwd`/reads_2.fq.gz \
--max_memory 1G --CPU 4 \
--output `pwd`/trinity_out_dir
All downstream analyses can be accessed similarly to the Docker instructions above, but using the Singularity execution syntax.
The Trinity software is unpacked at /usr/local/bin in the images, and hence $TRINITY_HOME=/usr/local/bin
To run other Trinity-supported analyses, you can reference the corresponding utilities by replacing the call to Trinity in the above commands with the path to the script as found in the container according to /usr/local/bin as the base path. For example:
% singularity exec -e Trinity.simg /usr/local/bin/util/TrinityStats.pl
Windows users trying to run things through Windows Subsystem for Linux (WSL), Singularity (and for all intents and purposes, Docker) won't work on WSL version 1 (WSL1) - it will only works on version 2 (WSL2).
This issue is related to the architectural differences between the two WSL versions, and has been mentioned elsewhere https://github.com/apptainer/singularity/issues/1791 and https://superuser.com/questions/1465197/singularity-in-wsl .
- Trinity Wiki Home
- Installing Trinity
- Running Trinity
- Trinity process and resource monitoring
- Output of Trinity Assembly
- Assembly Quality Assessment
- Downstream Analyses
- Miscellaneous additional functionality that may be of interest
- Contributing code
- Trinity Tidbits
- Frequently Asked Questions (FAQ)
- There are too many transcripts! What do I do?
- How to minimize RAM usage
- How do I use reads I downloaded from SRA
- How do I identify the specific reads that were incorporated into the transcript assemblies?
- How can I perform cross-species analysis?
- How do I combine PE and SE reads?
- How can I run this in parallel on a computing grid?
- Computing and Time requirements
- Errors during Trinity run
- Killing Trinity
- Contact us