changeset 2:d6b5fc94062c draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 10e44e324ee754d81a1b9d990ee0932b37e7a9bc
author iuc
date Thu, 08 Jun 2023 19:57:53 +0000
parents d3e447dd52c8
children
files macros.xml sleuth.R sleuth.xml test-data/design.tab test-data/design_three_factors.tab test-data/design_two_factors.tab test-data/test01_density.pdf test-data/test01_pca.pdf test-data/test02_density.pdf test-data/test02_pca.pdf test-data/test03_density.pdf test-data/test03_pca.pdf
diffstat 12 files changed, 78 insertions(+), 47 deletions(-) [+]
line wrap: on
line diff
--- a/macros.xml	Wed Jun 07 11:47:30 2023 +0000
+++ b/macros.xml	Thu Jun 08 19:57:53 2023 +0000
@@ -8,7 +8,7 @@
         </requirements>
     </xml>
     <token name="@TOOL_VERSION@">0.30.1</token>
-    <token name="@SUFFIX_VERSION@">1</token>
+    <token name="@SUFFIX_VERSION@">2</token>
     <token name="@PROFILE@">20.01</token>
     <xml name="citations">
         <citations>
--- a/sleuth.R	Wed Jun 07 11:47:30 2023 +0000
+++ b/sleuth.R	Thu Jun 08 19:57:53 2023 +0000
@@ -51,15 +51,11 @@
     read.table(file = args$metadata_file,
                header = TRUE,
                sep = "\t")
-  paths <- c()
-  for (x in s2c$data_filename) {
-    paths <- c(paths, paste("./kallisto_outputs/",  x, sep = ""))
+
+  s2c$path <- file.path("./kallisto_outputs/", paste(s2c$path, ".h5", sep = ""))
+  for (f in args$factorLevel_counts) {
+    file.rename(f, paste(f, ".h5", sep = ""))
   }
-  for (f in paths) {
-    file.rename(f, gsub(".fastq.*", "", f))
-        file.rename(f, paste(gsub(".fastq.*", "", f), ".h5", sep = ""))
-  }
-  s2c$path <- paste(gsub(".fastq.*", ".h5", paths), ".h5", sep = "")
 
   so <- sleuth_prep(s2c, full_model = ~ condition, num_cores = 1)
   so <- sleuth_fit(so)
--- a/sleuth.xml	Wed Jun 07 11:47:30 2023 +0000
+++ b/sleuth.xml	Thu Jun 08 19:57:53 2023 +0000
@@ -67,7 +67,7 @@
         <conditional name="experiment_design">
             <param name="selector" type="select" label="Experiment design" help="If you have multiple experimental conditions, you should use propably the complex design mode. In the help section you can find more information.">
                 <option value="single">Simple design mode (one experimental factor)</option>
-                <option value="complex">Complex design mode (two experimental factors)</option>
+                <option value="complex">Complex design mode (two or more experimental factors)</option>
             </param>
             <when value="single">
                 <repeat name="rep_factorLevel" title="Factor level" min="2" default="2">
@@ -82,7 +82,7 @@
             </when>
             <when value="complex">
                 <param name="countsFile" type="data_collection" format="h5" multiple="true" label="Counts file(s)"/>
-                <param argument="--metadata_file" type="data" format="txt" label="Input metadata file" help="You can find more details about it in the help section" />
+                <param argument="--metadata_file" type="data" format="txt" label="Input metadata file" help="You can find more details about the format of the design table in the help section." />
             </when>
         </conditional>
         <section name="advanced_options" title="Advanced options" expanded="true">
@@ -133,35 +133,64 @@
             <output name="pca_plot" file="test01_pca.pdf" ftype="pdf" compare="sim_size"/>
             <output name="density_plot" file="test01_density.pdf" ftype="pdf" compare="sim_size"/>
         </test>
-    <test expect_num_outputs="3">
-        <conditional name="experiment_design">
-            <param name="selector" value="complex"/>
-            <param name="countsFile">
-                <collection type="list">
-                    <element name="kallisto_output_01.h5" ftype="h5" value="kallisto_output_01.h5"/>
-                    <element name="kallisto_output_02.h5" ftype="h5" value="kallisto_output_02.h5"/>
-                    <element name="kallisto_output_03.h5" ftype="h5" value="kallisto_output_03.h5"/>
-                    <element name="kallisto_output_04.h5" ftype="h5" value="kallisto_output_04.h5"/>
-                </collection>
-            </param>
-            <param name="metadata_file" value="design.tab"/>
-        </conditional>
-        <section name="advanced_options">
-            <param name="normalization" value="true"/>
-            <param name="nbins" value="100"/>
-            <param name="lwr" value="0.25"/>
-            <param name="upr" value="0.75"/>
-        </section>
-        <output name="sleuth_table" ftype="tabular">
-            <assert_contents>
-                <has_size value="756310" delta="100"/>
-                <has_text text="ENST00000394894.8"/>
-                <has_text text="ENST00000524187.1"/>
-            </assert_contents>
-        </output>
-        <output name="pca_plot" file="test02_pca.pdf" ftype="pdf" compare="sim_size"/>
-        <output name="density_plot" file="test02_density.pdf" ftype="pdf" compare="sim_size"/>
-    </test>
+        <test expect_num_outputs="3">
+            <conditional name="experiment_design">
+                <param name="selector" value="complex"/>
+                <param name="countsFile">
+                    <collection type="list">
+                        <element name="kallisto_output_01.h5" ftype="h5" value="kallisto_output_01.h5"/>
+                        <element name="kallisto_output_02.h5" ftype="h5" value="kallisto_output_02.h5"/>
+                        <element name="kallisto_output_03.h5" ftype="h5" value="kallisto_output_03.h5"/>
+                        <element name="kallisto_output_04.h5" ftype="h5" value="kallisto_output_04.h5"/>
+                    </collection>
+                </param>
+                <param name="metadata_file" value="design_two_factors.tab"/>
+            </conditional>
+            <section name="advanced_options">
+                <param name="normalization" value="true"/>
+                <param name="nbins" value="100"/>
+                <param name="lwr" value="0.25"/>
+                <param name="upr" value="0.75"/>
+            </section>
+            <output name="sleuth_table" ftype="tabular">
+                <assert_contents>
+                    <has_size value="756310" delta="100"/>
+                    <has_text text="ENST00000394894.8"/>
+                    <has_text text="ENST00000524187.1"/>
+                </assert_contents>
+            </output>
+            <output name="pca_plot" file="test02_pca.pdf" ftype="pdf" compare="sim_size"/>
+            <output name="density_plot" file="test02_density.pdf" ftype="pdf" compare="sim_size"/>
+        </test>
+        <test expect_num_outputs="3">
+            <conditional name="experiment_design">
+                <param name="selector" value="complex"/>
+                <param name="countsFile">
+                    <collection type="list">
+                        <element name="kallisto_output_01.h5" ftype="h5" value="kallisto_output_01.h5"/>
+                        <element name="kallisto_output_02.h5" ftype="h5" value="kallisto_output_02.h5"/>
+                        <element name="kallisto_output_03.h5" ftype="h5" value="kallisto_output_03.h5"/>
+                        <element name="kallisto_output_04.h5" ftype="h5" value="kallisto_output_04.h5"/>
+                    </collection>
+                </param>
+                <param name="metadata_file" value="design_three_factors.tab"/>
+            </conditional>
+            <section name="advanced_options">
+                <param name="normalization" value="true"/>
+                <param name="nbins" value="100"/>
+                <param name="lwr" value="0.25"/>
+                <param name="upr" value="0.75"/>
+            </section>
+            <output name="sleuth_table" ftype="tabular">
+                <assert_contents>
+                    <has_size value="756310" delta="100"/>
+                    <has_text text="ENST00000394894.8"/>
+                    <has_text text="ENST00000524187.1"/>
+                </assert_contents>
+            </output>
+            <output name="pca_plot" file="test03_pca.pdf" ftype="pdf" compare="sim_size"/>
+            <output name="density_plot" file="test03_density.pdf" ftype="pdf" compare="sim_size"/>
+        </test>
     </tests>
     <help><![CDATA[
 
@@ -196,8 +225,9 @@
             filename_04.fastq.gz	condition2	replicate2
 
 
-The tabular file **requires to have the same column names** as the example (data_file, condition, sample). The data file column correspond to original FASTQ filenames uploaded to Galaxy. 
-Condition includes the information about the first factor, and sample includes information about the second factor. **Only alphanumeric characters, undescores and dots are allowed**.
+The tabular file **requires to have at least three columns with the same names as the previous example** (path, condition, sample). The path column correspond to original FASTQ filenames uploaded to Galaxy. 
+Condition includes the information about the first factor, and sample includes information about the second factor. **Only alphanumeric characters, undescores and dots are allowed**. 
+Additional factors can be included in the design table.
 
     ]]></help>
     <expand macro="citations" />
--- a/test-data/design.tab	Wed Jun 07 11:47:30 2023 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-sample	condition	data_filename
-CAM_01	CAM	kallisto_output_01.h5
-CAM_02	CAM	kallisto_output_02.h5
-reC3_01	reC3	kallisto_output_03.h5
-reC3_02	reC3	kallisto_output_04.h5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/design_three_factors.tab	Thu Jun 08 19:57:53 2023 +0000
@@ -0,0 +1,5 @@
+sample	condition	path	colour
+CAM_01	CAM	kallisto_output_01.h5	blue
+CAM_02	CAM	kallisto_output_02.h5	green
+reC3_01	reC3	kallisto_output_03.h5	yellow
+reC3_02	reC3	kallisto_output_04.h5	blue
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/design_two_factors.tab	Thu Jun 08 19:57:53 2023 +0000
@@ -0,0 +1,5 @@
+sample	condition	path
+CAM_01	CAM	kallisto_output_01.h5
+CAM_02	CAM	kallisto_output_02.h5
+reC3_01	reC3	kallisto_output_03.h5
+reC3_02	reC3	kallisto_output_04.h5
Binary file test-data/test01_density.pdf has changed
Binary file test-data/test01_pca.pdf has changed
Binary file test-data/test02_density.pdf has changed
Binary file test-data/test02_pca.pdf has changed
Binary file test-data/test03_density.pdf has changed
Binary file test-data/test03_pca.pdf has changed