diff featurecounts.xml @ 13:386220cf6877 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/featurecounts commit 2bd06c2b43c295fb4cf172c4f156fed5475855a4
author iuc
date Sat, 19 May 2018 03:53:55 -0400
parents b714f4620411
children 85aaf50ad9dc
line wrap: on
line diff
--- a/featurecounts.xml	Mon May 07 06:21:58 2018 -0400
+++ b/featurecounts.xml	Sat May 19 03:53:55 2018 -0400
@@ -1,4 +1,4 @@
-<tool id="featurecounts" name="featureCounts" version="1.6.0.4" profile="16.04">
+<tool id="featurecounts" name="featureCounts" version="1.6.0.5" profile="16.04">
     <description>Measure gene expression in RNA-Seq experiments from SAM or BAM files.</description>
     <requirements>
         <requirement type="package" version="1.6.0">subread</requirement>
@@ -81,16 +81,9 @@
 
         '${alignment}'
 
-        ## Removal of comment
-        && grep -v "^#" "output"
-
-        #if $format.value != "tabdel_short":
-            ## and remove column-header line
-            | tail -n+2
-        #else
-            ## update header
-            | sed --expression='s|${alignment}|${alignment.element_identifier}|g'
-        #end if
+        ## Remove comment and add sample name to header
+        && grep -v "^#" "output" 
+        | sed -e 's|${alignment}|${alignment.element_identifier}|g'
         > body.txt
         ## Set the right columns for the tabular formats
         #if $format.value == "tabdel_medium":
@@ -101,7 +94,7 @@
             && cut -f 6 body.txt > gene_lengths.txt
             && paste expression_matrix.txt gene_lengths.txt > expression_matrix.txt.bak
             && mv -f expression_matrix.txt.bak '${output_medium}'
-        #elif $format.value == "tabdel_short" or $format.value == "tabdel_short_noheader":
+        #elif $format.value == "tabdel_short":
             && cut -f 1,7 body.txt > '${output_short}'
         #else:
             && cp body.txt '${output_full}'
@@ -112,19 +105,10 @@
         #end if
 
         #if str($extended_parameters.exon_exon_junction_read_counting_enabled.count_exon_exon_junction_reads) == "-J":
-            #if $format.value != "tabdel_short":
-              && tail -n+2 'output.jcounts' > '${output_jcounts}'
-            #else:
-
-              && sed --expression='s|${alignment}|${alignment.element_identifier}|g' 'output.jcounts' > '${output_jcounts}'
-            #end if
+            && sed -e 's|${alignment}|${alignment.element_identifier}|g' 'output.jcounts' > '${output_jcounts}'
         #end if
 
-        #if $format.value != "tabdel_short":
-            && tail -n+2 'output.summary' > '${output_summary}'
-        #else:
-            && sed --expression='s|${alignment}|${alignment.element_identifier}|g' 'output.summary' > '${output_summary}'
-        #end if
+        && sed -e 's|${alignment}|${alignment.element_identifier}|g' 'output.summary' > '${output_summary}'
     ]]></command>
     <inputs>
         <param name="alignment"
@@ -170,8 +154,7 @@
                type="select"
                label="Output format"
                help="The output format will be tabular, select the preferred columns here">
-            <option value="tabdel_short_noheader" selected="true">Gene-ID "\t" read-count (DESeq2 IUC wrapper compatible)</option>
-            <option value="tabdel_short">Gene-ID "\t" read-count (MultiQC/edgeR/limma-voom compatible, includes header in output)</option>
+            <option value="tabdel_short">Gene-ID "\t" read-count (MultiQC/DESeq2/edgeR/limma-voom compatible)</option>
             <option value="tabdel_medium">Gene-ID "\t" read-count "\t" gene-length</option>
             <option value="tabdel_full">featureCounts 1.4.0+ default (includes regions provided by the GTF file)</option>
         </param>
@@ -428,7 +411,7 @@
         <data format="tabular"
               name="output_short"
               label="${tool.name} on ${on_string}">
-            <filter>format == "tabdel_short_noheader" or format == "tabdel_short"</filter>
+            <filter>format == "tabdel_short"</filter>
             <actions>
                 <action name="column_names" type="metadata" default="Geneid,${alignment.element_identifier}" />
             </actions>
@@ -470,23 +453,6 @@
         </data>
     </outputs>
     <tests>
-        <test expect_num_outputs="4">
-            <param name="alignment" value="featureCounts_input1.bam" ftype="bam" dbkey="hg38" />
-            <param name="anno_select" value="history"/>
-            <param name="reference_gene_sets" value="featureCounts_guide.gff" ftype="gff" dbkey="hg38" />
-            <param name="format" value="tabdel_short_noheader" />
-            <param name="include_feature_length_file" value="true"/>
-            <param name="count_exon_exon_junction_reads" value="-J"/>
-            <output name="output_short" file="output_1_short.tab">
-                <metadata name="column_names" value="Geneid,featureCounts_input1.bam"/>
-            </output>
-            <output name="output_summary" file="output_1_summary.tab">
-                <metadata name="column_names" value="Status,featureCounts_input1.bam"/>
-            </output>
-            <output name="output_jcounts" file="output_1_jcounts.tab">
-                <metadata name="column_names" value="PrimaryGene,SecondaryGene,Site1_chr,Site1_location,Site1_strand,Site2_chr,Site2_location,Site2_strand,featureCounts_input1.bam"/>
-            </output>
-        </test>
         <test expect_num_outputs="3">
             <param name="alignment" value="featureCounts_input1.bam" ftype="bam" dbkey="hg38" />
             <param name="anno_select" value="history"/>
@@ -523,13 +489,13 @@
             <param name="format" value="tabdel_short" />
             <param name="include_feature_length_file" value="true"/>
             <param name="count_exon_exon_junction_reads" value="-J"/>
-            <output name="output_short" file="output_1_short_with_header.tab">
+            <output name="output_short" file="output_1_short.tab">
                 <metadata name="column_names" value="Geneid,featureCounts_input1.bam"/>
             </output>
-            <output name="output_summary" file="output_1_summary_with_header.tab">
+            <output name="output_summary" file="output_1_summary.tab">
                 <metadata name="column_names" value="Status,featureCounts_input1.bam"/>
             </output>
-            <output name="output_jcounts" file="output_1_jcounts_with_header.tab">
+            <output name="output_jcounts" file="output_1_jcounts.tab">
                 <metadata name="column_names" value="PrimaryGene,SecondaryGene,Site1_chr,Site1_location,Site1_strand,Site2_chr,Site2_location,Site2_strand,featureCounts_input1.bam"/>
             </output>
         </test>
@@ -582,7 +548,7 @@
 
 Output format
 -------------
-FeatureCounts produces a table containing counted reads, per gene, per row. Optionally the last column can be set to be the effective gene-length. These tables are compatible with the DESeq2 Galaxy wrapper by IUC. Column names are added as metadata object.
+FeatureCounts produces a table containing counted reads, per gene, per row. Optionally the last column can be set to be the effective gene-length. These tables are compatible with the DESeq2, edgeR and limma-voom Galaxy wrappers by IUC.
 
 .. _Subread: http://bioinf.wehi.edu.au/subread-package/SubreadUsersGuide.pdf
     ]]></help>