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.
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:
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!
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
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.
|-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 (firstname.lastname@example.org), European Molecular Biology Laboratory (EMBL). (c) 2010. Released under the terms of the GNU General Public License v3. Part of the 'HTSeq' framework.