Repository 'htseq_count'
hg clone https://toolshed.g2.bx.psu.edu/repos/lparsons/htseq_count

Changeset 20:3b3601a2a7c7 (2015-06-22)
Previous changeset 19:6f920f33c5eb (2014-10-13) Next changeset 21:a6dcb86af112 (2015-07-28)
Commit message:
planemo upload for repository https://github.com/lparsons/galaxy_tools/tree/master/tools/htseq_count commit 8a40cf16ce0b48cdfda88a505869e77e8826cb23
modified:
htseq-count.xml
test-data/htseq-test-paired_counts.tsv
test-data/htseq-test-paired_othercounts.tsv
tool_dependencies.xml
added:
README.rst
removed:
README.md
b
diff -r 6f920f33c5eb -r 3b3601a2a7c7 README.md
--- a/README.md Mon Oct 13 14:07:30 2014 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,51 +0,0 @@
-htseq-count wrapper for Galaxy
-==============================
-
-Galaxy wrapper for
-[htseq-count](http://www-huber.embl.de/users/anders/HTSeq/doc/count.html)
-script from python
-[HTSeq](http://www-huber.embl.de/users/anders/HTSeq/doc/index.html) package.
-
-Installation
-------------
-
-Installation directly from the [Galaxy
-Toolshed](http://toolshed.g2.bx.psu.edu/view/lparsons/htseq_count) is
-recommended.
-
-Development
------------
-
-Repository-Maintainer: Lance Parsons <lparsons@princeton.edu>
-
-Repository-Development: <https://bitbucket.org/lance_parsons/htseq_count_galaxy_wrapper>
-
-
-License
--------
-
-Copyright (c) 2012-2014, Lance R. Parsons <lparsons@princeton.edu>  
-All rights reserved.
-
-Licensed under the BSD 2-Clause License: <http://opensource.org/licenses/BSD-2-Clause>
-    
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions are met:
-    
-        * Redistributions of source code must retain the above copyright notice,
-          this list of conditions and the following disclaimer.
-    
-        * Redistributions in binary form must reproduce the above copyright notice,
-          this list of conditions and the following disclaimer in the documentation
-          and/or other materials provided with the distribution.
-    
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
b
diff -r 6f920f33c5eb -r 3b3601a2a7c7 README.rst
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/README.rst Mon Jun 22 17:01:05 2015 -0400
b
@@ -0,0 +1,49 @@
+htseq-count wrapper for Galaxy
+==============================
+
+Galaxy wrapper for
+`htseq-count <http://www-huber.embl.de/users/anders/HTSeq/doc/count.html>`_
+script from python
+`HTSeq <http://www-huber.embl.de/users/anders/HTSeq/doc/index.html>`_ package.
+
+Installation
+------------
+
+Installation directly from the `Galaxy Toolshed                                                                                                                                                                 <http://toolshed.g2.bx.psu.edu/view/lparsons/htseq_count>`_ is
+recommended.
+
+Development
+-----------
+
+Repository-Maintainer: Lance Parsons <lparsons@princeton.edu>
+
+Repository-Development: `https://bitbucket.org/lance_parsons/htseq_count_galaxy_wrapper <https://bitbucket.org/lance_parsons/htseq_count_galaxy_wrapper>`_
+
+License
+-------
+
+Copyright (c) 2012-2014, Lance R. Parsons <lparsons@princeton.edu>
+All rights reserved.
+
+Licensed under the BSD 2-Clause License: <http://opensource.org/licenses/BSD-2-Clause>
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+
+        * Redistributions of source code must retain the above copyright notice,
+          this list of conditions and the following disclaimer.
+
+        * Redistributions in binary form must reproduce the above copyright notice,
+          this list of conditions and the following disclaimer in the documentation
+          and/or other materials provided with the distribution.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
b
diff -r 6f920f33c5eb -r 3b3601a2a7c7 htseq-count.xml
--- a/htseq-count.xml Mon Oct 13 14:07:30 2014 -0400
+++ b/htseq-count.xml Mon Jun 22 17:01:05 2015 -0400
[
b'@@ -1,69 +1,96 @@\n-<tool id="htseq_count" name="htseq-count" version="0.4.1">\n+<tool id="htseq_count" name="htseq-count" version="0.6.1galaxy1">\n     <description> - Count aligned reads in a BAM file that overlap features in a GFF file</description>\n-    <version_command>htseq-count -h | grep version | sed \'s/^\\(.*\\)*\\(version .*\\)\\./\\2/\'</version_command>\n     <requirements>\n-        <requirement type="package" version="1.7.1">numpy</requirement>\n         <requirement type="package" version="0.6.1">htseq</requirement>\n         <requirement type="package" version="0.1.19">samtools</requirement>\n         <requirement type="package" version="0.7.7">pysam</requirement>\n     </requirements>\n-    <command>\n+\n+    <stdio>\n+        <exit_code range="1:" level="fatal" description="Unknown error occurred" />\n+        <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" />\n+        <regex match="samtools: (command ){0,1}not found" source="stderr" level="fatal" description="The samtools package is not properly installed, contact Galaxy administrators" />\n+        <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\'" />\n+        <regex match="Error occured in line (\\d+) of file" source="stderr" level="fatal" description="Unknown error parsing the GFF file" />\n+        <regex match="Error" source="stderr" level="fatal" description="Unknown error occured" />\n+        <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 option to \'Force sorting of SAM/BAM file by NAME\'. See stderr output of this dataset for more information." />\n+    </stdio>\n+\n+    <version_command>htseq-count -h | grep version | sed \'s/^\\(.*\\)*\\(version .*\\)\\./\\2/\'</version_command>\n+\n+    <command><![CDATA[\n     ##set up input files\n     #set $reference_fasta_filename = "localref.fa"\n     #if $samout_conditional.samout:\n         #if str( $samout_conditional.reference_source.reference_source_selector ) == "history":\n-            ln -s "${samout_conditional.reference_source.ref_file}" "${reference_fasta_filename}" &amp;&amp;\n-            samtools faidx "${reference_fasta_filename}" 2&gt;&amp;1 || echo "Error running samtools faidx for htseq-count" &gt;&amp;2 &amp;&amp;\n+            ln -s "${samout_conditional.reference_source.ref_file}" "${reference_fasta_filename}" &&\n+            samtools faidx "${reference_fasta_filename}" 2>&1 || echo "Error running samtools faidx for htseq-count" >&2 &&\n         #else:\n             #set $reference_fasta_filename = str( $samout_conditional.reference_source.ref_file.fields.path )\n         #end if\n     #end if\n-    htseq-count \n-    --format=$samfile.extension\n-    --order=pos\n-    --mode=$mode \n-    --stranded=$stranded \n-    --minaqual=$minaqual \n-    --type=$featuretype \n-    --idattr=$idattr \n+    #if $force_sort:\n+        #if $samfile.extension == \'bam\':\n+            samtools sort -n "$samfile" "name_sorted_alignment" &&\n+        #else\n+            samtools view -Su -t ${reference_fasta_filename}.fai "$samfile" | samtools sort -n - "name_sorted_alignment" &&\n+        #end if\n+    #end if\n+    htseq-count\n+    --mode=$mode\n+    --stranded=$stranded\n+    --minaqual=$minaqual\n+    --type="$featuretype"\n+    --idattr="$idattr"\n     #if $samout_conditional.samout:\n         --samout=$__new_file_path__/${samoutfile.id}_tmp\n     #end if\n-    $samfile\n-    $gfffile \n-    | 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\n+   '..b'riable during test\n         <test>\n             <param name="samfile" value="htseq-test.sam" />\n@@ -141,26 +179,27 @@\n     </tests>\n \n     <help>\n+<![CDATA[\n Overview\n --------\n \n This tool takes an alignment file in SAM or BAM format and feature file in GFF format\n-and calculates the number of reads mapping to each feature. It uses the *htseq-count* \n+and calculates the number of reads mapping to each feature. It uses the *htseq-count*\n script that is part of the HTSeq python module. See\n http://www-huber.embl.de/users/anders/HTSeq/doc/count.html for details.\n \n A feature is an interval (i.e., a range of positions) on a chromosome or a union of\n-such intervals.  In the case of RNA-Seq, the features are typically genes, where \n-each gene is considered here as the union of all its exons. One may also consider \n-each exon as a feature, e.g., in order to check for alternative splicing. For \n-comparative ChIP-Seq, the features might be binding regions from a pre-determined \n+such intervals.  In the case of RNA-Seq, the features are typically genes, where\n+each gene is considered here as the union of all its exons. One may also consider\n+each exon as a feature, e.g., in order to check for alternative splicing. For\n+comparative ChIP-Seq, the features might be binding regions from a pre-determined\n list.\n \n \n Overlap Modes\n -------------\n \n-Special care must be taken to decide how to deal with reads that overlap more than one feature. \n+Special care must be taken to decide how to deal with reads that overlap more than one feature.\n \n The htseq-count script allows to choose between three modes: *union*, *intersection-strict*, and *intersection-nonempty*.\n \n@@ -230,5 +269,32 @@\n Written by Simon Anders (sanders@fs.tum.de), European Molecular Biology\n Laboratory (EMBL). (c) 2010. Released under the terms of the GNU General\n Public License v3. Part of the \'HTSeq\' framework.\n+]]>\n     </help>\n+\n+    <citations>\n+        <citation type="bibtex">\n+@article{anders_htseqpython_2015,\n+    title = {{HTSeq}\xe2\x80\x94a {Python} framework to work with high-throughput sequencing data},\n+    volume = {31},\n+    issn = {1367-4803, 1460-2059},\n+    url = {http://bioinformatics.oxfordjournals.org/content/31/2/166},\n+    doi = {10.1093/bioinformatics/btu638},\n+    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.\n+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.\n+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.\n+Contact: sanders\\{at\\}fs.tum.de},\n+    language = {en},\n+    number = {2},\n+    urldate = {2015-04-21},\n+    journal = {Bioinformatics},\n+    author = {Anders, Simon and Pyl, Paul Theodor and Huber, Wolfgang},\n+    month = jan,\n+    year = {2015},\n+    pmid = {25260700},\n+    pages = {166--169},\n+    file = {Full Text PDF:/Users/lparsons/Library/Application Support/Firefox/Profiles/thd2t4je.default/zotero/storage/84XQB8V6/Anders et al. - 2015 - HTSeq\xe2\x80\x94a 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}\n+}\n+        </citation>\n+    </citations>\n </tool>\n'
b
diff -r 6f920f33c5eb -r 3b3601a2a7c7 test-data/htseq-test-paired_counts.tsv
--- a/test-data/htseq-test-paired_counts.tsv Mon Oct 13 14:07:30 2014 -0400
+++ b/test-data/htseq-test-paired_counts.tsv Mon Jun 22 17:01:05 2015 -0400
b
@@ -2,8 +2,8 @@
 YAL001C 12
 YAL002W 6
 YAL003W 5
-YAL004W 3
-YAL005C 5
+YAL004W 2
+YAL005C 2
 YAL007C 1
 YAL008W 0
 YAL009W 2
@@ -76,11 +76,11 @@
 YAL064C-A 0
 YAL064W 0
 YAL064W-B 0
-YAL065C 2
+YAL065C 1
 YAL066W 0
 YAL067C 8
 YAL067W-A 1
-YAL068C 1
+YAL068C 0
 YAL068W-A 0
 YAL069W 0
 YAR002C-A 0
@@ -88,7 +88,7 @@
 YAR003W 4
 YAR007C 7
 YAR008W 0
-YAR009C 1
+YAR009C 0
 YAR010C 0
 YAR014C 4
 YAR015W 4
@@ -101,7 +101,7 @@
 YAR028W 3
 YAR029W 0
 YAR030C 2
-YAR031W 4
+YAR031W 3
 YAR033W 0
 YAR035C-A 0
 YAR035W 3
@@ -109,15 +109,15 @@
 YAR047C 0
 YAR050W 4
 YAR053W 0
-YAR060C 2
+YAR060C 0
 YAR061W 0
-YAR062W 2
+YAR062W 1
 YAR064W 1
 YAR066W 2
-YAR068W 2
-YAR069C 1
+YAR068W 1
+YAR069C 0
 YAR070C 0
-YAR071W 4
+YAR071W 2
 YAR073W 1
 YAR075W 0
 snR18 0
b
diff -r 6f920f33c5eb -r 3b3601a2a7c7 test-data/htseq-test-paired_othercounts.tsv
--- a/test-data/htseq-test-paired_othercounts.tsv Mon Oct 13 14:07:30 2014 -0400
+++ b/test-data/htseq-test-paired_othercounts.tsv Mon Jun 22 17:01:05 2015 -0400
b
@@ -1,5 +1,5 @@
-_feature 755
-__ambiguous 0
-__too_low_aQual 96
+__no_feature 480
+__ambiguous 1
+__too_low_aQual 68
 __not_aligned 0
 __alignment_not_unique 0
b
diff -r 6f920f33c5eb -r 3b3601a2a7c7 tool_dependencies.xml
--- a/tool_dependencies.xml Mon Oct 13 14:07:30 2014 -0400
+++ b/tool_dependencies.xml Mon Jun 22 17:01:05 2015 -0400
b
@@ -1,40 +1,16 @@
 <?xml version="1.0"?>
 <tool_dependency>
 
-    <package name="numpy" version="1.7.1">
-        <repository changeset_revision="0c288abd2a1e" name="package_numpy_1_7" owner="devteam" toolshed="http://toolshed.g2.bx.psu.edu" />
-    </package>
-
     <package name="samtools" version="0.1.19">
-        <repository changeset_revision="1ef76f8d8e52" name="package_samtools_0_1_19" owner="devteam" toolshed="http://toolshed.g2.bx.psu.edu" />
+        <repository changeset_revision="95d2c4aefb5f" name="package_samtools_0_1_19" owner="devteam" toolshed="https://toolshed.g2.bx.psu.edu" />
     </package>
 
     <package name="pysam" version="0.7.7">
-        <repository changeset_revision="b62538c8c664" name="package_pysam_0_7_7" owner="iuc" toolshed="http://toolshed.g2.bx.psu.edu" />
+        <repository changeset_revision="b62538c8c664" name="package_pysam_0_7_7" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" />
     </package>
 
     <package name="htseq" version="0.6.1">
-        <install version="1.0">
-            <actions>
-                <action type="download_by_url">https://pypi.python.org/packages/source/H/HTSeq/HTSeq-0.6.1.tar.gz</action>
-                <!-- populate the environment variables from the dependend repos -->
-                <action type="set_environment_for_install">
-                    <repository changeset_revision="0c288abd2a1e" name="package_numpy_1_7" owner="devteam" toolshed="http://toolshed.g2.bx.psu.edu">
-                        <package name="numpy" version="1.7.1" />
-                   </repository>
-                </action>
-                <action type="make_directory">$INSTALL_DIR/lib/python</action> <!-- Not sure why these must be made apriori, but install fails otherwise -->
-                <action type="make_directory">$INSTALL_DIR/lib64/python</action> <!-- Not sure why these must be made apriori, but install fails otherwise -->
-                <action type="shell_command">export PYTHONPATH=$PYTHONPATH:$INSTALL_DIR/lib/python:$INSTALL_DIR/lib64/python &amp;&amp; python setup.py install --home $INSTALL_DIR --install-scripts $INSTALL_DIR/bin</action>
-                <action type="set_environment">
-                    <environment_variable action="append_to" name="PYTHONPATH">$INSTALL_DIR/lib/python:$INSTALL_DIR/lib64/python</environment_variable>
-                    <environment_variable action="prepend_to" name="PATH">$INSTALL_DIR/bin</environment_variable>
-                </action>
-            </actions>
-        </install>
-        <readme>
-            Installation of HTSeq requires Python 2.5+ (does not yet work with Python 3), and the Nympy Python package.
-        </readme>
+        <repository changeset_revision="5b3da3e3543d" name="package_htseq_0_6" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" />
     </package>
 
 </tool_dependency>