changeset 0:d09a51507aaf draft

"planemo upload commit 2f1af427fa4c4f2aad53ab94c4cdb51456c66019-dirty"
author tduigou
date Mon, 14 Feb 2022 14:23:00 +0000
parents
children 3ea8aa1e94b4
files rpreport.xml test-data/input_rpSBML.tar test-data/rpreport_output.html
diffstat 3 files changed, 224 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpreport.xml	Mon Feb 14 14:23:00 2022 +0000
@@ -0,0 +1,97 @@
+<tool id="rpreport" name="Pathways HTML Report" version="@TOOL_VERSION@" profile="19.09">
+    <description>Generates HTML report to explore the main characteristics of pathways
+predicted with RetroPath suite</description>
+    <macros>
+        <token name="@TOOL_VERSION@">5.12.1</token>
+    </macros>
+    <requirements>
+        <requirement type="package" version="@TOOL_VERSION@">rptools</requirement>
+    </requirements>
+    <command detect_errors="exit_code"><![CDATA[
+        #if str($input_type_conditional.input_type) == "sbml":
+            cd /tmp &&
+            #set input_folder="tmp_folder"
+            mkdir -p '$input_folder' &&
+            #for $input in $input_type_conditional.input_sbml.keys():
+                ln -sfn $input_type_conditional.input_sbml[$input] '$input_folder/$input';
+            #end for
+            python -m rptools.rpreport -d '$input_folder'
+        #elif str($input_type_conditional.input_type) == "tar":
+            python -m rptools.rpreport '${input_type_conditional.input_tar}'
+        #end if
+        '$html_file.files_path'
+        && cp '$html_file.files_path'/index.html '$html_file'
+    ]]></command>
+    <inputs>
+        <conditional name="input_type_conditional">
+            <param name="input_type" type="select" label="Source SBML format">
+                <option value="tar" selected="True">TAR</option>
+                <option value="sbml">Collection</option>
+            </param>
+            <when value="tar">
+                <param name="input_tar" type="data" format="tar" label="Source SBML" />
+            </when>
+            <when value="sbml">
+                <param name="input_sbml" type="data_collection" format="xml" collection_type="list" label="Source SBML" />
+            </when>
+        </conditional>
+    </inputs>
+    <outputs>
+        <data name="html_file" format="html" label="Pathways HTML Report"/>
+    </outputs>
+    <tests>
+        <test>
+        <!-- test 2: check if identical html output is produced (tar input) --> 
+            <conditional name="input_type_conditional">
+                <param name="input_type" value="tar"/>
+                <param name="input_tar" value="input_rpSBML.tar" />
+            </conditional>
+            <output name="html_file" file="rpreport_output.html" compare="diff"/>
+        </test>
+    </tests>
+    <help><![CDATA[
+rpReport
+=========
+
+Generates HTML pages to explore the main characteristics (thermodynamics,
+fluxes, number of metabolic steps, reaction rule score) of pathways predicted
+with RetroPath suite
+
+
+Input
+-----
+
+Required:
+
+* **source_path**: (string) Path to a tar archive (default) or folder (using '-d' option) containing rpSBML file(s).
+
+Output
+------
+* **output_folder**: (string) Output folder where report file(s) will be generated.
+
+Project Links
+---------------------
+* `GitHub <https://github.com/brsynth/rptools>`_
+
+Version
+----------
+
+5.12.1
+
+Authors
+-------
+
+* **Olivier Telle**
+
+Acknowledgments
+---------------
+
+* Thomas Duigou
+* Joan Hérisson
+
+Licence
+-------
+
+`MIT <https://github.com/brsynth/rptools/blob/master/LICENSE>`_
+    ]]></help>
+</tool>
\ No newline at end of file
Binary file test-data/input_rpSBML.tar has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/rpreport_output.html	Mon Feb 14 14:23:00 2022 +0000
@@ -0,0 +1,127 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <!-- Required meta tags -->
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+
+    <!-- Bootstrap CSS -->
+    <link rel="stylesheet" href="./css/bootstrap.min.css">
+
+    <!-- AG Grid scripts and CSS-->
+    <script src="./js/ag-grid-community.min.noStyle.js"></script>
+    <link rel="stylesheet" href="./css/ag-grid.min.css">
+    <link rel="stylesheet" href="./css/ag-theme-alpine.min.css">
+    <!-- AG Chart scripts -->
+    <script src="./js/ag-charts-community.min.js"></script>
+    <script src="./js/data.js"></script>
+
+    <title>rpReport</title>
+</head>
+
+<body>
+    <div class="container">
+      <div class="row d-print-none">
+        <div class="col">
+          <div id="myGrid" style="width: 100%; height: 400px;" class="ag-theme-alpine"></div>
+        </div>
+      </div>
+      <!-- Selected row(s) only schown on print display -->
+      <div class="row d-none d-print-block">
+        <div class="col">
+          <div id="selectedRowOnPrint" class="table-responsive"></div>
+        </div>
+      </div>
+
+      <div class="row">
+        <div class="col">
+          <p class="h4 bg-light text-center">Pathway details</p>
+        </div>
+      </div>
+      <div class="row gy-2">
+        <div class="col-md-6">
+          <div class="accordion" id="thermodynamic_chart_panel">
+            <div class="accordion-item">
+              <h2 class="accordion-header" id="headingTwo">
+                  <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseTwo">
+                    Thermodynamic profile chart
+                  </button>
+              </h2>
+              <div id="collapseTwo" class="accordion-collapse collapse">
+                <div class="accordion-body">
+                  <!-- Thermodynamique profile chart here -->
+                  <div id="dfG_prime_chart" style="height:300px"></div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+        <div class="col-md-6">
+          <div class="accordion" id="rule_score_chart_panel">
+            <div class="accordion-item">
+              <h2 class="accordion-header" id="headingThree">
+                  <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseThree">
+                    Rule score chart
+                  </button>
+              </h2>
+              <div id="collapseThree" class="accordion-collapse collapse">
+                <div class="accordion-body">
+                  <!-- Pathway rule score chart here -->
+                  <div id="rule_score_chart" style="height:300px"></div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+        <div class="col-md-6">
+          <div class="accordion" id="ec_code_panel">
+            <div class="accordion-item">
+              <h2 class="accordion-header" id="headingOne">
+                <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne">
+                      EC number(s)
+                </button>
+              </h2>
+              <div id="collapseOne" class="accordion-collapse collapse">
+                <div class="accordion-body">
+                  <!-- Retropathway ec_codes list here -->
+                  <div id="ec_code_details"></div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="row d-none" id="comparative_chart_panel">
+        <div class="col">
+          <div class="accordion">
+            <div class="accordion-item">
+              <h2 class="accordion-header" id="headingFour">
+                  <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseFour">
+                    Comparative charts
+                  </button>
+              </h2>
+              <div id="collapseFour" class="accordion-collapse collapse show">
+                <div class="accordion-body">
+                  <!-- Comparative charts here -->
+                  <div class="row">
+                    <div class="col-md-6" id="global_score_compar_chart" style="height:300px"></div>
+                    <div class="col-md-6" id="fba_compar_chart" style="height:300px"></div>
+                    <div class="col-md-6" id="dfg_compar_chart" style="height:300px"></div>
+                    <div class="col-md-6" id="rule_score_compar_chart" style="height:300px"></div>
+                    <div class="col-md-6" id="reactions_nb_compar_chart" style="height:300px"></div>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <script src="./js/main.js"></script>
+
+    <!-- Bootstrap Bundle (includes Popper) -->
+    <script src="./js/bootstrap.bundle.min.js"></script>
+
+</body>
+</html>