Gentrap (generic transcriptome analysis pipeline) is a general data analysis pipelines for quantifying expression levels from RNA-seq libraries generated using the Illumina machines. It was designed to be flexible, providing several aligners and quantification modes to choose from, with optional steps in between. It can be used to run different experiment configurations, from single sample runs to multiple sample runs containing multiple sequencing libraries. It can also do a very simple variant calling (using VarScan).
At the moment, Gentrap supports the following aligners:
and the following quantification modes:
- Fragment counts per gene (using HTSeq-count)
- Base counts per gene
- Base counts per exon
- Cufflinks-style quantification, with a strict reference, with a reference as a guide, and/or without any references
You can also provide a
.refFlat file containing ribosomal sequence coordinates to measure how many of your libraries originate from ribosomal sequences. Then, you may optionally remove those regions as well.
Sample input extensions
Please refer to our mapping pipeline for information about how the input samples should be handled.
As with other biopet pipelines, Gentrap relies on a JSON configuration file to run its analyses. There are two important parts here, the configuration for the samples (to determine the sample layout of your experiment) and the configuration for the pipeline settings (to determine which analyses are run). To get help creating the appropriate configs please refer to the config page in the general section.
Samples are single experimental units whose expression you want to measure. They usually consist of a single sequencing library, but in some cases (for example when the experiment demands each sample have a minimum library depth) a single sample may contain multiple sequencing libraries as well. All this is can be configured using the correct JSON nesting, with the following pattern:
--- samples: sample_A: libraries: lib_01: R1: "/absolute/path/to/first/read/pair.fq" R2: "/absolute/path/to/second/read/pair.fq"
In the example above, there is one sample (named
sample_A) which contains one sequencing library (named
lib_01). The library itself is paired end, with both
R2 pointing to the location of the files in the file system. A more complicated example is the following:
--- samples: sample_X: libraries: lib_one: R1: "/absolute/path/to/first/read/pair.fq" R2: "/absolute/path/to/second/read/pair.fq" sample_Y: libraries: lib_one: R1: "/absolute/path/to/first/read/pair.fq" R2: "/absolute/path/to/second/read/pair.fq" lib_two: R1: "/absolute/path/to/first/read/pair.fq" R2: "/absolute/path/to/second/read/pair.fq"
In this case, we have two samples (
sample_Y has two different libraries (
lib_two). Notice that the names of the samples and libraries may change, but several keys such as
R2 remain the same.
Pipeline Settings Configuration
For the pipeline settings, there are some values that you need to specify while some are optional. Required settings are:
output_dir: path to output directory (if it does not exist, Gentrap will create it for you).
aligner: which aligner to use (
star-2passenables the 2-pass mapping option of STAR, for the most sensitive novel junction discovery. For more, please refer to STAR user Manual
reference_fasta: this must point to a reference FASTA file and in the same directory, there must be a
.dictfile of the FASTA file. If the
.dictfile does not exist, you can create it using:
java -jar <picard jar> CreateSequenceDictionary R=<reference.fasta> O=<outputDict>
expression_measures: this entry determines which expression measurement modes Gentrap will do. You can choose zero or more from the following:
cufflinks_blind. If you only wish to align, you can set the value as an empty list (
strand_protocol: this determines whether your library is prepared with a specific stranded protocol or not. There are two protocols currently supported now:
dutpfor dUTP-based protocols and
non_specificfor non-strand-specific protocols.
annotation_refflat: contains the path to an annotation refFlat file of the entire genome
While optional settings are:
annotation_gtf: contains path to an annotation GTF file, only required when
annotation_bed: contains path to a flattened BED file (no overlaps), only required when
remove_ribosomal_reads: whether to remove reads mapping to ribosomal genes or not, defaults to
ribosomal_refflat: contains path to a refFlat file of ribosomal gene coordinates, required when
call_variants: whether to call variants on the RNA-seq data or not, defaults to
Thus, an example settings configuration is as follows:
--- output_dir: "/path/to/output/dir" expression_measures: - "fragments_per_gene" - "bases_per_gene" strand_protocol: "dutp" reference_fasta: "/path/to/reference/fastafile" annotation_gtf: "/path/to/gtf" annotation_refflat: "/path/to/refflat"
Best practice example
If you are unsure of how to use the numerous options of gentrap, please refer to the following best practice configuration file example.
--- output_dir: "/path/to/output/dir" aligner: "gsnap" reference_fasta: "/path/to/reference/fastafile" expression_measures: - "fragments_per_gene" strand_protocol: "dutp" annotation_refflat: "/path/to/refflat"
In most cases, it's practical to combine the samples and settings configuration into one file. Here is an example config file where both samples and settings are stored into one file. Note also that there are additional tool configurations in the config file.
As with other pipelines in the Biopet suite, Gentrap can be run by specifying the pipeline after the
biopet pipeline gentrap -config </path/to/config.json> -qsub -jobParaEnv BWA -run
You can also use the
biopet environment module (recommended) when you are running the pipeline in SHARK:
$ module load biopet/v0.7.0 $ biopet pipeline gentrap -config </path/to/config.json> -qsub -jobParaEnv BWA -run
It is also a good idea to specify retries (we recomend
-retry 3 up to
-retry 5) so that cluster glitches do not interfere with your pipeline runs.
The numbers and types of output files depend on your run configuration. What you can always expect, however, is that there will be a summary JSON file of your run called
gentrap.summary.json and a PDF report in a
report folder called
gentrap_report.pdf. The summary file contains files and statistics specific to the current run, which is meant for cases when you wish to do further processing with your Gentrap run (for example, plotting some figures), while the PDF report provides a quick overview of your run results.
If you have any questions on running Gentrap, suggestions on how to improve the overall flow, or requests for your favorite RNA-seq related program to be added, feel free to post an issue to our issue tracker at GitHub. Or contact us directly via: SASC email