comparison htseq-count.xml @ 18:737cda668bdd draft

planemo upload for repository https://github.com/lparsons/galaxy_tools/tree/master/tools/htseq_count commit 7ed7ce73afea50d212c9470fd3b98a232e312502
author lparsons
date Mon, 22 Jun 2015 12:42:30 -0400
parents 3102bfcac0d6
children 8bc865a85024
comparison
equal deleted inserted replaced
17:3102bfcac0d6 18:737cda668bdd
1 <tool id="htseq_count" name="htseq-count" version="0.4.1"> 1 <tool id="htseq_count" name="htseq-count" version="0.4.1">
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 <version_command>htseq-count -h | grep version | sed 's/^\(.*\)*\(version .*\)\./\2/'</version_command>
4 <requirements> 3 <requirements>
5 <requirement type="package" version="1.7.1">numpy</requirement>
6 <requirement type="package" version="0.6.1">htseq</requirement> 4 <requirement type="package" version="0.6.1">htseq</requirement>
7 <requirement type="package" version="0.1.19">samtools</requirement> 5 <requirement type="package" version="0.1.19">samtools</requirement>
8 <requirement type="package" version="0.7.7">pysam</requirement> 6 <requirement type="package" version="0.7.7">pysam</requirement>
9 </requirements> 7 </requirements>
8
9 <stdio>
10 <exit_code range="1:" level="fatal" description="Unknown error occurred" />
11 <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" />
12 <regex match="samtools: (command ){0,1}not found" source="stderr" level="fatal" description="The samtools package is not properly installed, contact Galaxy administrators" />
13 <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'" />
14 <regex match="Error occured in line (\d+) of file" source="stderr" level="fatal" description="Unknown error parsing the GFF file" />
15 <regex match="Error" source="stderr" level="fatal" description="Unknown error occured" />
16 <regex match="Warning: Read (.+) claims to have an aligned mate which could not be found. \(Is the SAM file properly sorted\?\)" source="stderr" level="warning" description="PAIRED DATA MISSING OR NOT PROPERLY SORTED. Try reruning and selecting the paired-end option. See stderr output of this dataset for more information." />
17 </stdio>
18
19 <version_command>htseq-count -h | grep version | sed 's/^\(.*\)*\(version .*\)\./\2/'</version_command>
20
10 <command> 21 <command>
11 ##set up input files 22 ##set up input files
12 #set $reference_fasta_filename = "localref.fa" 23 #set $reference_fasta_filename = "localref.fa"
13 #if $samout_conditional.samout: 24 #if $samout_conditional.samout:
14 #if str( $samout_conditional.reference_source.reference_source_selector ) == "history": 25 #if str( $samout_conditional.reference_source.reference_source_selector ) == "history":
16 samtools faidx "${reference_fasta_filename}" 2&gt;&amp;1 || echo "Error running samtools faidx for htseq-count" &gt;&amp;2 &amp;&amp; 27 samtools faidx "${reference_fasta_filename}" 2&gt;&amp;1 || echo "Error running samtools faidx for htseq-count" &gt;&amp;2 &amp;&amp;
17 #else: 28 #else:
18 #set $reference_fasta_filename = str( $samout_conditional.reference_source.ref_file.fields.path ) 29 #set $reference_fasta_filename = str( $samout_conditional.reference_source.ref_file.fields.path )
19 #end if 30 #end if
20 #end if 31 #end if
21 htseq-count 32 htseq-count
22 --format=$samfile.extension 33 --format=$samfile.extension
23 --order=pos 34 --order=pos
24 --mode=$mode 35 --mode=$mode
25 --stranded=$stranded 36 --stranded=$stranded
26 --minaqual=$minaqual 37 --minaqual=$minaqual
27 --type=$featuretype 38 --type=$featuretype
28 --idattr=$idattr 39 --idattr=$idattr
29 #if $samout_conditional.samout: 40 #if $samout_conditional.samout:
30 --samout=$__new_file_path__/${samoutfile.id}_tmp 41 --samout=$__new_file_path__/${samoutfile.id}_tmp
31 #end if 42 #end if
32 $samfile 43 $samfile
33 $gfffile 44 $gfffile
34 | awk '{if ($1 ~ "no_feature|ambiguous|too_low_aQual|not_aligned|alignment_not_unique") print $0 | "cat 1>&amp;2"; else print $0}' &gt; $counts 2&gt;$othercounts 45 | awk '{if ($1 ~ "no_feature|ambiguous|too_low_aQual|not_aligned|alignment_not_unique") print $0 | "cat 1>&amp;2"; else print $0}' &gt; $counts 2&gt;$othercounts
35 #if $samout_conditional.samout: 46 #if $samout_conditional.samout:
36 &amp;&amp; samtools view -Su -t ${reference_fasta_filename}.fai $__new_file_path__/${samoutfile.id}_tmp | samtools sort -o - sorted > $samoutfile 47 &amp;&amp; samtools view -Su -t ${reference_fasta_filename}.fai $__new_file_path__/${samoutfile.id}_tmp | samtools sort -o - sorted > $samoutfile
37 #end if</command> 48 #end if</command>
49
38 <inputs> 50 <inputs>
39 <param format="sam,bam" name="samfile" type="data" label="Aligned SAM/BAM File"/> 51 <param format="sam,bam" name="samfile" type="data" label="Aligned SAM/BAM File"/>
40 <param format="gff" name="gfffile" type="data" label="GFF File"/> 52 <param format="gff" name="gfffile" type="data" label="GFF File"/>
41 <param name="mode" type="select" label="Mode"> 53 <param name="mode" type="select" label="Mode">
42 <help>Mode to handle reads overlapping more than one feature.</help> 54 <help>Mode to handle reads overlapping more than one feature.</help>
61 </param> 73 </param>
62 <conditional name="samout_conditional"> 74 <conditional name="samout_conditional">
63 <param name="samout" type="boolean" value="False" truevalue="True" falsevalue="False" label="Additional BAM Output"> 75 <param name="samout" type="boolean" value="False" truevalue="True" falsevalue="False" label="Additional BAM Output">
64 <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> 76 <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>
65 </param> 77 </param>
66 <when value="True"> 78 <when value="True">
67 <conditional name="reference_source"> 79 <conditional name="reference_source">
68 <param name="reference_source_selector" type="select" label="Choose the source for the reference list"> 80 <param name="reference_source_selector" type="select" label="Choose the source for the reference list">
69 <option value="cached">Locally cached</option> 81 <option value="cached">Locally cached</option>
70 <option value="history">History</option> 82 <option value="history">History</option>
71 </param> 83 </param>
91 <data format="bam" name="samoutfile" metadata_source="samfile" label="${tool.name} on ${on_string} (BAM)"> 103 <data format="bam" name="samoutfile" metadata_source="samfile" label="${tool.name} on ${on_string} (BAM)">
92 <filter>samout_conditional['samout']</filter> 104 <filter>samout_conditional['samout']</filter>
93 </data> 105 </data>
94 </outputs> 106 </outputs>
95 107
96 <stdio>
97 <exit_code range="1:" level="fatal" description="Unknown error occurred" />
98 <regex match="htseq-count: command not found" source="stderr" level="fatal" description="The HTSeq python package is not properly installed, contact Galaxy administrators" />
99 <regex match="samtools: command not found" source="stderr" level="fatal" description="The samtools package is not properly installed, contact Galaxy administrators" />
100 <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'" />
101 <regex match="Error occured in line (\d+) of file" source="stderr" level="fatal" description="Unknown error parsing the GFF file" />
102 <regex match="Error" source="stderr" level="fatal" description="Unknown error occured" />
103 <regex match="Warning: Read (.+) claims to have an aligned mate which could not be found. \(Is the SAM file properly sorted\?\)" source="stderr" level="warning" description="PAIRED DATA MISSING OR NOT PROPERLY SORTED. Try reruning and selecting the paired-end option. See stderr output of this dataset for more information." />
104 </stdio>
105
106 <tests> 108 <tests>
107 <test> 109 <test>
108 <param name="samfile" value="htseq-test.sam" /> 110 <param name="samfile" value="htseq-test.sam" />
109 <param name="gfffile" value="htseq-test.gff" /> 111 <param name="gfffile" value="htseq-test.gff" />
110 <param name="samout" value="False" /> 112 <param name="samout" value="False" />
143 <help> 145 <help>
144 Overview 146 Overview
145 -------- 147 --------
146 148
147 This tool takes an alignment file in SAM or BAM format and feature file in GFF format 149 This tool takes an alignment file in SAM or BAM format and feature file in GFF format
148 and calculates the number of reads mapping to each feature. It uses the *htseq-count* 150 and calculates the number of reads mapping to each feature. It uses the *htseq-count*
149 script that is part of the HTSeq python module. See 151 script that is part of the HTSeq python module. See
150 http://www-huber.embl.de/users/anders/HTSeq/doc/count.html for details. 152 http://www-huber.embl.de/users/anders/HTSeq/doc/count.html for details.
151 153
152 A feature is an interval (i.e., a range of positions) on a chromosome or a union of 154 A feature is an interval (i.e., a range of positions) on a chromosome or a union of
153 such intervals. In the case of RNA-Seq, the features are typically genes, where 155 such intervals. In the case of RNA-Seq, the features are typically genes, where
154 each gene is considered here as the union of all its exons. One may also consider 156 each gene is considered here as the union of all its exons. One may also consider
155 each exon as a feature, e.g., in order to check for alternative splicing. For 157 each exon as a feature, e.g., in order to check for alternative splicing. For
156 comparative ChIP-Seq, the features might be binding regions from a pre-determined 158 comparative ChIP-Seq, the features might be binding regions from a pre-determined
157 list. 159 list.
158 160
159 161
160 Overlap Modes 162 Overlap Modes
161 ------------- 163 -------------
162 164
163 Special care must be taken to decide how to deal with reads that overlap more than one feature. 165 Special care must be taken to decide how to deal with reads that overlap more than one feature.
164 166
165 The htseq-count script allows to choose between three modes: *union*, *intersection-strict*, and *intersection-nonempty*. 167 The htseq-count script allows to choose between three modes: *union*, *intersection-strict*, and *intersection-nonempty*.
166 168
167 The following figure illustrates the effect of these three modes: 169 The following figure illustrates the effect of these three modes:
168 170
229 231
230 Written by Simon Anders (sanders@fs.tum.de), European Molecular Biology 232 Written by Simon Anders (sanders@fs.tum.de), European Molecular Biology
231 Laboratory (EMBL). (c) 2010. Released under the terms of the GNU General 233 Laboratory (EMBL). (c) 2010. Released under the terms of the GNU General
232 Public License v3. Part of the 'HTSeq' framework. 234 Public License v3. Part of the 'HTSeq' framework.
233 </help> 235 </help>
236 <citations>
237 <citation type="bibtex">
238 @article{anders_htseqpython_2015,
239 title = {{HTSeq}—a {Python} framework to work with high-throughput sequencing data},
240 volume = {31},
241 issn = {1367-4803, 1460-2059},
242 url = {http://bioinformatics.oxfordjournals.org/content/31/2/166},
243 doi = {10.1093/bioinformatics/btu638},
244 abstract = {Motivation: A large choice of tools exists for many standard tasks in the analysis of high-throughput sequencing (HTS) data. However, once a project deviates from standard workflows, custom scripts are needed.
245 Results: We present HTSeq, a Python library to facilitate the rapid development of such scripts. HTSeq offers parsers for many common data formats in HTS projects, as well as classes to represent data, such as genomic coordinates, sequences, sequencing reads, alignments, gene model information and variant calls, and provides data structures that allow for querying via genomic coordinates. We also present htseq-count, a tool developed with HTSeq that preprocesses RNA-Seq data for differential expression analysis by counting the overlap of reads with genes.
246 Availability and implementation: HTSeq is released as an open-source software under the GNU General Public Licence and available from http://www-huber.embl.de/HTSeq or from the Python Package Index at https://pypi.python.org/pypi/HTSeq.
247 Contact: sanders\{at\}fs.tum.de},
248 language = {en},
249 number = {2},
250 urldate = {2015-04-21},
251 journal = {Bioinformatics},
252 author = {Anders, Simon and Pyl, Paul Theodor and Huber, Wolfgang},
253 month = jan,
254 year = {2015},
255 pmid = {25260700},
256 pages = {166--169},
257 file = {Full Text PDF:/Users/lparsons/Library/Application Support/Firefox/Profiles/thd2t4je.default/zotero/storage/84XQB8V6/Anders et al. - 2015 - HTSeq—a Python framework to work with high-through.pdf:application/pdf;Snapshot:/Users/lparsons/Library/Application Support/Firefox/Profiles/thd2t4je.default/zotero/storage/JKUAUCKB/166.html:text/html}
258 }
259 </citation>
260 </citations>
234 </tool> 261 </tool>