Galaxy | Tool Preview

htseq-count (version 0.1)
Paired-End data must be sorted by QUERY NAME, use Picard Read Mate Fixer and Query name sort order before using this tool on paired data
Mode to handle reads overlapping more than one feature.
Specify whether the data is from a strand-specific assay. 'Reverse' means yes with reversed strand interpretation.
Skip all reads with alignment quality lower than the given minimum value
Feature type (3rd column in GFF file) to be used. All features of other types are ignored. The default, suitable for RNA-Seq and Ensembl GTF files, is exon.
GFF attribute to be used as feature ID. Several GFF lines with the same feature ID will be considered as parts of the same feature. The feature ID is used to identity the counts in the output table. The default, suitable for RNA-SEq and Ensembl GTF files, is gene_id.
Write out all SAM alignment records into an output BAM file, annotating each line with its assignment to a feature or a special counter (as an optional field with tag ‘XF’).

Overview

This tool takes an alignment file in SAM or BAM format and feature file in GFF format and calculates the number of reads mapping to each feature. It uses the htseq-count script that is part of the HTSeq python module. See http://www-huber.embl.de/users/anders/HTSeq/doc/count.html for details.

A feature is an interval (i.e., a range of positions) on a chromosome or a union of such intervals. In the case of RNA-Seq, the features are typically genes, where each gene is considered here as the union of all its exons. One may also consider each exon as a feature, e.g., in order to check for alternative splicing. For comparative ChIP-Seq, the features might be binding regions from a pre-determined list.

Paired-end Data MUST be sorted by QUERY NAME first

This tool requires that paired-end data be sorted by query name, which is NOT the default for Galaxy. Using the Picard Paired Read Mate Fixer with Query name sort FIRST is required for paired end data.

Overlap Modes

Special care must be taken to decide how to deal with reads that overlap more than one feature.

The htseq-count script allows to choose between three modes: union, intersection-strict, and intersection-nonempty.

The following figure illustrates the effect of these three modes:

/repository/static/images/2df7e24ce6c1f224/static%2Fimages%2Fcount_modes.png

Strandedness

Important: The default for strandedness is yes. If your RNA-Seq data has not been made with a strand-specific protocol, this causes half of the reads to be lost. Hence, make sure to set the option Stranded to 'No' unless you have strand-specific data!

Output

The script outputs a table with counts for each feature, followed by the special counters, which count reads that were not counted for any feature for various reasons, namely

  • no_feature: reads which could not be assigned to any feature (set S as described above was empty).
  • ambiguous: reads which could have been assigned to more than one feature and hence were not counted for any of these (set S had mroe than one element).
  • too_low_aQual: reads which were not counted due to the -a option, see below
  • not_aligned: reads in the SAM file without alignment
  • alignment_not_unique: reads with more than one reported alignment. These reads are recognized from the NH optional SAM field tag. (If the aligner does not set this field, multiply aligned reads will be counted multiple times.)

Options Summary

Usage: htseq-count [options] sam_file gff_file

This script takes an alignment file in SAM format and a feature file in GFF format and calculates for each feature the number of reads mapping to it. See http://www-huber.embl.de/users/anders/HTSeq/doc/count.html for details.

Options:
-h, --help show this help message and exit
-m MODE, --mode=MODE
 mode to handle reads overlapping more than one feature(choices: union, intersection-strict, intersection-nonempty; default: union)
-s STRANDED, --stranded=STRANDED
 whether the data is from a strand-specific assay. Specify 'yes', 'no', or 'reverse' (default: yes). 'reverse' means 'yes' with reversed strand interpretation
-a MINAQUAL, --minaqual=MINAQUAL
 skip all reads with alignment quality lower than the given minimum value (default: 0)
-t FEATURETYPE, --type=FEATURETYPE
 feature type (3rd column in GFF file) to be used, all features of other type are ignored (default, suitable for Ensembl GTF files: exon)
-i IDATTR, --idattr=IDATTR
 GFF attribute to be used as feature ID (default, suitable for Ensembl GTF files: gene_id)
-o SAMOUT, --samout=SAMOUT
 write out all SAM alignment records into an output SAM file called SAMOUT, annotating each line with its feature assignment (as an optional field with tag 'XF')
-q, --quiet suppress progress report and warnings

Written by Simon Anders (sanders@fs.tum.de), European Molecular Biology Laboratory (EMBL). (c) 2010. Released under the terms of the GNU General Public License v3. Part of the 'HTSeq' framework.