comparison htseq-count.xml @ 29:4418229c501e draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/htseq_count commit 86a6c88d482d19bb7105fb17b933e19cd1e86ece
author iuc
date Wed, 31 Jan 2024 12:51:03 +0000
parents 916cb26bd9d3
children
comparison
equal deleted inserted replaced
28:916cb26bd9d3 29:4418229c501e
1 <tool id="htseq_count" name="htseq-count" version="0.9.1+galaxy1" profile="16.04"> 1 <tool id="htseq_count" name="htseq-count" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
2 <description> - Count aligned reads in a BAM file that overlap features in a GFF file</description> 2 <description> - Count aligned reads in a BAM file that overlap features in a GFF file</description>
3 <macros>
4 <token name="@TOOL_VERSION@">2.0.5</token>
5 <token name="@VERSION_SUFFIX@">0</token>
6 <token name="@PROFILE@">23.0</token>
7 </macros>
8 <xrefs>
9 <xref type="bio.tools">htseq</xref>
10 </xrefs>
3 <requirements> 11 <requirements>
4 <requirement type="package" version="0.9.1">htseq</requirement> 12 <requirement type="package" version="@TOOL_VERSION@">htseq</requirement>
5 <requirement type="package" version="1.7">samtools</requirement> 13 <requirement type="package" version="1.19.2">samtools</requirement>
14 <requirement type="package" version="5.3.0">gawk</requirement>
15 <requirement type="package" version="9.4">coreutils</requirement>
6 </requirements> 16 </requirements>
7 17
8 <stdio> 18 <stdio>
9 <exit_code range="1:" level="fatal" description="Unknown error occurred" /> 19 <exit_code range="1:" level="fatal" />
10 <regex match="htseq-count: (command ){0,1}not found" source="stderr" level="fatal" description="The HTSeq python package is not properly installed, contact Galaxy administrators" /> 20 <regex match="htseq-count: (command ){0,1}not found" source="stderr" level="fatal" description="The HTSeq python package is not properly installed, contact Galaxy administrators" />
11 <regex match="samtools: (command ){0,1}not found" source="stderr" level="fatal" description="The samtools package is not properly installed, contact Galaxy administrators" /> 21 <regex match="samtools: (command ){0,1}not found" source="stderr" level="fatal" description="The samtools package is not properly installed, contact Galaxy administrators" />
12 <regex match="Error: Feature (.+) does not contain a '(.+)' attribute" source="both" level="fatal" description="Error parsing the GFF file, at least one feature of the specified 'Feature type' does not have a value for the specified 'ID Attribute'" /> 22 <regex match="Error: Feature (.+) does not contain a '(.+)' attribute" source="both" level="fatal" description="Error parsing the GFF file, at least one feature of the specified 'Feature type' does not have a value for the specified 'ID Attribute'" />
13 <regex match="Error occured in line (\d+) of file" source="stderr" level="fatal" description="Unknown error parsing the GFF file" /> 23 <regex match="Error occured in line (\d+) of file" source="stderr" level="fatal" description="Unknown error parsing the GFF file" />
24 <regex match="no SQ lines present" source="stderr" level="fatal" description="Input SAM dataset is missing header or SQ header lines. Please provide a FASTA reference sequence as additional input." />
14 <regex match="Error" source="stderr" level="fatal" description="Unknown error occured" /> 25 <regex match="Error" source="stderr" level="fatal" description="Unknown error occured" />
15 </stdio> 26 </stdio>
16 27
17 <version_command>htseq-count -h | grep version | sed 's/^\(.*\)*\(version .*\)\./\2/'</version_command> 28 <version_command>htseq-count --version</version_command>
18 29
19 <command><![CDATA[ 30 <command><![CDATA[
20 ##set up input files 31 ##set up input files
21 #set $reference_fasta_filename = "localref.fa" 32 #set $name_sorted_alignment_filename = "name_sorted.bam"
22 #set $name_sorted_alignment_filename = "name_sorted_alignment.sam" 33 #set $ref_index = "ref.fai"
23 #if str( $advanced_options.advanced_options_selector ) == "advanced": 34 #if $samfile.extension == 'sam':
24 #if str( $advanced_options.samout_conditional.samout ) == "Yes": 35 #if str($reference_source.reference_source_selector) == "history":
25 #if str( $advanced_options.samout_conditional.reference_source.reference_source_selector ) == "history": 36 samtools faidx --fai-idx $ref_index '${reference_source.ref_file}' 2>&1 || echo "Error running samtools faidx for htseq-count" >&2 &&
26 ln -s "${advanced_options.samout_conditional.reference_source.ref_file}" "${reference_fasta_filename}" && 37 #elif str($reference_source.reference_source_selector) == "cached":
27 samtools faidx '${reference_fasta_filename}' 2>&1 || echo "Error running samtools faidx for htseq-count" >&2 && 38 ln -s '${reference_source.ref_file.fields.path}.fai' $ref_index
28 #else:
29 #set $reference_fasta_filename = str( $advanced_options.samout_conditional.reference_source.ref_file.fields.path )
30 #end if
31 #end if 39 #end if
32 #end if 40 #end if
33 41
34 #if $samfile.extension == 'bam': 42 #if $samfile.extension == 'sam' and str($reference_source.reference_source_selector):
35 samtools sort -n -T "\${TMPDIR:-.}" --output-fmt=SAM -o '$name_sorted_alignment_filename' '$samfile' && 43 samtools view -u -t $ref_index '$samfile' | samtools sort -n -T "\${TMPDIR:-.}" -o $name_sorted_alignment_filename - &&
36 #else 44 #else:
37 samtools view -Su -t '${reference_fasta_filename}.fai' '$samfile' | samtools sort -n -T "\${TMPDIR:-.}" --output-fmt=SAM -o '$name_sorted_alignment_filename' - && 45 samtools sort -n -T "\${TMPDIR:-.}" -o $name_sorted_alignment_filename '$samfile' &&
46 #end if
47
48 #if $gfffile.is_of_type('gtf'):
49 ## htseq-count requires .gtf suffix to recognize GTF-formatted feature files
50 ## and to handle textual attributes should surrounded by doublequotes correctly
51 #set $genomic_features = 'features.gtf'
52 ln -s '$gfffile' $genomic_features &&
53 #else:
54 #set $genomic_features = $gfffile
38 #end if 55 #end if
39 56
40 htseq-count 57 htseq-count
41 --mode=$mode 58 --mode=$mode
42 --stranded=$stranded 59 --stranded=$stranded
46 63
47 #if str( $advanced_options.advanced_options_selector ) == "advanced": 64 #if str( $advanced_options.advanced_options_selector ) == "advanced":
48 --nonunique=$advanced_options.nonunique 65 --nonunique=$advanced_options.nonunique
49 --secondary-alignments=${advanced_options.secondary_alignments} 66 --secondary-alignments=${advanced_options.secondary_alignments}
50 --supplementary-alignments=${advanced_options.supplementary_alignments} 67 --supplementary-alignments=${advanced_options.supplementary_alignments}
51 #if $advanced_options.samout_conditional.samout == "Yes": 68 #if $advanced_options.samout:
52 --samout=samout.sam 69 -o samout.sam
53 #end if 70 #end if
54 #end if 71 #end if
55 72
56 --order=name 73 --order=name
57 --format=sam 74 $name_sorted_alignment_filename
58 '$name_sorted_alignment_filename' 75
59 76 '$genomic_features' | csplit -q - /^__/ &&
60 "$gfffile" | awk '{if ($1 ~ "no_feature|ambiguous|too_low_aQual|not_aligned|alignment_not_unique") print $0 | "cat 1>&2"; else print $0}' 77
61 > '$counts' 78 ## csplit above creates two files,
62 2> '$othercounts' 79 ## xx00 with the feature counts and xx01 with category counts.
80 ## Now we calculate the sum over all feature counts in xx00 and append that
81 ## sum as the __aligned count to xx01.
82 echo -e "__aligned\t\$(cut -f2 xx00 | awk '{s+=$1}END{print s}' -)" >> xx01
63 83
64 #if str( $advanced_options.advanced_options_selector ) == "advanced": 84 #if str( $advanced_options.advanced_options_selector ) == "advanced":
65 #if $advanced_options.samout_conditional.samout == "Yes": 85 #if $advanced_options.samout:
66 && samtools view -Su 86 && samtools sort -T "\${TMPDIR:-.}" -o out.bam samout.sam
67 -t '${reference_fasta_filename}.fai'
68 samout.sam
69 | samtools sort -T "\${TMPDIR:-.}" -o '$samoutfile' -
70 #end if 87 #end if
71 #end if 88 #end if
72 ]]> 89 ]]>
73 </command> 90 </command>
74
75 <inputs> 91 <inputs>
76 <param format="sam,bam" name="samfile" type="data" label="Aligned SAM/BAM File"/> 92 <param format="sam,bam" name="samfile" type="data" label="Aligned SAM/BAM File"/>
77 <param format="gff" name="gfffile" type="data" label="GFF File"/> 93 <param format="gff" name="gfffile" type="data" label="GFF/GTF File"/>
78 <param name="mode" type="select" label="Mode" argument="--mode"> 94 <param type="select" label="Mode" argument="--mode">
79 <help>Mode to handle reads overlapping more than one feature.</help> 95 <help>Mode to handle reads overlapping more than one feature.</help>
80 <option value="union" selected="True">Union</option> 96 <option value="union" selected="True">Union</option>
81 <option value="intersection-strict">Intersection (strict)</option> 97 <option value="intersection-strict">Intersection (strict)</option>
82 <option value="intersection-nonempty">Intersection (nonempty)</option> 98 <option value="intersection-nonempty">Intersection (nonempty)</option>
83 </param> 99 </param>
84 <param name="stranded" type="select" label="Stranded" argument="--stranded"> 100 <param type="select" label="Stranded" argument="--stranded">
85 <help>Specify whether the data is from a strand-specific assay. 101 <help>Specify whether the data is from a strand-specific assay.
86 **Be sure to choose the correct value** (see help for more 102 **Be sure to choose the correct value** (see help for more
87 information).</help> 103 information).</help>
88 <option value="yes" selected="True">Yes</option> 104 <option value="yes" selected="True">Yes</option>
89 <option value="no">No</option> 105 <option value="no">No</option>
90 <option value="reverse">Reverse</option> 106 <option value="reverse">Reverse</option>
91 </param> 107 </param>
92 <param name="minaqual" type="integer" value="10" label="Minimum alignment quality" argument="--minaqual"> 108 <param type="integer" value="10" label="Minimum alignment quality" argument="--minaqual">
93 <help>Skip all reads with alignment quality lower than the given minimum value.</help> 109 <help>Skip all reads with alignment quality lower than the given minimum value.</help>
94 </param> 110 </param>
95 <param name="featuretype" type="text" value="exon" label="Feature type" argument="--type"> 111 <param name="featuretype" type="text" value="exon" label="Feature type" argument="--type">
96 <help>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.</help> 112 <help>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.</help>
97 </param> 113 </param>
98 <param name="idattr" type="text" value="gene_id" label="ID Attribute" argument="--idattr"> 114 <param type="text" value="gene_id" label="ID Attribute" argument="--idattr">
99 <help>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. All features of the specified type MUST have a value for this attribute. The default, suitable for RNA-Seq and Ensembl GTF files, is gene_id.</help> 115 <help>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. All features of the specified type MUST have a value for this attribute. The default, suitable for RNA-Seq and Ensembl GTF files, is gene_id.</help>
100 </param> 116 </param>
101 117
102 <conditional name="advanced_options"> 118 <conditional name="advanced_options">
103 <param name="advanced_options_selector" type="select" label="Set advanced options"> 119 <param name="advanced_options_selector" type="select" label="Set advanced options">
104 <option value="simple" selected="true">Default settings</option> 120 <option value="simple" selected="true">Default settings</option>
105 <option value="advanced">Set advanced options</option> 121 <option value="advanced">Set advanced options</option>
106 </param> 122 </param>
107 <when value="simple"> 123 <when value="simple" />
108 </when>
109 <when value="advanced"> 124 <when value="advanced">
110 <param argument="--nonunique" type="select" label="How to count nonunique or ambiguous mapping reads"> 125 <param argument="--nonunique" type="select" label="How to count nonunique or ambiguous mapping reads">
111 <option value="none" selected="true">None - do not count nonuniquely or ambiguously mapped reads for any features</option> 126 <option value="none" selected="true">None - do not count nonuniquely or ambiguously mapped reads for any features</option>
112 <option value="all">All - count nonuniquely or ambiguously mapped reads in BOTH in the nonunique or ambiguous category AND for any features they overlap</option> 127 <option value="all">All - count nonuniquely or ambiguously mapped reads in BOTH in the nonunique or ambiguous category AND for any features they overlap</option>
113 </param> 128 </param>
114 <param argument="--secondary-alignments" name="secondary_alignments" type="boolean" truevalue="ignore" falsevalue="score" checked="false" label="Ignore seconday alignments (0x100 flag)" /> 129 <param argument="--secondary-alignments" type="boolean" truevalue="ignore" falsevalue="score" checked="false" label="Ignore seconday alignments (0x100 flag)" />
115 <param argument="--supplementary-alignments" name="supplementary_alignments" type="boolean" truevalue="ignore" falsevalue="score" checked="false" label="Ignore supplementary alignments (0x800 flag)" /> 130 <param argument="--supplementary-alignments" type="boolean" truevalue="ignore" falsevalue="score" checked="false" label="Ignore supplementary alignments (0x800 flag)" />
116 <conditional name="samout_conditional"> 131 <param argument="--samout" type="boolean" label="Additional BAM Output" help="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’)." />
117 <param name="samout" type="select" label="Additional BAM Output"> 132 </when>
118 <help>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’).</help> 133 </conditional>
119 <option value="No" selected="True">Do not output additional BAM file</option> 134 <conditional name="reference_source">
120 <option value="Yes">Output additional BAM file</option> 135 <param name="reference_source_selector" type="select" label="Provide a reference sequence?" help="Required for SAM input without @SQ headers, not necessary otherwise and ignored for BAM input.">
121 </param> 136 <option value="">No</option>
122 <when value="Yes"> 137 <option value="cached">Locally cached</option>
123 <conditional name="reference_source"> 138 <option value="history">History</option>
124 <param name="reference_source_selector" type="select" label="Choose the source for the reference list"> 139 </param>
125 <option value="cached">Locally cached</option> 140 <when value="" />
126 <option value="history">History</option> 141 <when value="cached">
127 </param> 142 <param name="ref_file" type="select" label="Using reference genome">
128 <when value="cached"> 143 <options from_data_table="sam_fa_indexes">
129 <param name="ref_file" type="select" label="Using reference genome"> 144 <filter type="data_meta" key="dbkey" ref="samfile" column="value"/>
130 <options from_data_table="sam_fa_indexes"> 145 </options>
131 <filter type="data_meta" key="dbkey" ref="samfile" column="value"/> 146 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
132 </options> 147 </param>
133 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/> 148 </when>
134 </param> 149 <when value="history">
135 </when> 150 <param name="ref_file" type="data" format="fasta" label="Using reference file" />
136 <when value="history">
137 <param name="ref_file" type="data" format="fasta" label="Using reference file" />
138 </when>
139 </conditional>
140 </when>
141 <when value="No">
142 <!-- Do nothing -->
143 </when>
144 </conditional>
145 </when> 151 </when>
146 </conditional> 152 </conditional>
147 </inputs> 153 </inputs>
148 154
149 <outputs> 155 <outputs>
150 <data format="tabular" name="counts" metadata_source="samfile" label="${tool.name} on ${on_string}"> 156 <data name="counts" format="tabular" metadata_source="samfile" from_work_dir="xx00" label="${tool.name} on ${on_string}">
151 <actions> 157 <actions>
152 <action name="column_names" type="metadata" default="Geneid,${samfile.element_identifier}" /> 158 <action name="column_names" type="metadata" default="Geneid,${samfile.element_identifier}" />
153 </actions> 159 </actions>
154 </data> 160 </data>
155 <data format="tabular" name="othercounts" metadata_source="samfile" label="${tool.name} on ${on_string} (no feature)"> 161 <data name="allcounts" format="tabular" metadata_source="samfile" from_work_dir="xx01" label="${tool.name} on ${on_string}: summary">
156 <actions> 162 <actions>
157 <action name="column_names" type="metadata" default="Category,${samfile.element_identifier}" /> 163 <action name="column_names" type="metadata" default="Category,${samfile.element_identifier}" />
158 </actions> 164 </actions>
159 </data> 165 </data>
160 <data format="bam" name="samoutfile" metadata_source="samfile" label="${tool.name} on ${on_string} (BAM)"> 166 <data name="samoutfile" format="bam" metadata_source="samfile" from_work_dir="out.bam" label="${tool.name} on ${on_string} (BAM)">
161 <filter>advanced_options['advanced_options_selector'] == 'advanced' and advanced_options['samout_conditional']['samout'] == "Yes"</filter> 167 <filter>advanced_options['advanced_options_selector'] == 'advanced' and advanced_options['samout']</filter>
162 </data> 168 </data>
163 </outputs> 169 </outputs>
164 170
165 <tests> 171 <tests>
166 <test expect_num_outputs="2"> 172 <test expect_num_outputs="2">
167 <param name="samfile" value="htseq-test.sam" /> 173 <param name="samfile" value="htseq-test.sam" />
168 <param name="gfffile" value="htseq-test.gff" /> 174 <param name="gfffile" value="htseq-test.gtf" />
169 <output name="counts" file="htseq-test_counts.tsv" /> 175 <output name="counts" file="htseq-test_counts.tsv" />
170 <output name="othercounts" file="htseq-test_othercounts.tsv" /> 176 <output name="allcounts" file="htseq-test_allcounts.tsv" />
171 </test> 177 </test>
172 <test expect_num_outputs="2"> 178 <test expect_num_outputs="2">
179 <!-- same as before, but with gff3 input instead of gtf -->
173 <param name="samfile" value="htseq-test.sam" /> 180 <param name="samfile" value="htseq-test.sam" />
174 <param name="gfffile" value="htseq-test.gff" /> 181 <param name="gfffile" value="htseq-test.gff" />
175 <output name="counts" file="htseq-test_counts.tsv" /> 182 <output name="counts" file="htseq-test_counts.tsv" />
176 <output name="othercounts" file="htseq-test_othercounts.tsv" /> 183 <output name="allcounts" file="htseq-test_allcounts.tsv" />
177 </test> 184 </test>
178 <test expect_num_outputs="2"> 185 <test expect_num_outputs="2">
179 <param name="samfile" value="htseq-test.bam" /> 186 <!-- test SAM with no SQ lines and FASTA reference -->
180 <param name="gfffile" value="htseq-test.gff" /> 187 <param name="samfile" value="htseq-test_nosq.sam" />
181 <output name="counts" file="htseq-test_counts.tsv" /> 188 <param name="gfffile" value="htseq-test.gff" />
182 <output name="othercounts" file="htseq-test_othercounts.tsv" />
183 </test>
184 <test expect_num_outputs="2">
185 <param name="samfile" value="htseq-test-paired.bam" />
186 <param name="gfffile" value="htseq-test.gff" />
187 <output name="counts" file="htseq-test-paired_counts.tsv" />
188 <output name="othercounts" file="htseq-test-paired_othercounts.tsv" />
189 </test>
190 <test expect_num_outputs="2">
191 <param name="samfile" value="htseq-test-paired.bam" />
192 <param name="gfffile" value="htseq-test.gff" />
193 <param name="samout" value="No" />
194 <output name="counts" file="htseq-test-paired_counts.tsv" />
195 <output name="othercounts" file="htseq-test-paired_othercounts.tsv" />
196 </test>
197 <test expect_num_outputs="3">
198 <param name="samfile" value="htseq-test.sam" />
199 <param name="gfffile" value="htseq-test.gff" />
200 <param name="advanced_options_selector" value="advanced" />
201 <param name="samout" value="Yes" />
202 <param name="reference_source_selector" value="history" /> 189 <param name="reference_source_selector" value="history" />
203 <param name="ref_file" value="htseq-test_reference.fasta" /> 190 <param name="ref_file" value="htseq-test_reference.fasta" />
204 <output name="counts" file="htseq-test_counts.tsv" /> 191 <output name="counts" file="htseq-test_counts.tsv" />
205 <output name="othercounts" file="htseq-test_othercounts.tsv" /> 192 <output name="allcounts" file="htseq-test_allcounts.tsv" />
206 <output name="samoutfile" file="htseq-test_samout.bam" /> 193 </test>
194 <test expect_num_outputs="2">
195 <param name="samfile" value="htseq-test.bam" />
196 <param name="gfffile" value="htseq-test.gff" />
197 <output name="counts" file="htseq-test_counts.tsv" />
198 <output name="allcounts" file="htseq-test_allcounts.tsv" />
199 </test>
200 <test expect_num_outputs="2">
201 <param name="samfile" value="htseq-test-paired.bam" />
202 <param name="gfffile" value="htseq-test.gff" />
203 <output name="counts" file="htseq-test-paired_counts.tsv" />
204 <output name="allcounts" file="htseq-test-paired_allcounts.tsv" />
205 </test>
206 <test expect_num_outputs="2">
207 <param name="samfile" value="htseq-test-paired.bam" />
208 <param name="gfffile" value="htseq-test.gff" />
209 <param name="samout" value="true" />
210 <output name="counts" file="htseq-test-paired_counts.tsv" />
211 <output name="allcounts" file="htseq-test-paired_allcounts.tsv" />
212 </test>
213 <test expect_num_outputs="3">
214 <param name="samfile" value="htseq-test.sam" />
215 <param name="gfffile" value="htseq-test.gff" />
216 <param name="advanced_options_selector" value="advanced" />
217 <param name="samout" value="true" />
218 <output name="counts" file="htseq-test_counts.tsv" />
219 <output name="allcounts" file="htseq-test_allcounts.tsv" />
220 <output name="samoutfile" file="htseq-test_samout.bam" ftype="bam" compare="diff" lines_diff="4" />
207 </test> 221 </test>
208 <test expect_num_outputs="2"> 222 <test expect_num_outputs="2">
209 <param name="samfile" value="htseq-test.sam" /> 223 <param name="samfile" value="htseq-test.sam" />
210 <param name="gfffile" value="htseq-test.gff" /> 224 <param name="gfffile" value="htseq-test.gff" />
211 <param name="advanced_options_selector" value="advanced" /> 225 <param name="advanced_options_selector" value="advanced" />
212 <param name="nonunique" value="all" /> 226 <param name="nonunique" value="all" />
213 <param name="secondary_alignments" value="ignore" /> 227 <param name="secondary_alignments" value="ignore" />
214 <param name="supplementary_alignments" value="ignore" /> 228 <param name="supplementary_alignments" value="ignore" />
215 <output name="counts" file="htseq-test_counts_nonunique.tsv" /> 229 <output name="counts" file="htseq-test_counts_nonunique.tsv" />
216 <output name="othercounts" file="htseq-test_othercounts.tsv" /> 230 <output name="allcounts" file="htseq-test_allcounts.tsv" />
217 </test> 231 </test>
218 </tests> 232 </tests>
219 233
220 <help> 234 <help>
221 <![CDATA[ 235 <![CDATA[
223 -------- 237 --------
224 238
225 This tool takes an alignment file in SAM or BAM format and feature file in GFF format 239 This tool takes an alignment file in SAM or BAM format and feature file in GFF format
226 and calculates the number of reads mapping to each feature. It uses the *htseq-count* 240 and calculates the number of reads mapping to each feature. It uses the *htseq-count*
227 script that is part of the HTSeq python module. See 241 script that is part of the HTSeq python module. See
228 http://www-huber.embl.de/users/anders/HTSeq/doc/count.html for details. 242 https://htseq.readthedocs.io/en/latest/ for details.
229 243
230 A feature is an interval (i.e., a range of positions) on a chromosome or a union of 244 A feature is an interval (i.e., a range of positions) on a chromosome or a union of
231 such intervals. In the case of RNA-Seq, the features are typically genes, where 245 such intervals. In the case of RNA-Seq, the features are typically genes, where
232 each gene is considered here as the union of all its exons. One may also consider 246 each gene is considered here as the union of all its exons. One may also consider
233 each exon as a feature, e.g., in order to check for alternative splicing. For 247 each exon as a feature, e.g., in order to check for alternative splicing. For
308 322
309 Usage: htseq-count [options] sam_file gff_file 323 Usage: htseq-count [options] sam_file gff_file
310 324
311 This script takes an alignment file in SAM format and a feature file in GFF 325 This script takes an alignment file in SAM format and a feature file in GFF
312 format and calculates for each feature the number of reads mapping to it. See 326 format and calculates for each feature the number of reads mapping to it. See
313 https://htseq.readthedocs.io/en/release_0.9.1/count.html for details. 327 https://htseq.readthedocs.io/en/latest/ for details.
314 328
315 Options: 329 Options:
316 -f <format>, --format=<format> 330 -f <format>, --format=<format>
317 331
318 Format of the input data. Possible values are sam (for text SAM files) and bam (for binary BAM files). Default is sam. 332 Format of the input data. Possible values are sam (for text SAM files) and bam (for binary BAM files). Default is sam.
375 389
376 -h, --help 390 -h, --help
377 391
378 Show a usage summary and exit 392 Show a usage summary and exit
379 393
380 .. _FAQ: https://htseq.readthedocs.io/en/release_0.9.1/count.html#frequenctly-asked-questions 394 .. _FAQ: https://htseq.readthedocs.io/en/master/index.html
381 395
382 ]]> 396 ]]>
383 </help> 397 </help>
384 <citations> 398 <citations>
385 <citation type="doi">10.1093/bioinformatics/btu638</citation> 399 <citation type="doi">10.1093/bioinformatics/btu638</citation>