changeset 60:1421603cc95b draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/rseqc commit 1dfe55ca83685cadb0ce8f6ebbd8c13232376d1d
author iuc
date Sat, 26 Nov 2022 15:19:14 +0000
parents dbedfc5f5a3c
children 5968573462fa
files FPKM_count.xml RNA_fragment_size.xml RPKM_saturation.xml bam2wig.xml bam_stat.xml clipping_profile.xml deletion_profile.xml geneBody_coverage.xml geneBody_coverage2.xml infer_experiment.xml inner_distance.xml insertion_profile.xml junction_annotation.xml junction_saturation.xml mismatch_profile.xml read_GC.xml read_NVC.xml read_distribution.xml read_duplication.xml read_hexamer.xml read_quality.xml rseqc_macros.xml test-data/output.FPKM.xls test-data/output.GC.xls test-data/output.GC_plot.pdf test-data/output.GC_plot_r test-data/output.NVC.xls test-data/output.NVC_plot.pdf test-data/output.geneBodyCoverage2.curves.pdf test-data/output.geneBodyCoverage2.txt test-data/output.geneBodyCoverage2_r test-data/output.inner_distance_plot.pdf test-data/output.inner_distance_plot_r test-data/output.junction.xls test-data/output.junction_plot_r test-data/output.splice_events.pdf test-data/output.splice_junction.pdf test-data/output.tin.xls test-data/summary.tin.txt test-data/testwig.Forward.wig test-data/testwig.Reverse.wig test-data/testwig.wig test-data/testwig_wigsum100.wig tin.xml
diffstat 44 files changed, 371 insertions(+), 350 deletions(-) [+]
line wrap: on
line diff
--- a/FPKM_count.xml	Sat Dec 18 19:41:19 2021 +0000
+++ b/FPKM_count.xml	Sat Nov 26 15:19:14 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="rseqc_FPKM_count" name="FPKM Count" version="@TOOL_VERSION@.1">
+<tool id="rseqc_FPKM_count" name="FPKM Count" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@GALAXY_VERSION@">
     <description>calculates raw read count, FPM, and FPKM for each gene</description>
     <expand macro="bio_tools"/>
     <macros>
@@ -12,9 +12,8 @@
     <version_command><![CDATA[FPKM_count.py --version]]></version_command>
 
     <command><![CDATA[
-        ln -sf '${input}' 'local_input.bam' &&
-        ln -sf '${input.metadata.bam_index}' 'local_input.bam.bai' &&
-        FPKM_count.py -i 'local_input.bam' -o output -r '${refgene}'
+        @BAM_SAM_INPUTS@
+        FPKM_count.py -i 'input.${extension}' -o output -r '${refgene}'
 
         #if str($strand_type.strand_specific) == "pair"
             -d
--- a/RNA_fragment_size.xml	Sat Dec 18 19:41:19 2021 +0000
+++ b/RNA_fragment_size.xml	Sat Nov 26 15:19:14 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="rseqc_RNA_fragment_size" name="RNA fragment size" version="@TOOL_VERSION@.1">
+<tool id="rseqc_RNA_fragment_size" name="RNA fragment size" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@GALAXY_VERSION@">
     <description>
      calculates the fragment size for each gene/transcript
     </description>
@@ -14,9 +14,8 @@
     <version_command><![CDATA[RNA_fragment_size.py --version]]></version_command>
 
     <command><![CDATA[
-        ln -sf '${input}' 'input.bam' &&
-        ln -sf '$input.metadata.bam_index' 'input.bam.bai' &&
-        RNA_fragment_size.py -i 'input.bam' --refgene='${refgene}' --mapq=${mapq} --frag-num=${fragnum} > '${output}'
+        @BAM_SAM_INPUTS@
+        RNA_fragment_size.py -i 'input.${extension}' --refgene='${refgene}' --mapq=${mapq} --frag-num=${fragnum} > '${output}'
         ]]>
     </command>
 
--- a/RPKM_saturation.xml	Sat Dec 18 19:41:19 2021 +0000
+++ b/RPKM_saturation.xml	Sat Nov 26 15:19:14 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="rseqc_RPKM_saturation" name="RPKM Saturation" version="@TOOL_VERSION@.2">
+<tool id="rseqc_RPKM_saturation" name="RPKM Saturation" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@GALAXY_VERSION@">
     <description>calculates raw count and RPKM values for transcript at exon, intron, and mRNA level</description>
     <expand macro="bio_tools"/>
     <macros>
@@ -12,7 +12,8 @@
     <version_command><![CDATA[RPKM_saturation.py --version]]></version_command>
 
     <command><![CDATA[
-        RPKM_saturation.py -i '${input}' -o output -r '${refgene}'
+        @BAM_SAM_INPUTS@
+        RPKM_saturation.py -i 'input.${extension}' -o output -r '${refgene}'
 
         #if str($strand_type.strand_specific) == "pair"
             -d
@@ -37,7 +38,7 @@
     ]]></command>
 
     <inputs>
-        <expand macro="bam_param" />
+        <expand macro="bam_sam_param" />
         <expand macro="refgene_param" />
         <expand macro="strand_type_param" />
         <param name="percentileFloor" type="integer" value="5" label="Begin sampling from this percentile (default=5)" help="(--percentile-floor)"/>
--- a/bam2wig.xml	Sat Dec 18 19:41:19 2021 +0000
+++ b/bam2wig.xml	Sat Nov 26 15:19:14 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="rseqc_bam2wig" name="BAM to Wiggle" version="@TOOL_VERSION@">
+<tool id="rseqc_bam2wig" name="BAM to Wiggle" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@GALAXY_VERSION@">
     <description>
         converts all types of RNA-seq data from .bam to .wig
     </description>
@@ -14,9 +14,8 @@
     <version_command><![CDATA[bam2wig.py --version]]></version_command>
 
     <command><![CDATA[
-        ln -sf '${input}' 'input.bam' &&
-        ln -sf '${input.metadata.bam_index}' 'input.bam.bai' &&
-        bam2wig.py -i 'input.bam' -s '${chromsize}' -o outfile
+        @BAM_SAM_INPUTS@
+        bam2wig.py -i 'input.${extension}' -s '${chromsize}' -o outfile
 
         #if str($strand_type.strand_specific) == "pair"
             -d
--- a/bam_stat.xml	Sat Dec 18 19:41:19 2021 +0000
+++ b/bam_stat.xml	Sat Nov 26 15:19:14 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="rseqc_bam_stat" name="BAM/SAM Mapping Stats" version="@TOOL_VERSION@">
+<tool id="rseqc_bam_stat" name="BAM/SAM Mapping Stats" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@GALAXY_VERSION@">
     <description>
         reads mapping statistics for a provided BAM or SAM file.
     </description>
@@ -14,12 +14,13 @@
     <version_command><![CDATA[bam_stat.py --version]]></version_command>
 
     <command><![CDATA[
-        bam_stat.py -i '${input}' -q ${mapq} > '${output}'
+        @BAM_SAM_INPUTS@
+        bam_stat.py -i 'input.${extension}' -q ${mapq} > '${output}'
         ]]>
     </command>
 
     <inputs>
-        <expand macro="bam_param" />
+        <expand macro="bam_sam_param" />
         <expand macro="mapq_param" />
     </inputs>
 
--- a/clipping_profile.xml	Sat Dec 18 19:41:19 2021 +0000
+++ b/clipping_profile.xml	Sat Nov 26 15:19:14 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="rseqc_clipping_profile" name="Clipping Profile" version="@TOOL_VERSION@">
+<tool id="rseqc_clipping_profile" name="Clipping Profile" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@GALAXY_VERSION@">
     <description>
      estimates clipping profile of RNA-seq reads from BAM or SAM file
     </description>
@@ -14,7 +14,8 @@
     <version_command><![CDATA[clipping_profile.py --version]]></version_command>
 
     <command><![CDATA[
-        clipping_profile.py -i '${input}' -o output -q ${mapq} -s "${layout}"
+        @BAM_SAM_INPUTS@
+        clipping_profile.py -i 'input.${extension}' -o output -q ${mapq} -s "${layout}"
         ]]>
     </command>
 
--- a/deletion_profile.xml	Sat Dec 18 19:41:19 2021 +0000
+++ b/deletion_profile.xml	Sat Nov 26 15:19:14 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="rseqc_deletion_profile" name="Deletion Profile" version="@TOOL_VERSION@">
+<tool id="rseqc_deletion_profile" name="Deletion Profile" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@GALAXY_VERSION@">
     <description>
      calculates the distributions of deleted nucleotides across reads
     </description>
@@ -14,7 +14,8 @@
     <version_command><![CDATA[deletion_profile.py --version]]></version_command>
 
     <command><![CDATA[
-        deletion_profile.py -i '${input}' -o output -l ${readlength} -n ${readnum} -q ${mapq}
+        @BAM_SAM_INPUTS@
+        deletion_profile.py -i 'input.${extension}' -o output -l ${read_align_length} -n ${read_num} -q ${mapq}
         ]]>
     </command>
 
@@ -35,7 +36,7 @@
     <tests>
         <test>
             <param name="input" value="pairend_strandspecific_51mer_hg19_chr1_1-100000.bam" />
-            <param name="readlength" value="101" />
+            <param name="read_align_length" value="101" />
             <param name="rscript_output" value="true" />
             <output name="outputpdf" file="output.deletion_profile.pdf" compare="sim_size" />
             <output name="outputxls" file="output.deletion_profile.txt" />
--- a/geneBody_coverage.xml	Sat Dec 18 19:41:19 2021 +0000
+++ b/geneBody_coverage.xml	Sat Nov 26 15:19:14 2022 +0000
@@ -1,5 +1,5 @@
-<tool id="rseqc_geneBody_coverage" name="Gene Body Coverage (BAM)" version="@TOOL_VERSION@.3">
-    <description>Read coverage over gene body</description>
+<tool id="rseqc_geneBody_coverage" name="Gene Body Coverage (BAM)" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@GALAXY_VERSION@">
+    <description>read coverage over gene body</description>
     <expand macro="bio_tools"/>
     <macros>
         <import>rseqc_macros.xml</import>
--- a/geneBody_coverage2.xml	Sat Dec 18 19:41:19 2021 +0000
+++ b/geneBody_coverage2.xml	Sat Nov 26 15:19:14 2022 +0000
@@ -1,7 +1,5 @@
-<tool id="rseqc_geneBody_coverage2" name="Gene Body Coverage (Bigwig)" version="@TOOL_VERSION@.2">
-    <description>
-        Read coverage over gene body
-    </description>
+<tool id="rseqc_geneBody_coverage2" name="Gene Body Coverage (Bigwig)" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@GALAXY_VERSION@">
+    <description>read coverage over gene body</description>
     <expand macro="bio_tools"/>
     <macros>
         <import>rseqc_macros.xml</import>
--- a/infer_experiment.xml	Sat Dec 18 19:41:19 2021 +0000
+++ b/infer_experiment.xml	Sat Nov 26 15:19:14 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="rseqc_infer_experiment" name="Infer Experiment" version="@TOOL_VERSION@.1">
+<tool id="rseqc_infer_experiment" name="Infer Experiment" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@GALAXY_VERSION@">
     <description>speculates how RNA-seq were configured</description>
     <expand macro="bio_tools"/>
     <macros>
@@ -12,7 +12,8 @@
     <version_command><![CDATA[infer_experiment.py --version]]></version_command>
 
     <command><![CDATA[
-        infer_experiment.py -i '${input}' -r '${refgene}'
+        @BAM_SAM_INPUTS@
+        infer_experiment.py -i 'input.${extension}' -r '${refgene}'
             --sample-size ${sample_size}
             --mapq ${mapq}
             > '${output}'
@@ -27,7 +28,7 @@
     </inputs>
 
     <outputs>
-        <data format="txt" name="output" />
+        <data format="txt" name="output" label="${tool.name} on ${on_string}: RNA-seq experiment configuration" />
     </outputs>
 
     <tests>
--- a/inner_distance.xml	Sat Dec 18 19:41:19 2021 +0000
+++ b/inner_distance.xml	Sat Nov 26 15:19:14 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="rseqc_inner_distance" name="Inner Distance" version="@TOOL_VERSION@.1">
+<tool id="rseqc_inner_distance" name="Inner Distance" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@GALAXY_VERSION@">
     <description>calculate the inner distance (or insert size) between two paired RNA reads</description>
     <expand macro="bio_tools"/>
     <macros>
@@ -12,7 +12,8 @@
     <version_command><![CDATA[inner_distance.py --version]]></version_command>
 
     <command><![CDATA[
-        inner_distance.py -i '${input}' -o output -r '${refgene}'
+        @BAM_SAM_INPUTS@
+        inner_distance.py -i 'input.${extension}' -o output -r '${refgene}'
             --sample-size ${sample_size}
             --lower-bound ${lowerBound}
             --upper-bound ${upperBound}
--- a/insertion_profile.xml	Sat Dec 18 19:41:19 2021 +0000
+++ b/insertion_profile.xml	Sat Nov 26 15:19:14 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="rseqc_insertion_profile" name="Insertion Profile" version="@TOOL_VERSION@">
+<tool id="rseqc_insertion_profile" name="Insertion Profile" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@GALAXY_VERSION@">
     <description>
      calculates the distribution of inserted nucleotides across reads
     </description>
@@ -14,12 +14,13 @@
     <version_command><![CDATA[insertion_profile.py --version]]></version_command>
 
     <command><![CDATA[
-        insertion_profile.py -i '${input}' -o output -q ${mapq} -s "${layout}"
+        @BAM_SAM_INPUTS@
+        insertion_profile.py -i 'input.${extension}' -o output -q ${mapq} -s "${layout}"
         ]]>
     </command>
 
     <inputs>
-        <expand macro="bam_param" />
+        <expand macro="bam_sam_param" />
         <expand macro="mapq_param" />
         <expand macro="layout_param" />
         <expand macro="rscript_output_param" />
--- a/junction_annotation.xml	Sat Dec 18 19:41:19 2021 +0000
+++ b/junction_annotation.xml	Sat Nov 26 15:19:14 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="rseqc_junction_annotation" name="Junction Annotation" version="@TOOL_VERSION@.1">
+<tool id="rseqc_junction_annotation" name="Junction Annotation" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@GALAXY_VERSION@">
     <description>compares detected splice junctions to reference gene model</description>
     <expand macro="bio_tools"/>
     <macros>
@@ -10,7 +10,7 @@
             Required due to conda solver bug: https://github.com/conda/conda/issues/6269
             See: https://github.com/galaxyproject/tools-iuc/pull/1578 for more info
         -->
-        <requirement type="package" version="3.4.1">r-base</requirement>
+        <requirement type="package" version="4.2.2">r-base</requirement>
     </expand>
 
     <expand macro="stdio" />
@@ -18,8 +18,9 @@
     <version_command><![CDATA[junction_annotation.py --version]]></version_command>
 
     <command><![CDATA[
+        @BAM_SAM_INPUTS@
         junction_annotation.py
-            --input-file '${input}'
+            --input-file 'input.${extension}'
             --refgene '${refgene}'
             --out-prefix output
             --min-intron ${min_intron}
--- a/junction_saturation.xml	Sat Dec 18 19:41:19 2021 +0000
+++ b/junction_saturation.xml	Sat Nov 26 15:19:14 2022 +0000
@@ -1,19 +1,16 @@
-<tool id="rseqc_junction_saturation" name="Junction Saturation" version="@TOOL_VERSION@.1">
+<tool id="rseqc_junction_saturation" name="Junction Saturation" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@GALAXY_VERSION@">
     <description>detects splice junctions from each subset and compares them to reference gene model</description>
     <expand macro="bio_tools"/>
     <macros>
         <import>rseqc_macros.xml</import>
     </macros>
-
     <expand macro="requirements" />
-
     <expand macro="stdio" />
-
     <version_command><![CDATA[junction_saturation.py --version]]></version_command>
-
     <command><![CDATA[
+        @BAM_SAM_INPUTS@
         junction_saturation.py
-            --input-file '${input}'
+            --input-file 'input.${extension}'
             --refgene '${refgene}'
             --out-prefix output
             --min-intron ${min_intron}
--- a/mismatch_profile.xml	Sat Dec 18 19:41:19 2021 +0000
+++ b/mismatch_profile.xml	Sat Nov 26 15:19:14 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="rseqc_mismatch_profile" name="Mismatch Profile" version="@TOOL_VERSION@">
+<tool id="rseqc_mismatch_profile" name="Mismatch Profile" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@GALAXY_VERSION@">
     <description>
      calculates the distribution of mismatches across reads
     </description>
@@ -14,7 +14,8 @@
     <version_command><![CDATA[mismatch_profile.py --version]]></version_command>
 
     <command><![CDATA[
-        mismatch_profile.py -i '${input}' -o output -l ${readlength} -n ${readnum} -q ${mapq}
+        @BAM_SAM_INPUTS@
+        mismatch_profile.py -i 'input.${extension}' -o output -l ${read_align_length} -n ${read_num} -q ${mapq}
         ]]>
     </command>
 
@@ -35,7 +36,7 @@
     <tests>
         <test>
             <param name="input" value="pairend_strandspecific_51mer_hg19_chr1_1-100000.bam"/>
-            <param name="readlength" value="101" />
+            <param name="read_align_length" value="101" />
             <param name="rscript_output" value="true" />
             <output name="outputpdf" file="output.mismatch_profile.pdf" compare="sim_size" />
             <output name="outputxls" file="output.mismatch_profile.xls"/>
--- a/read_GC.xml	Sat Dec 18 19:41:19 2021 +0000
+++ b/read_GC.xml	Sat Nov 26 15:19:14 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="rseqc_read_GC" name="Read GC" version="@TOOL_VERSION@">
+<tool id="rseqc_read_GC" name="Read GC" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@GALAXY_VERSION@">
     <description>determines GC% and read count</description>
     <expand macro="bio_tools"/>
     <macros>
@@ -12,8 +12,9 @@
     <version_command><![CDATA[read_GC.py --version]]></version_command>
 
     <command><![CDATA[
+        @BAM_SAM_INPUTS@
         read_GC.py
-            --input-file '${input}'
+            --input-file 'input.${extension}'
             --out-prefix output
             --mapq ${mapq}
         ]]>
--- a/read_NVC.xml	Sat Dec 18 19:41:19 2021 +0000
+++ b/read_NVC.xml	Sat Nov 26 15:19:14 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="rseqc_read_NVC" name="Read NVC" version="@TOOL_VERSION@">
+<tool id="rseqc_read_NVC" name="Read NVC" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@GALAXY_VERSION@">
     <description>to check the nucleotide composition bias</description>
     <expand macro="bio_tools"/>
     <macros>
@@ -12,8 +12,9 @@
     <version_command><![CDATA[read_NVC.py --version]]></version_command>
 
     <command><![CDATA[
+        @BAM_SAM_INPUTS@
         read_NVC.py
-            --input-file '${input}'
+            --input-file 'input.${extension}'
             --out-prefix output
             ${nx}
             --mapq ${mapq}
--- a/read_distribution.xml	Sat Dec 18 19:41:19 2021 +0000
+++ b/read_distribution.xml	Sat Nov 26 15:19:14 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="rseqc_read_distribution" name="Read Distribution" version="@TOOL_VERSION@.1">
+<tool id="rseqc_read_distribution" name="Read Distribution" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@GALAXY_VERSION@">
     <description>calculates how mapped reads were distributed over genome feature</description>
     <expand macro="bio_tools"/>
     <macros>
@@ -12,7 +12,8 @@
     <version_command><![CDATA[read_distribution.py --version]]></version_command>
 
     <command><![CDATA[
-        read_distribution.py -i '${input}' -r '${refgene}' > '${output}'
+        @BAM_SAM_INPUTS@
+        read_distribution.py -i 'input.${extension}' -r '${refgene}' > '${output}'
         ]]>
     </command>
 
--- a/read_duplication.xml	Sat Dec 18 19:41:19 2021 +0000
+++ b/read_duplication.xml	Sat Nov 26 15:19:14 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="rseqc_read_duplication" name="Read Duplication" version="@TOOL_VERSION@">
+<tool id="rseqc_read_duplication" name="Read Duplication" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@GALAXY_VERSION@">
     <description>determines reads duplication rate with sequence-based and mapping-based strategies</description>
     <expand macro="bio_tools"/>
     <macros>
@@ -12,7 +12,8 @@
     <version_command><![CDATA[read_duplication.py --version]]></version_command>
 
     <command><![CDATA[
-        read_duplication.py -i '${input}' -o output -u ${upLimit} -q ${mapq}
+        @BAM_SAM_INPUTS@
+        read_duplication.py -i 'input.${extension}' -o output -u ${upLimit} -q ${mapq}
         ]]>
     </command>
 
--- a/read_hexamer.xml	Sat Dec 18 19:41:19 2021 +0000
+++ b/read_hexamer.xml	Sat Nov 26 15:19:14 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="rseqc_read_hexamer" name="Hexamer frequency" version="@TOOL_VERSION@">
+<tool id="rseqc_read_hexamer" name="Hexamer frequency" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@GALAXY_VERSION@">
     <description>
         calculates hexamer (6mer) frequency for reads, genomes, and mRNA sequences
     </description>
@@ -57,7 +57,7 @@
             <output name="output">
                 <assert_contents>
                     <has_line line="Hexamer&#009;pairend_strandspecific_51mer_hg19_chr1_1-100000_R1_fastq" />
-                    <has_line line="AAAAAA&#009;0.00217391304348" />
+                    <has_text text="0.002173913043478261" />
                 </assert_contents>
             </output>
         </test>
@@ -66,7 +66,7 @@
             <output name="output">
                 <assert_contents>
                     <has_line line="Hexamer&#009;pairend_strandspecific_51mer_hg19_chr1_1-100000_R1_fastq_gz" />
-                    <has_line line="AAAAAA&#009;0.00217391304348" />
+                    <has_text text="0.002173913043478261" />
                 </assert_contents>
             </output>
         </test>
@@ -75,7 +75,7 @@
             <output name="output">
                 <assert_contents>
                     <has_line line="Hexamer&#009;pairend_strandspecific_51mer_hg19_chr1_1-100000_R1_fastq&#009;pairend_strandspecific_51mer_hg19_chr1_1-100000_R2_fastq" />
-                    <has_line line="AAAAAA&#009;0.00217391304348&#009;0.00534759358289" />
+                    <has_text text="0.002173913043478261" />
                 </assert_contents>
             </output>
         </test>
@@ -84,7 +84,7 @@
             <output name="output">
                 <assert_contents>
                     <has_line line="Hexamer&#009;pairend_strandspecific_51mer_hg19_chr1_1-100000_R1_fastq&#009;pairend_strandspecific_51mer_hg19_chr1_1-100000_R1_fastq.1" />
-                    <has_line line="AAAAAA&#009;0.00217391304348&#009;0.00217391304348" />
+                    <has_text text="0.002173913043478261" />
                 </assert_contents>
             </output>
         </test>
--- a/read_quality.xml	Sat Dec 18 19:41:19 2021 +0000
+++ b/read_quality.xml	Sat Nov 26 15:19:14 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="rseqc_read_quality" name="Read Quality" version="@TOOL_VERSION@">
+<tool id="rseqc_read_quality" name="Read Quality" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@GALAXY_VERSION@">
     <description>determines Phred quality score</description>
     <expand macro="bio_tools"/>
     <macros>
@@ -10,7 +10,7 @@
             Required due to conda solver bug: https://github.com/conda/conda/issues/6269
             See: https://github.com/galaxyproject/tools-iuc/pull/1578 for more info
         -->
-        <requirement type="package" version="3.4.1">r-base</requirement>
+        <requirement type="package" version="4.2.2">r-base</requirement>
     </expand>
 
     <expand macro="stdio" />
@@ -18,8 +18,9 @@
     <version_command><![CDATA[read_quality.py --version]]></version_command>
 
     <command><![CDATA[
+        @BAM_SAM_INPUTS@
         read_quality.py
-            --input-file '${input}'
+            --input-file 'input.${extension}'
             --out-prefix output
             -r ${reduce}
             --mapq ${mapq}
--- a/rseqc_macros.xml	Sat Dec 18 19:41:19 2021 +0000
+++ b/rseqc_macros.xml	Sat Nov 26 15:19:14 2022 +0000
@@ -1,10 +1,10 @@
 <macros>
-
-    <token name="@TOOL_VERSION@">2.6.4</token>
-
+    <token name="@TOOL_VERSION@">5.0.1</token>
+    <token name="@VERSION_SUFFIX@">0</token>
+    <token name="@GALAXY_VERSION@">20.01</token>
     <xml name="requirements">
         <requirements>
-            <requirement type="package" version="2.6.4">rseqc</requirement>
+            <requirement type="package" version="@TOOL_VERSION@">rseqc</requirement>
             <yield/>
         </requirements>
     </xml>
@@ -22,35 +22,36 @@
 
     <!-- Params -->
     <xml name="bam_param">
-        <param name="input" type="data" label="Input .bam file" format="bam" help="(--input-file)"/>
+        <param name="input" type="data" label="Input BAM file" format="bam" help="(--input-file)"/>
     </xml>
 
     <xml name="bam_sam_param">
-        <param name="input" type="data" label="Input .bam/.sam file" format="bam,sam" help="(--input-file)"/>
+        <param name="input" type="data" label="Input BAM/SAM file" format="bam,sam" help="(--input-file)"/>
     </xml>
 
     <xml name="refgene_param">
-        <param name="refgene" type="data" format="bed12" label="Reference gene model" help="(--refgene)"/>
+        <param argument="--refgene" type="data" format="bed12" label="Reference gene model" help="Reference gene model in BED fomat"/>
     </xml>
 
     <xml name="mapq_param">
-        <param name="mapq" type="integer" label="Minimum mapping quality" value="30" help="Minimum mapping quality for an alignment to be considered as &quot;uniquely mapped&quot; (--mapq)"/>
+        <param argument="--mapq" type="integer" label="Minimum mapping quality" value="30" 
+            help="Minimum mapping quality for an alignment to be considered as &quot;uniquely mapped&quot;"/>
     </xml>
 
     <xml name="readlength_param">
-        <param name="readlength" type="integer" value="" label="Alignment length" optional="false" help="Alignment length of read, usually set to the orignial read length (--read-align-length)"/>
+        <param argument="--read-align-length" type="integer" value="" label="Alignment length" optional="false" help="Alignment length of read, usually set to the orignial read length"/>
     </xml>
 
     <xml name="readnum_param">
-        <param name="readnum" type="integer" label="Number of aligned reads" value="1000000" help="Number of aligned reads with mismatches used to calculate the mismatch profile (--read-num)"/>
+        <param argument="--read-num" type="integer" label="Number of aligned reads" value="1000000" help="Number of aligned reads with mismatches used to calculate the mismatch profile"/>
     </xml>
 
     <xml name="sample_size_param">
-        <param name="sample_size" type="integer" label="Number of reads sampled from SAM/BAM file (default = 200000)" value="200000" min="1" help="(--sample-size)"/>
+        <param argument="--sample-size" type="integer" label="Number of reads sampled" value="200000" min="1" help="Number of reads sampled from SAM/BAM file"/>
     </xml>
 
     <xml name="min_intron_param">
-        <param name="min_intron" type="integer" value="50" label="Minimum intron length (bp, default=50)" help="(--min-intron)" />
+        <param argument="--min-intron" type="integer" value="50" label="Minimum intron length (bp)" help="Default: 50" />
     </xml>
 
     <xml name="layout_param">
@@ -119,14 +120,20 @@
     </xml>
 
     <!-- Command -->
-    <token name="@MULTIHITS@">
-<![CDATA[
-#if str($multihits_type.multihits_type_selector) == "skip_multihits"
-    --skip-multi-hits
-    --mapq=${multihits_type.mapq}
-#end if
-]]>
-    </token>
+    <token name="@MULTIHITS@"><![CDATA[
+        #if str($multihits_type.multihits_type_selector) == "skip_multihits"
+            --skip-multi-hits
+            --mapq=${multihits_type.mapq}
+        #end if
+    ]]></token>
+
+    <token name="@BAM_SAM_INPUTS@"><![CDATA[
+        #set $extension = str($input.ext)
+        ln -s -f '${input}' 'input.${extension}' &&
+        #if $extension == 'bam'
+            ln -s -f '${input.metadata.bam_index}' 'input.bam.bai' &&
+        #end if
+    ]]></token>
 
     <token name="@ABOUT@">
 
--- a/test-data/output.FPKM.xls	Sat Dec 18 19:41:19 2021 +0000
+++ b/test-data/output.FPKM.xls	Sat Nov 26 15:19:14 2022 +0000
@@ -1,6 +1,6 @@
 #chrom	st	end	accession	mRNA_size	gene_strand	Frag_count	FPM	FPKM
-chr1	11873	14409	NR_046018	1652.0	+	1.0	50000.0	30266.3438257
-chr1	14361	29370	NR_024540	1769.0	-	2.0	100000.0	56529.1124929
+chr1	11873	14409	NR_046018	1652.0	+	1.0	50000.0	30266.34382566586
+chr1	14361	29370	NR_024540	1769.0	-	2.0	100000.0	56529.11249293386
 chr1	17368	17436	NR_106918	68.0	-	0.0	0.0	0.0
 chr1	17368	17436	NR_107062	68.0	-	0.0	0.0	0.0
 chr1	34610	36081	NR_026818	1130.0	-	0.0	0.0	0.0
--- a/test-data/output.GC.xls	Sat Dec 18 19:41:19 2021 +0000
+++ b/test-data/output.GC.xls	Sat Nov 26 15:19:14 2022 +0000
@@ -1,19 +1,19 @@
 GC%	read_count
+56.86	7
+68.63	1
 60.78	3
-41.18	3
-47.06	5
-56.86	7
-29.41	1
 27.45	2
 37.25	2
+58.82	1
 78.43	1
-58.82	1
 50.98	3
+43.14	2
 49.02	2
+52.94	3
 62.75	1
-68.63	1
+47.06	5
+41.18	3
 54.90	1
-52.94	3
+29.41	1
+39.22	1
 35.29	1
-43.14	2
-39.22	1
Binary file test-data/output.GC_plot.pdf has changed
--- a/test-data/output.GC_plot_r	Sat Dec 18 19:41:19 2021 +0000
+++ b/test-data/output.GC_plot_r	Sat Nov 26 15:19:14 2022 +0000
@@ -1,4 +1,4 @@
 pdf("output.GC_plot.pdf")
-gc=rep(c(60.78,41.18,47.06,56.86,29.41,27.45,37.25,78.43,58.82,50.98,49.02,62.75,68.63,54.90,52.94,35.29,43.14,39.22),times=c(3,3,5,7,1,2,2,1,1,3,2,1,1,1,3,1,2,1))
+gc=rep(c(56.86,68.63,60.78,27.45,37.25,58.82,78.43,50.98,43.14,49.02,52.94,62.75,47.06,41.18,54.90,29.41,39.22,35.29),times=c(7,1,3,2,2,1,1,3,2,2,3,1,5,3,1,1,1,1))
 hist(gc,probability=T,breaks=100,xlab="GC content (%)",ylab="Density of Reads",border="blue",main="")
 dev.off()
--- a/test-data/output.NVC.xls	Sat Dec 18 19:41:19 2021 +0000
+++ b/test-data/output.NVC.xls	Sat Nov 26 15:19:14 2022 +0000
@@ -1,52 +1,52 @@
 Position	A	C	G	T	N	X
-0	5	7	18	10	0	0	
-1	6	7	15	8	4	0	
-2	5	9	18	5	3	0	
-3	11	9	14	4	2	0	
-4	5	9	12	14	0	0	
-5	4	11	19	6	0	0	
-6	11	7	12	10	0	0	
-7	9	8	12	9	2	0	
-8	12	9	11	8	0	0	
-9	8	9	8	10	5	0	
-10	9	8	9	14	0	0	
-11	9	6	11	14	0	0	
-12	14	8	12	6	0	0	
-13	10	6	9	15	0	0	
-14	9	9	7	15	0	0	
-15	10	10	9	9	2	0	
-16	8	4	6	14	8	0	
-17	9	9	10	9	3	0	
-18	7	5	11	12	5	0	
-19	12	8	4	10	6	0	
-20	10	6	9	15	0	0	
-21	9	9	15	7	0	0	
-22	14	6	11	9	0	0	
-23	13	11	11	5	0	0	
-24	12	8	7	10	3	0	
-25	9	13	4	8	6	0	
-26	11	16	7	6	0	0	
-27	11	8	13	8	0	0	
-28	13	6	9	12	0	0	
-29	9	9	12	10	0	0	
-30	8	6	15	11	0	0	
-31	7	9	11	13	0	0	
-32	7	8	14	11	0	0	
-33	11	11	10	8	0	0	
-34	6	12	13	9	0	0	
-35	8	17	11	4	0	0	
-36	9	8	7	16	0	0	
-37	11	9	12	8	0	0	
-38	8	9	10	13	0	0	
-39	8	12	11	9	0	0	
-40	12	9	10	9	0	0	
-41	9	13	11	7	0	0	
-42	10	12	9	9	0	0	
-43	7	13	11	9	0	0	
-44	10	12	6	12	0	0	
-45	10	10	9	11	0	0	
-46	7	10	10	13	0	0	
-47	9	9	12	10	0	0	
-48	10	6	14	10	0	0	
-49	8	10	13	9	0	0	
-50	7	8	9	16	0	0	
+0	 5	 7	 18	 10	 0	 0	
+1	 6	 7	 15	 8	 4	 0	
+2	 5	 9	 18	 5	 3	 0	
+3	 11	 9	 14	 4	 2	 0	
+4	 5	 9	 12	 14	 0	 0	
+5	 4	 11	 19	 6	 0	 0	
+6	 11	 7	 12	 10	 0	 0	
+7	 9	 8	 12	 9	 2	 0	
+8	 12	 9	 11	 8	 0	 0	
+9	 8	 9	 8	 10	 5	 0	
+10	 9	 8	 9	 14	 0	 0	
+11	 9	 6	 11	 14	 0	 0	
+12	 14	 8	 12	 6	 0	 0	
+13	 10	 6	 9	 15	 0	 0	
+14	 9	 9	 7	 15	 0	 0	
+15	 10	 10	 9	 9	 2	 0	
+16	 8	 4	 6	 14	 8	 0	
+17	 9	 9	 10	 9	 3	 0	
+18	 7	 5	 11	 12	 5	 0	
+19	 12	 8	 4	 10	 6	 0	
+20	 10	 6	 9	 15	 0	 0	
+21	 9	 9	 15	 7	 0	 0	
+22	 14	 6	 11	 9	 0	 0	
+23	 13	 11	 11	 5	 0	 0	
+24	 12	 8	 7	 10	 3	 0	
+25	 9	 13	 4	 8	 6	 0	
+26	 11	 16	 7	 6	 0	 0	
+27	 11	 8	 13	 8	 0	 0	
+28	 13	 6	 9	 12	 0	 0	
+29	 9	 9	 12	 10	 0	 0	
+30	 8	 6	 15	 11	 0	 0	
+31	 7	 9	 11	 13	 0	 0	
+32	 7	 8	 14	 11	 0	 0	
+33	 11	 11	 10	 8	 0	 0	
+34	 6	 12	 13	 9	 0	 0	
+35	 8	 17	 11	 4	 0	 0	
+36	 9	 8	 7	 16	 0	 0	
+37	 11	 9	 12	 8	 0	 0	
+38	 8	 9	 10	 13	 0	 0	
+39	 8	 12	 11	 9	 0	 0	
+40	 12	 9	 10	 9	 0	 0	
+41	 9	 13	 11	 7	 0	 0	
+42	 10	 12	 9	 9	 0	 0	
+43	 7	 13	 11	 9	 0	 0	
+44	 10	 12	 6	 12	 0	 0	
+45	 10	 10	 9	 11	 0	 0	
+46	 7	 10	 10	 13	 0	 0	
+47	 9	 9	 12	 10	 0	 0	
+48	 10	 6	 14	 10	 0	 0	
+49	 8	 10	 13	 9	 0	 0	
+50	 7	 8	 9	 16	 0	 0	
Binary file test-data/output.NVC_plot.pdf has changed
Binary file test-data/output.geneBodyCoverage2.curves.pdf has changed
--- a/test-data/output.geneBodyCoverage2.txt	Sat Dec 18 19:41:19 2021 +0000
+++ b/test-data/output.geneBodyCoverage2.txt	Sat Nov 26 15:19:14 2022 +0000
@@ -1,101 +1,101 @@
 percentile	count
-0	0.0
-1	0.0
-2	0.0
-3	0.0
-4	0.0
-5	0.0
-6	0.0
-7	0.0
-8	0.0
-9	0.0
-10	0.0
-11	0.0
-12	0.0
-13	0.0
-14	0.0
-15	0.0
-16	0.0
-17	0.0
-18	0.0
-19	0.0
-20	0.0
-21	0.0
-22	0.0
-23	0.0
-24	0.0
-25	1.0
-26	0.0
-27	0.0
-28	1.0
-29	0.0
-30	0.0
-31	0.0
-32	0.0
-33	0.0
-34	0.0
-35	0.0
-36	0.0
-37	0.0
-38	1.0
-39	1.0
-40	1.0
-41	0.0
-42	0.0
-43	1.0
-44	1.0
-45	1.0
-46	0.0
-47	0.0
-48	0.0
-49	0.0
-50	0.0
-51	0.0
-52	0.0
-53	0.0
-54	0.0
-55	0.0
-56	0.0
-57	0.0
-58	0.0
-59	0.0
-60	0.0
-61	0.0
-62	0.0
-63	0.0
-64	0.0
-65	0.0
-66	0.0
-67	0.0
-68	0.0
-69	0.0
-70	0.0
-71	0.0
-72	0.0
-73	0.0
-74	0.0
-75	0.0
-76	0.0
-77	0.0
-78	0.0
-79	1.0
-80	1.0
-81	1.0
-82	0.0
-83	1.0
-84	1.0
-85	1.0
-86	0.0
-87	0.0
-88	0.0
-89	0.0
-90	0.0
-91	0.0
-92	0.0
-93	0.0
-94	0.0
-95	0.0
-96	0.0
-97	0.0
-98	0.0
-99	0.0
+0	0
+1	0
+2	0
+3	0
+4	0
+5	0
+6	0
+7	0
+8	0
+9	0
+10	0
+11	0
+12	0
+13	0
+14	0
+15	0
+16	0
+17	0
+18	0
+19	0
+20	0
+21	0
+22	0
+23	0
+24	0
+25	1
+26	0
+27	0
+28	1
+29	0
+30	0
+31	0
+32	0
+33	0
+34	0
+35	0
+36	0
+37	0
+38	1
+39	1
+40	1
+41	0
+42	0
+43	1
+44	1
+45	1
+46	0
+47	0
+48	0
+49	0
+50	0
+51	0
+52	0
+53	0
+54	0
+55	0
+56	0
+57	0
+58	0
+59	0
+60	0
+61	0
+62	0
+63	0
+64	0
+65	0
+66	0
+67	0
+68	0
+69	0
+70	0
+71	0
+72	0
+73	0
+74	0
+75	0
+76	0
+77	0
+78	0
+79	1
+80	1
+81	1
+82	0
+83	1
+84	1
+85	1
+86	0
+87	0
+88	0
+89	0
+90	0
+91	0
+92	0
+93	0
+94	0
+95	0
+96	0
+97	0
+98	0
+99	0
--- a/test-data/output.geneBodyCoverage2_r	Sat Dec 18 19:41:19 2021 +0000
+++ b/test-data/output.geneBodyCoverage2_r	Sat Nov 26 15:19:14 2022 +0000
@@ -1,5 +1,5 @@
 pdf('output.geneBodyCoverage.pdf')
 x=1:100
 y=c(0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0.0,0.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0)
-plot(x,y/7,xlab="percentile of gene body (5'->3')",ylab='average wigsum',type='s')
+plot(x, y/7, xlab="percentile of gene body (5'->3')", ylab='average wigsum', type='s')
 dev.off()
Binary file test-data/output.inner_distance_plot.pdf has changed
--- a/test-data/output.inner_distance_plot_r	Sat Dec 18 19:41:19 2021 +0000
+++ b/test-data/output.inner_distance_plot_r	Sat Nov 26 15:19:14 2022 +0000
@@ -1,6 +1,6 @@
 out_file = 'output'
 pdf('output.inner_distance_plot.pdf')
-fragsize=rep(c(-248,-243,-238,-233,-228,-223,-218,-213,-208,-203,-198,-193,-188,-183,-178,-173,-168,-163,-158,-153,-148,-143,-138,-133,-128,-123,-118,-113,-108,-103,-98,-93,-88,-83,-78,-73,-68,-63,-58,-53,-48,-43,-38,-33,-28,-23,-18,-13,-8,-3,2,7,12,17,22,27,32,37,42,47,52,57,62,67,72,77,82,87,92,97,102,107,112,117,122,127,132,137,142,147,152,157,162,167,172,177,182,187,192,197,202,207,212,217,222,227,232,237,242,247),times=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,1,0,0,2,0,0,2,0,0,0,1,0,1,1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,1,0,1,0,0,0,0,0,0,0,1,0,1,1,0,1,0,1,0,0,0))
+fragsize=rep(c(-247.5,-242.5,-237.5,-232.5,-227.5,-222.5,-217.5,-212.5,-207.5,-202.5,-197.5,-192.5,-187.5,-182.5,-177.5,-172.5,-167.5,-162.5,-157.5,-152.5,-147.5,-142.5,-137.5,-132.5,-127.5,-122.5,-117.5,-112.5,-107.5,-102.5,-97.5,-92.5,-87.5,-82.5,-77.5,-72.5,-67.5,-62.5,-57.5,-52.5,-47.5,-42.5,-37.5,-32.5,-27.5,-22.5,-17.5,-12.5,-7.5,-2.5,2.5,7.5,12.5,17.5,22.5,27.5,32.5,37.5,42.5,47.5,52.5,57.5,62.5,67.5,72.5,77.5,82.5,87.5,92.5,97.5,102.5,107.5,112.5,117.5,122.5,127.5,132.5,137.5,142.5,147.5,152.5,157.5,162.5,167.5,172.5,177.5,182.5,187.5,192.5,197.5,202.5,207.5,212.5,217.5,222.5,227.5,232.5,237.5,242.5,247.5),times=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,1,0,0,2,0,0,2,0,0,0,1,0,1,1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,1,0,1,0,0,0,0,0,0,0,1,0,1,1,0,1,0,1,0,0,0))
 frag_sd = sd(fragsize)
 frag_mean = mean(fragsize)
 frag_median = median(fragsize)
--- a/test-data/output.junction.xls	Sat Dec 18 19:41:19 2021 +0000
+++ b/test-data/output.junction.xls	Sat Nov 26 15:19:14 2022 +0000
@@ -1,4 +1,4 @@
 chrom	intron_st(0-based)	intron_end(1-based)	read_count	annotation
-chr1	17055	17232	1	annotated
-chr1	21768	22000	1	complete_novel
-chr1	12697	13220	1	partial_novel
+chr1	12697	13220	1	 partial_novel
+chr1	17055	17232	1	 annotated
+chr1	21768	22000	1	 complete_novel
--- a/test-data/output.junction_plot_r	Sat Dec 18 19:41:19 2021 +0000
+++ b/test-data/output.junction_plot_r	Sat Nov 26 15:19:14 2022 +0000
@@ -3,6 +3,6 @@
 pie(events,col=c(2,3,4),init.angle=30,angle=c(60,120,150),density=c(70,70,70),main="splicing events",labels=c("partial_novel 25%","complete_novel 25%","known 25%"))
 dev.off()
 pdf("output.splice_junction.pdf")
-junction=c(33.3333333333,33.3333333333,33.3333333333)
+junction=c(33.333333333333336,33.333333333333336,33.333333333333336)
 pie(junction,col=c(2,3,4),init.angle=30,angle=c(60,120,150),density=c(70,70,70),main="splicing junctions",labels=c("partial_novel 33%","complete_novel 33%","known 33%"))
 dev.off()
Binary file test-data/output.splice_events.pdf has changed
Binary file test-data/output.splice_junction.pdf has changed
--- a/test-data/output.tin.xls	Sat Dec 18 19:41:19 2021 +0000
+++ b/test-data/output.tin.xls	Sat Nov 26 15:19:14 2022 +0000
@@ -1,6 +1,6 @@
 geneID	chrom	tx_start	tx_end	TIN
 NR_046018	chr1	11873	14409	0.0
-NR_024540	chr1	14361	29370	8.87096774194
+NR_024540	chr1	14361	29370	8.870967741935486
 NR_106918	chr1	17368	17436	0.0
 NR_107062	chr1	17368	17436	0.0
 NR_026818	chr1	34610	36081	0.0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/summary.tin.txt	Sat Nov 26 15:19:14 2022 +0000
@@ -0,0 +1,2 @@
+Bam_file	TIN(mean)	TIN(median)	TIN(stdev)
+pairend_strandspecific_51mer_hg19_chr1_1-100000_bam.bam	8.870967741935486	8.870967741935486	0.0
--- a/test-data/testwig.Forward.wig	Sat Dec 18 19:41:19 2021 +0000
+++ b/test-data/testwig.Forward.wig	Sat Nov 26 15:19:14 2022 +0000
@@ -1,15 +1,3 @@
-variableStep chrom=chr13
-variableStep chrom=chr12
-variableStep chrom=chr11
-variableStep chrom=chr10
-variableStep chrom=chr17
-variableStep chrom=chr16
-variableStep chrom=chr15
-variableStep chrom=chr14
-variableStep chrom=chr19
-variableStep chrom=chr18
-variableStep chrom=chr8
-variableStep chrom=chr3
 variableStep chrom=chr1
 12674	1.00
 12675	1.00
@@ -113,15 +101,27 @@
 13531	1.00
 13532	1.00
 13533	1.00
-variableStep chrom=chrY
+variableStep chrom=chr2
+variableStep chrom=chr3
+variableStep chrom=chr4
+variableStep chrom=chr5
+variableStep chrom=chr6
+variableStep chrom=chr7
 variableStep chrom=chrX
+variableStep chrom=chr8
 variableStep chrom=chr9
-variableStep chrom=chrM
-variableStep chrom=chr22
+variableStep chrom=chr10
+variableStep chrom=chr11
+variableStep chrom=chr12
+variableStep chrom=chr13
+variableStep chrom=chr14
+variableStep chrom=chr15
+variableStep chrom=chr16
+variableStep chrom=chr17
+variableStep chrom=chr18
 variableStep chrom=chr20
+variableStep chrom=chrY
+variableStep chrom=chr19
+variableStep chrom=chr22
 variableStep chrom=chr21
-variableStep chrom=chr7
-variableStep chrom=chr6
-variableStep chrom=chr5
-variableStep chrom=chr4
-variableStep chrom=chr2
+variableStep chrom=chrM
--- a/test-data/testwig.Reverse.wig	Sat Dec 18 19:41:19 2021 +0000
+++ b/test-data/testwig.Reverse.wig	Sat Nov 26 15:19:14 2022 +0000
@@ -1,15 +1,3 @@
-variableStep chrom=chr13
-variableStep chrom=chr12
-variableStep chrom=chr11
-variableStep chrom=chr10
-variableStep chrom=chr17
-variableStep chrom=chr16
-variableStep chrom=chr15
-variableStep chrom=chr14
-variableStep chrom=chr19
-variableStep chrom=chr18
-variableStep chrom=chr8
-variableStep chrom=chr3
 variableStep chrom=chr1
 14596	-1.00
 14597	-1.00
@@ -1672,15 +1660,27 @@
 94875	-1.00
 94876	-1.00
 94877	-1.00
-variableStep chrom=chrY
+variableStep chrom=chr2
+variableStep chrom=chr3
+variableStep chrom=chr4
+variableStep chrom=chr5
+variableStep chrom=chr6
+variableStep chrom=chr7
 variableStep chrom=chrX
+variableStep chrom=chr8
 variableStep chrom=chr9
-variableStep chrom=chrM
-variableStep chrom=chr22
+variableStep chrom=chr10
+variableStep chrom=chr11
+variableStep chrom=chr12
+variableStep chrom=chr13
+variableStep chrom=chr14
+variableStep chrom=chr15
+variableStep chrom=chr16
+variableStep chrom=chr17
+variableStep chrom=chr18
 variableStep chrom=chr20
+variableStep chrom=chrY
+variableStep chrom=chr19
+variableStep chrom=chr22
 variableStep chrom=chr21
-variableStep chrom=chr7
-variableStep chrom=chr6
-variableStep chrom=chr5
-variableStep chrom=chr4
-variableStep chrom=chr2
+variableStep chrom=chrM
--- a/test-data/testwig.wig	Sat Dec 18 19:41:19 2021 +0000
+++ b/test-data/testwig.wig	Sat Nov 26 15:19:14 2022 +0000
@@ -1,15 +1,3 @@
-variableStep chrom=chr13
-variableStep chrom=chr12
-variableStep chrom=chr11
-variableStep chrom=chr10
-variableStep chrom=chr17
-variableStep chrom=chr16
-variableStep chrom=chr15
-variableStep chrom=chr14
-variableStep chrom=chr19
-variableStep chrom=chr18
-variableStep chrom=chr8
-variableStep chrom=chr3
 variableStep chrom=chr1
 12674	1.00
 12675	1.00
@@ -1774,15 +1762,27 @@
 94875	1.00
 94876	1.00
 94877	1.00
-variableStep chrom=chrY
+variableStep chrom=chr2
+variableStep chrom=chr3
+variableStep chrom=chr4
+variableStep chrom=chr5
+variableStep chrom=chr6
+variableStep chrom=chr7
 variableStep chrom=chrX
+variableStep chrom=chr8
 variableStep chrom=chr9
-variableStep chrom=chrM
-variableStep chrom=chr22
+variableStep chrom=chr10
+variableStep chrom=chr11
+variableStep chrom=chr12
+variableStep chrom=chr13
+variableStep chrom=chr14
+variableStep chrom=chr15
+variableStep chrom=chr16
+variableStep chrom=chr17
+variableStep chrom=chr18
 variableStep chrom=chr20
+variableStep chrom=chrY
+variableStep chrom=chr19
+variableStep chrom=chr22
 variableStep chrom=chr21
-variableStep chrom=chr7
-variableStep chrom=chr6
-variableStep chrom=chr5
-variableStep chrom=chr4
-variableStep chrom=chr2
+variableStep chrom=chrM
--- a/test-data/testwig_wigsum100.wig	Sat Dec 18 19:41:19 2021 +0000
+++ b/test-data/testwig_wigsum100.wig	Sat Nov 26 15:19:14 2022 +0000
@@ -1,15 +1,3 @@
-variableStep chrom=chr13
-variableStep chrom=chr12
-variableStep chrom=chr11
-variableStep chrom=chr10
-variableStep chrom=chr17
-variableStep chrom=chr16
-variableStep chrom=chr15
-variableStep chrom=chr14
-variableStep chrom=chr19
-variableStep chrom=chr18
-variableStep chrom=chr8
-variableStep chrom=chr3
 variableStep chrom=chr1
 12674	0.05
 12675	0.05
@@ -1774,15 +1762,27 @@
 94875	0.05
 94876	0.05
 94877	0.05
-variableStep chrom=chrY
+variableStep chrom=chr2
+variableStep chrom=chr3
+variableStep chrom=chr4
+variableStep chrom=chr5
+variableStep chrom=chr6
+variableStep chrom=chr7
 variableStep chrom=chrX
+variableStep chrom=chr8
 variableStep chrom=chr9
-variableStep chrom=chrM
-variableStep chrom=chr22
+variableStep chrom=chr10
+variableStep chrom=chr11
+variableStep chrom=chr12
+variableStep chrom=chr13
+variableStep chrom=chr14
+variableStep chrom=chr15
+variableStep chrom=chr16
+variableStep chrom=chr17
+variableStep chrom=chr18
 variableStep chrom=chr20
+variableStep chrom=chrY
+variableStep chrom=chr19
+variableStep chrom=chr22
 variableStep chrom=chr21
-variableStep chrom=chr7
-variableStep chrom=chr6
-variableStep chrom=chr5
-variableStep chrom=chr4
-variableStep chrom=chr2
+variableStep chrom=chrM
--- a/tin.xml	Sat Dec 18 19:41:19 2021 +0000
+++ b/tin.xml	Sat Nov 26 15:19:14 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="rseqc_tin" name="Transcript Integrity Number" version="@TOOL_VERSION@.1">
+<tool id="rseqc_tin" name="Transcript Integrity Number" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@GALAXY_VERSION@">
     <description>
         evaluates RNA integrity at a transcript level
     </description>
@@ -17,15 +17,26 @@
     in the filename -->
     <command><![CDATA[
         #import re
-        ln -sf '${input}' 'input.bam' &&
-        ln -sf '${input.metadata.bam_index}' 'input.bam.bai' &&
-        tin.py -i 'input.bam' --refgene='${refgene}' --minCov=${minCov}
+        #set $input_list = []
+        #for $i, $input in enumerate($input):
+            #set $safename = re.sub('[^\w\-_]', '_', $input.element_identifier)
+            #if $safename in $input_list:
+                #set $safename = str($safename) + "." + str($i)
+            #end if
+            $input_list.append($safename)
+            ln -sf '${input}' '${safename}.bam' &&
+            ln -sf '${input.metadata.bam_index}' '${safename}.bam.bai' &&
+            echo '${safename}.bam' >> 'input_list.txt' &&
+        #end for
+        tin.py -i 'input_list.txt' --refgene='${refgene}' --minCov=${minCov}
         --sample-size=${samplesize} ${subtractbackground}
+        && mv *summary.txt summary.tab
+        && mv *tin.xls tin.xls
         ]]>
     </command>
 
     <inputs>
-        <expand macro="bam_param" />
+        <param name="input" type="data" format="bam" multiple="true" label="Input BAM file" help="(--input-file)"/>
         <expand macro="refgene_param" />
         <param name="minCov" type="integer" value="10" label="Minimum coverage (default=10)"
             help="Minimum number of reads mapped to a transcript (--minCov)." />
@@ -41,22 +52,17 @@
     </inputs>
 
     <outputs>
-        <data name="outputsummary" format="tabular" from_work_dir="input.summary.txt" label="TIN on ${on_string} (summary)" />
-        <data name="outputxls" format="xls" from_work_dir="input.tin.xls" label="TIN on ${on_string} (tin)" />
+        <data name="outputsummary" format="tabular" from_work_dir="summary.tab" label="TIN on ${on_string} (summary)" />
+        <data name="outputxls" format="xls" from_work_dir="tin.xls" label="TIN on ${on_string} (tin)" />
     </outputs>
 
     <!-- PDF Files contain R version, must avoid checking for diff -->
     <tests>
-        <test>
+        <test expect_num_outputs="2">
             <param name="input" value="pairend_strandspecific_51mer_hg19_chr1_1-100000.bam"/>
             <param name="refgene" value="hg19_RefSeq_chr1_1-100000.bed" ftype="bed12"/>
-            <output name="outputsummary">
-                <assert_contents>
-                    <has_line_matching expression="^Bam_file\tTIN\(mean\)\tTIN\(median\)\tTIN\(stdev\)$" />
-                    <has_line_matching expression="^input\.bam\t8\.8709677419\d+\t8\.8709677419\d+\t0\.0$" />
-                </assert_contents>
-            </output>
-            <output name="outputxls" file="output.tin.xls"/>
+            <output name="outputsummary" file="summary.tin.txt" ftype="tabular"/>
+            <output name="outputxls" file="output.tin.xls" ftype="xls"/>
         </test>
     </tests>