diff htseq-count.xml @ 22:55ed198f2c1c draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/htseq_count commit 03f64004f90ac0a7be67ecfc355a7b361f3c3314
author iuc
date Tue, 20 Sep 2016 17:51:06 -0400
parents a6dcb86af112
children 6e5c95760ab1
line wrap: on
line diff
--- a/htseq-count.xml	Tue Jul 28 13:29:18 2015 -0400
+++ b/htseq-count.xml	Tue Sep 20 17:51:06 2016 -0400
@@ -1,10 +1,8 @@
-<tool id="htseq_count" name="htseq-count" version="0.6.1galaxy1">
+<tool id="htseq_count" name="htseq-count" version="0.6.1galaxy2">
     <description> - Count aligned reads in a BAM file that overlap features in a GFF file</description>
     <requirements>
-        <requirement type="package" version="0.6.1">htseq</requirement>
-        <requirement type="package" version="1.7.1">numpy</requirement>
+        <requirement type="package" version="0.6.1.post1">htseq</requirement>
         <requirement type="package" version="0.1.19">samtools</requirement>
-        <requirement type="package" version="0.7.7">pysam</requirement>
     </requirements>
 
     <stdio>
@@ -22,7 +20,7 @@
     <command><![CDATA[
     ##set up input files
     #set $reference_fasta_filename = "localref.fa"
-    #if $samout_conditional.samout:
+    #if $samout_conditional.samout == "Yes":
         #if str( $samout_conditional.reference_source.reference_source_selector ) == "history":
             ln -s "${samout_conditional.reference_source.ref_file}" "${reference_fasta_filename}" &&
             samtools faidx "${reference_fasta_filename}" 2>&1 || echo "Error running samtools faidx for htseq-count" >&2 &&
@@ -30,11 +28,11 @@
             #set $reference_fasta_filename = str( $samout_conditional.reference_source.ref_file.fields.path )
         #end if
     #end if
-    #if $force_sort:
+    #if $force_sort == "True":
         #if $samfile.extension == 'bam':
             samtools sort -n "$samfile" "name_sorted_alignment" &&
         #else
-            samtools view -Su -t ${reference_fasta_filename}.fai "$samfile" | samtools sort -n - "name_sorted_alignment" &&
+            samtools view -Su -t "${reference_fasta_filename}.fai" "$samfile" | samtools sort -n - "name_sorted_alignment" &&
         #end if
     #end if
     htseq-count
@@ -43,10 +41,10 @@
     --minaqual=$minaqual
     --type="$featuretype"
     --idattr="$idattr"
-    #if $samout_conditional.samout:
+    #if $samout_conditional.samout == "Yes":
         --samout=$__new_file_path__/${samoutfile.id}_tmp
     #end if
-    #if $force_sort:
+    #if $force_sort == "True":
         --order=name
         --format=bam
         name_sorted_alignment.bam
@@ -57,8 +55,8 @@
     #end if
     "$gfffile"
     | awk '{if ($1 ~ "no_feature|ambiguous|too_low_aQual|not_aligned|alignment_not_unique") print $0 | "cat 1>&2"; else print $0}' > $counts 2>$othercounts
-    #if $samout_conditional.samout:
-        && samtools view -Su -t ${reference_fasta_filename}.fai $__new_file_path__/${samoutfile.id}_tmp | samtools sort -o - sorted > $samoutfile
+    #if $samout_conditional.samout == "Yes":
+        && samtools view -Su -t "${reference_fasta_filename}.fai" "$__new_file_path__/${samoutfile.id}_tmp" | samtools sort -o - sorted > "$samoutfile"
     #end if
     ]]>
     </command>
@@ -66,32 +64,34 @@
     <inputs>
         <param format="sam,bam" name="samfile" type="data" label="Aligned SAM/BAM File"/>
         <param format="gff" name="gfffile" type="data" label="GFF File"/>
-        <param name="mode" type="select" label="Mode" help="(--mode)">
+        <param name="mode" type="select" label="Mode" argument="(--mode)">
             <help>Mode to handle reads overlapping more than one feature.</help>
-            <option value="union" selected="true">Union</option>
+            <option value="union" selected="True">Union</option>
             <option value="intersection-strict">Intersection (strict)</option>
             <option value="intersection-nonempty">Intersection (nonempty)</option>
         </param>
-        <param name="stranded" type="select" label="Stranded" help="(--stranded)">
+        <param name="stranded" type="select" label="Stranded" argument="(--stranded)">
             <help>Specify whether the data is from a strand-specific assay. 'Reverse' means yes with reversed strand interpretation.</help>
-            <option value="yes" selected="true">Yes</option>
+            <option value="yes" selected="True">Yes</option>
             <option value="no">No</option>
             <option value="reverse">Reverse</option>
         </param>
-        <param name="minaqual" type="integer" value="10" label="Minimum alignment quality">
-            <help>Skip all reads with alignment quality lower than the given minimum value. (-minaqual)</help>
+        <param name="minaqual" type="integer" value="10" label="Minimum alignment quality" argument="--minaqual">
+            <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">
-            <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. (--type)</help>
+        <param name="featuretype" type="text" value="exon" label="Feature type" argument="--type">
+            <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>
         </param>
-        <param name="idattr" type="text" value="gene_id" label="ID Attribute">
+        <param name="idattr" type="text" value="gene_id" label="ID Attribute" argument="--idattr">
             <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>
         </param>
         <conditional name="samout_conditional">
-            <param name="samout" type="boolean" value="False" truevalue="True" falsevalue="False" label="Additional BAM Output">
+            <param name="samout" type="select" 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’).</help>
+                <option value="No" selected="True">Do not output additional BAM file</option>
+                <option value="Yes">Output additional BAM file</option>
             </param>
-            <when value="True">
+            <when value="Yes">
                 <conditional name="reference_source">
                     <param name="reference_source_selector" type="select" label="Choose the source for the reference list">
                         <option value="cached">Locally cached</option>
@@ -110,6 +110,9 @@
                     </when>
                 </conditional>
             </when>
+            <when value="No">
+                <!-- Do nothing -->
+            </when>
         </conditional>
         <param name="force_sort" type="boolean" value="False" truevalue="True" falsevalue="False" label="Force sorting of SAM/BAM file by NAME">
             <help>This option can be used for for paired-end data that has many unmapped mates. Use this if you get the warning about paired end data missing or not being properly sorted.</help>
@@ -120,7 +123,7 @@
         <data format="tabular" name="counts" metadata_source="samfile" label="${tool.name} on ${on_string}"/>
         <data format="tabular" name="othercounts" metadata_source="samfile" label="${tool.name} on ${on_string} (no feature)"/>
         <data format="bam" name="samoutfile" metadata_source="samfile" label="${tool.name} on ${on_string} (BAM)">
-            <filter>samout_conditional['samout']</filter>
+            <filter>samout_conditional['samout'] == "Yes"</filter>
         </data>
     </outputs>
 
@@ -128,14 +131,14 @@
         <test>
             <param name="samfile" value="htseq-test.sam" />
             <param name="gfffile" value="htseq-test.gff" />
-            <param name="samout" value="False" />
+            <param name="samout" value="No" />
             <output name="counts" file="htseq-test_counts.tsv" />
             <output name="othercounts" file="htseq-test_othercounts.tsv" />
         </test>
         <test>
             <param name="samfile" value="htseq-test.sam" />
             <param name="gfffile" value="htseq-test.gff" />
-            <param name="samout" value="False" />
+            <param name="samout" value="No" />
             <param name="force_sort" value="True" />
             <output name="counts" file="htseq-test_counts.tsv" />
             <output name="othercounts" file="htseq-test_othercounts.tsv" />
@@ -143,7 +146,7 @@
         <test>
             <param name="samfile" value="htseq-test.bam" />
             <param name="gfffile" value="htseq-test.gff" />
-            <param name="samout" value="False" />
+            <param name="samout" value="No" />
             <output name="counts" file="htseq-test_counts.tsv" />
             <output name="othercounts" file="htseq-test_othercounts.tsv" />
         </test>
@@ -151,7 +154,7 @@
             <param name="samfile" value="htseq-test-paired.bam" />
             <param name="singlepaired" value="paired" />
             <param name="gfffile" value="htseq-test.gff" />
-            <param name="samout" value="False" />
+            <param name="samout" value="No" />
             <output name="counts" file="htseq-test-paired_counts.tsv" />
             <output name="othercounts" file="htseq-test-paired_othercounts.tsv" />
         </test>
@@ -159,7 +162,7 @@
             <param name="samfile" value="htseq-test-paired.bam" />
             <param name="singlepaired" value="paired" />
             <param name="gfffile" value="htseq-test.gff" />
-            <param name="samout" value="False" />
+            <param name="samout" value="No" />
             <param name="force_sort" value="True" />
             <output name="counts" file="htseq-test-paired_counts.tsv" />
             <output name="othercounts" file="htseq-test-paired_othercounts.tsv" />
@@ -294,7 +297,7 @@
     year = {2015},
     pmid = {25260700},
     pages = {166--169},
-    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}
+    }
 }
         </citation>
     </citations>