changeset 12:c86659f03e98

Uploaded test version
author lparsons
date Fri, 11 Apr 2014 13:13:37 -0400
parents 1a69449ae025
children 256d3114ce31
files .hgignore .hgtags README.md fabfile.py htseq-count.xml tool_dependencies.xml
diffstat 6 files changed, 60 insertions(+), 68 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Tue Nov 05 11:07:33 2013 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-^package$
-syntax: glob
-*.pyc
--- a/.hgtags	Tue Nov 05 11:07:33 2013 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-142ec9462fa644cd29642ea0ad10e9889ce75619 0.3
-3e7b1e8a69f9d79b8de603f24e466deb7b192100 0.3.release2
-496a7dc0786f8367264520dfff6e8e8e744de3b2 0.3.1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README.md	Fri Apr 11 13:13:37 2014 -0400
@@ -0,0 +1,51 @@
+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.
--- a/fabfile.py	Tue Nov 05 11:07:33 2013 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-from fabric.api import local
-from fabric.operations import prompt
-import os
-
-
-def package():
-    '''
-    Pacakge for upload to toolshed
-      packaging 'test' version (default) uses local directory
-      otherwise, specify a mercurial tag to package
-    '''
-    package_dir = 'package'
-    base_filename = os.path.join(package_dir, 'htseq-count')
-    version = prompt("Enter version number for package [test]:")
-    revision_option = ''
-    if version != '':
-        revision_option = '-r "%s"' % version
-    else:
-        version = 'test'
-    version_filename = '%s_%s.tar.gz' % (base_filename, version)
-    local('mkdir -p %s' % package_dir)
-    local('rm -f %s' % version_filename)
-    if version == 'test':
-        local('tar czvf %s --exclude "fabfile.*" --exclude "%s" --exclude ".hg*" *' % (version_filename, package_dir))
-    else:
-        local('hg archive -t tgz %s -X "fabfile.*" -X "package" -X ".hg*" -p . "%s"' % (revision_option, version_filename))
--- a/htseq-count.xml	Tue Nov 05 11:07:33 2013 -0500
+++ b/htseq-count.xml	Fri Apr 11 13:13:37 2014 -0400
@@ -1,11 +1,10 @@
-<tool id="htseq_count" name="htseq-count" version="0.3.2">
+<tool id="htseq_count" name="htseq-count" version="0.4">
     <description> - Count aligned reads in a BAM file that overlap features in a GFF file</description>
     <version_command>htseq-count -h | grep version | sed 's/^\(.*\)*\(version .*\)\./\2/'</version_command>
     <requirements>
         <requirement type="package" version="1.7.1">numpy</requirement>
-        <requirement type="package" version="0.5.4p5">htseq</requirement>
+        <requirement type="package" version="0.6.1">htseq</requirement>
         <requirement type="package" version="0.1.19">samtools</requirement>
-        <requirement type="package" version="1.56.0">picard</requirement> 
     </requirements>
     <command>
     ##set up input files
@@ -18,18 +17,9 @@
             #set $reference_fasta_filename = str( $samout_conditional.reference_source.ref_file.fields.path )
         #end if
     #end if
-    #if str($singlepaired) == "paired":
-        ln -s $samfile local_input.sam &amp;&amp;
-        java -Xmx2G -jar "\$JAVA_JAR_PATH/SortSam.jar" VALIDATION_STRINGENCY=LENIENT SORT_ORDER=queryname O=prepared_input.sam I=local_input.sam TMP_DIR="${__new_file_path__}" 
-        || echo "Error running Picard MergeSamFiles" &gt;&amp;2 &amp;&amp;
-    #else:
-        #if $samfile.extension == "bam":
-            samtools view $samfile | 
-        #else
-            ln -s $samfile prepared_input.sam &amp;&amp;
-        #end if
-    #end if
     htseq-count 
+    --format=$samfile.extension
+    --order=pos
     --mode=$mode 
     --stranded=$stranded 
     --minaqual=$minaqual 
@@ -38,15 +28,7 @@
     #if $samout_conditional.samout:
         --samout=$__new_file_path__/${samoutfile.id}_tmp
     #end if
-    #if str($singlepaired) == "paired":
-        prepared_input.sam
-    #else:
-        #if $samfile.extension == "bam":
-            - 
-        #else:
-            prepared_input.sam
-        #end if
-    #end if    
+    $samfile
     $gfffile 
     | 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
     #if $samout_conditional.samout:
@@ -54,11 +36,6 @@
     #end if</command>
     <inputs>
         <param format="sam, bam" name="samfile" type="data" label="Aligned SAM/BAM File"/>
-        <param name="singlepaired" type="select" label="Is this library mate-paired?">
-            <help>Paired libraries will be sorted by read name prior to counting.</help>
-            <option value="single" selected="true">single-end</option>
-            <option value="paired">paired-end</option>
-        </param>
         <param format="gff" name="gfffile" type="data" label="GFF File"/>
         <param name="mode" type="select" label="Mode">
             <help>Mode to handle reads overlapping more than one feature.</help>
@@ -72,7 +49,7 @@
             <option value="no">No</option>
             <option value="reverse">Reverse</option>
         </param>
-        <param name="minaqual" type="integer" value="0" label="Minimum alignment quality">
+        <param name="minaqual" type="integer" value="10" label="Minimum alignment quality">
             <help>Skip all reads with alignment quality lower than the given minimum value</help>
         </param>
         <param name="featuretype" type="text" value="exon" label="Feature type">
--- a/tool_dependencies.xml	Tue Nov 05 11:07:33 2013 -0500
+++ b/tool_dependencies.xml	Fri Apr 11 13:13:37 2014 -0400
@@ -6,17 +6,13 @@
     </package>
 
     <package name="samtools" version="0.1.19">
-        <repository changeset_revision="54195f1d4b0f" name="package_samtools_0_1_19" owner="iuc" toolshed="http://testtoolshed.g2.bx.psu.edu" />
+        <repository changeset_revision="36aa94676939" name="package_samtools_0_1_19" owner="iuc" toolshed="http://testtoolshed.g2.bx.psu.edu" />
     </package>
 
-    <package name="picard" version="1.56.0">
-        <repository changeset_revision="7206dbf34dcd" name="package_picard_1_56_0" owner="devteam" toolshed="http://testtoolshed.g2.bx.psu.edu" />
-    </package>
-
-    <package name="htseq" version="0.5.4p5">
+    <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.5.4p5.tar.gz</action>
+                <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="84125ffacb90" name="package_numpy_1_7" owner="iuc" toolshed="http://testtoolshed.g2.bx.psu.edu">