annotate htseq.xml @ 11:e5fcbabbdea7 draft

Uploaded
author fcaramia
date Wed, 21 Aug 2013 22:13:03 -0400
parents 17983775f1b0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
1 <tool id="htseq-count" name="Count reads in features with htseq-count" version="1.0.0">
9
17983775f1b0 Uploaded
fcaramia
parents: 8
diff changeset
2 <requirements>
17983775f1b0 Uploaded
fcaramia
parents: 8
diff changeset
3 <requirement type="package" version="0.1.18">samtools</requirement>
17983775f1b0 Uploaded
fcaramia
parents: 8
diff changeset
4 <requirement type="python library" version="0.5.3p9">htseq</requirement>
17983775f1b0 Uploaded
fcaramia
parents: 8
diff changeset
5 </requirements>
8
734516a21b52 Uploaded
fcaramia
parents: 5
diff changeset
6 <description> - Create a digital expression matrix by counting reads in features with htseq-count</description>
5
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
7 <command interpreter="perl">
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
8 htseq.pl -m $MODE -s $STRANDED -a $MINAQUAL -t $FEATURETYPE -i $IDATTR -g $gff_file -o $output -r $report $REDUCE
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
9 ## Inputs.
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
10 #for $group in $group_analysis
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
11 ${group.group}::${group.sample_init}::${group.file_init}
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
12 #for $input_files in $group.input_files:
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
13 ${group.group}::${input_files.sample}::${input_files.file}
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
14 #end for
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
15 #end for
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
16 </command>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
17
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
18 <inputs>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
19 <param name="matrix_name" type="text" label="Name Of Matrix" help="Name Of The Matrix" value="My_Matrix" />
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
20 <repeat name="group_analysis" title="Group">
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
21 <param name="group" title="Group name" type="text" label="Group name (no spaces or commas)"/>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
22 <param name="sample_init" title="Sample name" type="text" label="Sample name (no spaces, commas or colons allowed)"/>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
23 <param format="sam,bam" name="file_init" type="data" label="SAM/BAM File" help=""/>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
24 <repeat name="input_files" title="Replicate">
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
25 <param name="sample" title="Sample name" type="text" label="Sample name (no spaces, commas or colons allowed)"/>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
26 <param format="sam,bam" name="file" type="data" label="Add file" help=""/>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
27 </repeat>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
28 </repeat>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
29 <param format="gff, gtf" name="gff_file" type="data" label="The features file in the GFF/GTF format"/>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
30 <param name="MODE" type="select" label="Mode to handle reads overlapping more than one feature">
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
31 <option value="union">Union</option>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
32 <option value="intersection-strict">Intersection Strict</option>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
33 <option value="intersection-nonempty" selected="true">Intersection Nonempty</option>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
34 </param>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
35 <param name="STRANDED" type="select" label="Is the data from a strand-specific assay?">
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
36 <option value="no" selected="true">No</option>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
37 <option value="yes">Yes</option>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
38 <option value="reverse">Yes but reverse</option>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
39 </param>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
40 <param name="MINAQUAL" type="integer" value="0" label="Minimum Alignment Quality" help="Skip all reads with alignment quality lower than the given minimum value." />
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
41 <param name="FEATURETYPE" value="exon" type="text" label="Feature type (3rd column in GFF file) to be used" help="All features of other type are ignored (default, suitable for RNA-Seq and Ensembl GTF files: exon)" size="80" />
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
42 <param name="IDATTR" value="gene_id" type="text" label="GFF attribute to be used as feature ID" help="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." size="80" />
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
43 <param name="REDUCE" type="boolean" truevalue="-c" falsevalue="" checked="True" label="Reduce Matrix" help="Remove any rows for which all input Sam/Bam files have 0 counts."/>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
44 </inputs>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
45
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
46 <outputs>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
47 <data format="tabular" name="output" label="Digital Expression Matrix: $matrix_name"/>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
48 <data format="txt" name="report" label="Matrix Report: $matrix_name"/>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
49 </outputs>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
50
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
51 <help>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
52
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
53 .. class:: infomark
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
54
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
55 **What it does**
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
56
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
57 Create a digital expression matrix by counting reads in features with htseq-count
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
58
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
59 For each given file with aligned sequencing reads this tool counts how many reads map to each feature. It then constructs a matrix where the rows represent the features and the columns represent the files.
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
60
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
61 A feature is here an interval (i.e., a range of positions) on a chromosome or a union of such intervals.
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
62
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
63 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 region from a pre-determined list.
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
64
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
65 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.
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
66
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
67 The three overlap resolution modes of htseq-count work as follows. For each position i in the read, a set S(i) is defined as the set of all features overlapping position i. Then, consider the set S, which is (with i running through all position within the read)
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
68
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
69 * the union of all the sets S(i) for mode union.
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
70 * the intersection of all the sets S(i) for mode intersection-strict.
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
71 * the intersection of all non-empty sets S(i) for mode intersection-nonempty.
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
72
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
73 If S contains precisely one feature, the read is counted for this feature. If it contains more than one feature, the read is counted as ambiguous (and not counted for any features), and if S is empty, the read is counted as no_feature.
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
74
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
75 The following figure illustrates the effect of these three modes:
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
76
8
734516a21b52 Uploaded
fcaramia
parents: 5
diff changeset
77 .. image:: http://www-huber.embl.de/users/anders/HTSeq/doc/_images/count_modes.png
5
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
78
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
79 The strandedness of the assay may also be set. For stranded=no, a read is considered overlapping with a feature regardless of whether it is mapped to the same or the opposite strand as the feature. For stranded=yes and single-end reads, the read has to be mapped to the same strand as the feature. For paired-end reads, the first read has to be on the same strand and the second read on the opposite strand. For stranded=reverse, these rules are reversed.
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
80
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
81 .. class:: warningmark
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
82
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
83 **Important:** The default for strandedness is no. If yes or reverse is selected and your RNA-Seq data has not been made with a strand-specific protocol, this will cause half of the reads to be lost. Hence, make sure to set the option --stranded=no unless you have strand-specific data!
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
84
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
85 ------
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
86
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
87 **Output**
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
88
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
89 The script outputs a digital expression matrix containing the counts for each feature by each input Sam/Bam file. It will also generate a report containing special counters, which count reads that were not counted for any feature for various reasons, namely:
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
90
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
91 * no_feature: reads which could not be assigned to any feature (set S as described above was empty).
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
92 * ambiguous: reads which could have been assigned to more than one feature and hence were not counted for any of these (set S had more than one element).
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
93 * too_low_aQual: reads which were not counted due to the -a option, see below
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
94 * not_aligned: reads in the Sam/Bam file without alignment
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
95 * 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.)
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
96
8
734516a21b52 Uploaded
fcaramia
parents: 5
diff changeset
97 **Reference**
734516a21b52 Uploaded
fcaramia
parents: 5
diff changeset
98
734516a21b52 Uploaded
fcaramia
parents: 5
diff changeset
99 http://www-huber.embl.de/users/anders/HTSeq/doc/overview.html
734516a21b52 Uploaded
fcaramia
parents: 5
diff changeset
100
734516a21b52 Uploaded
fcaramia
parents: 5
diff changeset
101
734516a21b52 Uploaded
fcaramia
parents: 5
diff changeset
102
5
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
103 </help>
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
104
a535c6d80fb0 Uploaded
fcaramia
parents:
diff changeset
105 </tool>