Trinity_logo

Trinity, developed at the Broad Institute, represents a novel method for the efficient and robust de novo reconstruction of transcriptomes from RNA-Seq data. Trinity combines three independent software modules: Inchworm, Chrysalis, and Butterfly, applied sequentially to process large volumes of RNA-Seq reads. Trinity partitions the sequence data into many individual de Bruijn graphs, each representing the transcriptional complexity at at a given gene or locus, and then processes each graph independently to extract full-length splicing isoforms and to tease apart transcripts derived from paralogous genes. Briefly, the process works like so:

  • Inchworm assembles the RNA-Seq data into the unique sequences of transcripts, often generating full-length transcripts for a dominant isoform, but then reports just the unique portions of alternatively spliced transcripts.

  • Chrysalis clusters the Inchworm contigs into clusters and constructs complete de Bruijn graphs for each cluster. Each cluster represesnts the full transcriptonal complexity for a given gene (or sets of genes that share sequences in common). Chrysalis then partitions the full read set among these disjoint graphs.

  • Butterfly then processes the individual graphs in parallel, tracing the paths that reads and pairs of reads take within the graph, ultimately reporting full-length transcripts for alternatively spliced isoforms, and teasing apart transcripts that corresponds to paralogous genes.

The Trinity software package includes each of these tools and can be downloaded here.

Installing Trinity

After downloading the sofware, simply type make in the base installation directory. This should build Inchworm and Chrysalis, both written in C++. Butterfly should not require any compilation, as its written in Java and already provided as portable software.

Trinity has been tested and is supported on both Mac OSX and Linux.

Running Trinity

Trinity is run via the script: Trinity.pl in the base installation directory.

Usage info is as follows:

##################################################################
#
# Required:
#
#  --seqType <string>  :type of reads: (fq or fa)
#
#  If paired reads:
#
#  --left  <string>    :left reads
#  --right <string>    :right reads
#
#  If unpaired reads:
#
#  --single <string>   :single reads
#
#
#  if strand-specific data, set:
#
#  --SS_lib_type <string>  :if paired: RF or FR,  if single: F or R
#
#
#  --output <string>     :name of directory for output (will be created if it doesn't already exist)
#
#
#  Butterfly options:
#
#  --run_butterfly                 :executes butterfly commands.  Do not set this if you want to spawn them on a computing grid.
#
#  (if run_butterfly)
#       --num_butterfly_CPU <int>  :number of parallel butterfly commands to run on a single machine (default: 1)
#
# Misc:
#
#
#  --min_contig_length <int> :minimum assembled contig length to report (def=300)
#
#  --paired_fragment_length <int>  :size of a read pair insert (def=300)
#
#  --jaccard_clip     :option, set if you have paired reads and you expect high gene density with UTR overlap (use FASTQ input files for reads).
#
##############################################################################################
Note
Trinity performs best with strand-specific data, in which case sense and antisense transcripts can be resolved.

If you have strand-specific data, specify the library type. There are four library types:

By setting the —SS_lib_type parameter to one of the above, you are indicating that the reads are strand-specific. By default, reads are treated as not strand-specific.

Whether you use Fastq or Fasta formatted input files, be sure to keep the reads oriented as they are reported by Illumina, if the data are strand-specific. This is because, Trinity will properly orient the sequences according to the specified library type. If the data are not strand-specific, now worries because the reads will be parsed in both orientations.

Minimizing Fusion Transcripts Derived from Gene Dense Genomes

If your transcriptome RNA-Seq data are derived from a gene-dense compact genome, such as from fungal genomes, where transcripts may often overlap in UTR regions, you can minimize fusion transcripts by leveraging the —jaccard_clip option if you have paired reads. Trinity will examine the consistency of read pairings and fragment transcripts at positions that have little read-pairing support. In expansive genomes of vertebrates and plants, this is unnecessary and not recommended. In compact fungal genomes, it is highly recommended. In addition to requiring paired reads, you must also have the Bowtie short read aligner installed. As part of this analysis, reads are aligned to the Inchworm contigs using Bowtie, and read pairings are examined across the Inchworm contigs, and contigs are clipped at positions of low pairing support. These clipped Inchworm contigs are then fed into Chrysalis for downstream processing.

Hardware Requirements

The Inchworm and Chrysalis steps can be memory intensive. A basic recommendation is to have 1G of RAM per 1M pairs of Illumina reads. Simpler transcriptomes (lower eukaryotes) require less memory than more complex transcriptomes such as from vertebrates. Butterfly requires less memory and can be executed in parallel on a computing grid.

If you do not have a computing grid, but you have a multi-core server, be sure to set the —run_butterfly parameter, and indicate the number of butterfly processed to run in parallel by the —num_butterfly_CPU paramter. If you have access to a computing grid, do not set these parameters. Instead, a butterfly_commands file will be generated in the Trinity output directory. Run these commands in parallel on your computing grid. Most butterfly jobs require minimal memory (<1G), but some read-rich graphs can require up to 10G of RAM or more.

Our experience is that the entire process can require about 1 hour per million pairs of reads in the current implementation. We're striving to improve upon both memory and time requirements.

Running Trinity on Sample Data

The Trinity software distribution includes sample data in the sample_data/ directory. Simply run the runMe.sh shell script in the sample_dat/ directory to execute the Trinity assembly process with provided paired strand-specific Illumina data derived from mouse. Running Trinity on the sample data requires ~2G of RAM.

Questions, Comments, Etc.

Send email to trinityrnaseq-users@lists.sf.net.