changeset 1:f8bd7949ab54 draft default tip

planemo upload commit e2e44ba8b45bf21c9bf08e2d5e79a985d2c299c9-dirty
author enis
date Wed, 26 Nov 2025 17:30:55 +0000
parents 8661342f187e
children
files LICENSE README.md Rprofile.R bioconductor.png rstudio_bioconductor_it.xml tool/Rprofile.R tool/bioconductor.png tool/interactive_tool_rstudio_bioconductor.xml
diffstat 8 files changed, 180 insertions(+), 148 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LICENSE	Wed Nov 26 17:30:55 2025 +0000
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2025 Enis Afgan
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README.md	Wed Nov 26 17:30:55 2025 +0000
@@ -0,0 +1,11 @@
+# rstudio_bioconductor_it
+Galaxy Interactive Tool for RStudio with Bioconductor
+
+# Tool update process
+
+1. Update the Docker image via https://github.com/Bioconductor/bioconductor_docker/tree/devel/extensions/galaxy
+2. Once a Docker image is built and available, update the tool XML file to reference the new image version.
+3. Push the updated tool XML file to the ToolShed using the following command:
+   ```
+   planemo shed_update --check_diff --shed_target toolshed
+   ```
--- a/Rprofile.R	Thu May 29 14:27:36 2025 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-library("GalaxyConnector")
-options(encoding = "UTF-8")
-if (interactive()) {
-    message("\n   Welcome to the Galaxy RStudio with Bioconductor Interactive Tool.\n\n Any datasets that you included when starting RStudio are available in ~/galaxy_inputs directory. Any files you place in ~/galaxy_outputs will be available in Galaxy once you stop RStudio. You can use the convenience functions gx_put(), gx_get(), and gx_save() to fetch and place data to your current Galaxy history on demand.\n\n  gx_get(42) - Fetch dataset 42 from your Galaxy history. The file will be available in ~/galaxy_imports folder\n  gx_put('filename') - Push a dataset to Galaxy\n  gx_save() - Save .RHistory, .RData to your Galaxy environment\n\nA number of packages are pre-installed, which you can inspect with the 'installed.packages()' command. To install new packages, you can use the BiocManager package. For example, to install the treeio package, you can use the following command to install it and load it:\n\n  BiocManager::install(\"treeio\")\n  library(treeio)  # Load the treeio package after installation\n")
-}
Binary file bioconductor.png has changed
--- a/rstudio_bioconductor_it.xml	Thu May 29 14:27:36 2025 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-
-<tool id="rstudio_bioconductor_it" tool_type="interactive" name="RStudio" version="4.5.0+3.21" profile="22.01">
-    <icon src="bioconductor.png" />
-    <description>R 4.5.0 with Bioconductor 3.21</description>
-    <requirements>
-        <container type="docker">bioconductor/galaxy-rstudio:RELEASE_3_21</container>
-    </requirements>
-    <entry_points>
-        <entry_point name="RStudio" requires_domain="False" requires_path_in_header_named="X-RStudio-Root-Path">
-            <port>8787</port>
-            <url>/</url>
-        </entry_point>
-    </entry_points>
-    <environment_variables>
-        <environment_variable name="HISTORY_ID" strip="True">${__app__.security.encode_id($rstudio.history_id)}</environment_variable> <!-- FIXME: Warning: The use of __app__ is deprecated and will break backward compatibility in the near future -->
-        <environment_variable name="GALAXY_WEB_PORT">8080</environment_variable>
-        <environment_variable name="GALAXY_URL">$__galaxy_url__</environment_variable>
-        <environment_variable name="DEBUG">true</environment_variable>
-        <environment_variable name="DISABLE_AUTH">true</environment_variable>
-        <environment_variable name="API_KEY" inject="api_key" />
-    </environment_variables>
-    <inputs>
-        <param name="input" multiple="true" type="data" format="data" optional="true" label="Include data into the environment"/>
-    </inputs>
-    <command><![CDATA[
-        #import re
-        echo "[`date`] - Setting up for RStudio as \$(id)." &&
-        ## Match the container user id to the host user/group id if supplied
-        if [ -n "\$USERID" ]; then
-            echo "[`date`] - Setting user id to \$USERID." &&
-            usermod -u "\$USERID" rstudio;
-        fi &&
-        if [ -n "\$GROUPID" ]; then
-            echo "[`date`] - Setting user group to \$GROUPID." &&
-            groupmod -g "\$GROUPID" rstudio;
-        fi &&
-
-        ## This is where GalaxyConnector places files copied from Galaxy
-        mkdir -p /import &&
-        chown rstudio:rstudio /import &&
-        ln -s "/import" /home/rstudio/galaxy_imports &&
-        mkdir -p ./rstudio_outputs && chown rstudio:rstudio ./rstudio_outputs && ln -s "\$PWD/rstudio_outputs" /home/rstudio/galaxy_outputs &&
-
-        echo "[`date`] - Creating Rprofile" &&
-        cp '$__tool_directory__/Rprofile.R' /home/rstudio/.Rprofile &&
-
-        ## Required because of the above usermod command, but before linking the input files
-        chown -R rstudio:rstudio /home/rstudio/ &&
-        chown -R rstudio:rstudio /usr/local/lib/R/library &&
-        chown -R rstudio:rstudio /usr/local/lib/R/doc &&
-
-        #if $input:
-            echo "[`date`] - Linking input files to '/home/rstudio/galaxy_inputs/'" &&
-            mkdir -p /home/rstudio/galaxy_inputs/ &&
-            #for $count, $file in enumerate($input):
-                #set $cleaned_name = str($count + 1) + '_' + re.sub('[^\w\-\.\s]', '_', str($file.element_identifier))
-                echo "[`date`] - Linking '$file' to '/home/rstudio/galaxy_inputs/${cleaned_name}.${file.ext}'" &&
-                ln -sf '$file' '/home/rstudio/galaxy_inputs/${cleaned_name}.${file.ext}' &&
-            #end for
-        #else
-            echo "[`date`] - No input files provided, skipping file linking step." &&
-        #end if
-
-        echo "[`date`] - Starting container processes, including RStudio..." &&
-        /init
-    ]]>
-    </command>
-    <outputs>
-        <data name="rstudio" format="txt" label="RStudio Interactive Tool"></data>
-        <collection name="output_collection" type="list" label="RStudio outputs">
-            <discover_datasets pattern="__name_and_ext__" directory="rstudio_outputs/" assign_primary_output="true" recurse="true"/>
-        </collection>
-    </outputs>
-    <stdio>
-        <exit_code range="129" level="log" description="User shut down the container." />
-    </stdio>
-    <tests>
-        <test expect_num_outputs="1">
-            <param name="mode" value="previous" />
-            <param name="rstudio" value="test.txt" />
-            <param name="run_it" value="true" />
-            <output name="rstudio" file="test.txt" ftype="txt"/>
-        </test>
-    </tests>
-    <help><![CDATA[
-The RStudio Interactive Tool in Galaxy provides a user-friendly interface
-for conducting statistical analysis, visualization, and scripting using the
-R programming language. This tool is ideal for bioinformatics workflows
-involving data exploration, statistical modeling, and custom script
-development within the Galaxy ecosystem.
-
-Use Cases
----------
-- Exploratory data analysis
-- Custom script development
-- Genomic and transcriptomic data visualization
-- Statistical modeling and hypothesis testing
-
-Galaxy Integration Functions
-----------------------------
-
-To facilitate seamless data transfer between RStudio and Galaxy, the
-following built-in functions are available:
-
-Before launching the tool, you can select datasets from your history to include
-in the RStudio environment. This allows you to work with your data directly
-within RStudio without needing to manually transfer files. All files will be
-located in the `~/galaxy_inputs/` directory. Note that files
-mapped from a Galaxy history into RStudio like this are read only.
-
-Any files that you store in the `~/galaxy_outputs/` directory will be
-automatically transferred back to Galaxy when you finish your session and stop
-the RStudio Interactive Tool.
-
-In addition, you can use the following functions within your R session to
-facilitate interactive data transfer. All imported files will be located in the
-`~/galaxy_imports` directory.
-
-**gx_get(history_dataset_number)** – Loads a dataset from your
-Galaxy history into the R environment. Example:
-
-.. code-block:: r
-
-    gx_get(1)
-    df <- read.csv("~/galaxy_imports/1")
-    head(df)
-
-**gx_put("file_name", ["file_type"])** – Saves an R object as a
-new dataset in your Galaxy history. Example:
-
-.. code-block:: r
-
-  gx_put("/home/rstudio/output.csv")
-
-**gx_save("session_name")** – Saves your R script to Galaxy for
-reproducibility. Example:
-
-.. code-block:: r
-
-    gx_save("analysis_script.R")
-
-    ]]></help>
-</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool/Rprofile.R	Wed Nov 26 17:30:55 2025 +0000
@@ -0,0 +1,5 @@
+library("GalaxyConnector")
+options(encoding = "UTF-8")
+if (interactive()) {
+    message("\n   Welcome to the Galaxy RStudio with Bioconductor Interactive Tool.\n\n Any datasets that you included when starting RStudio are available in ~/galaxy_inputs directory. Any files you place in ~/galaxy_outputs will be available in Galaxy once you stop RStudio. You can use the convenience functions gx_put(), gx_get(), and gx_save() to fetch and place data to your current Galaxy history on demand.\n\n  gx_get(42) - Fetch dataset 42 from your Galaxy history. The file will be available in ~/galaxy_imports folder\n  gx_put('filename') - Push a dataset to Galaxy\n  gx_save() - Save .RHistory, .RData to your Galaxy environment\n\nA number of packages are pre-installed, which you can inspect with the 'installed.packages()' command. To install new packages, you can use the BiocManager package. For example, to install the treeio package, you can use the following command to install it and load it:\n\n  BiocManager::install(\"treeio\")\n  library(treeio)  # Load the treeio package after installation\n")
+}
Binary file tool/bioconductor.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool/interactive_tool_rstudio_bioconductor.xml	Wed Nov 26 17:30:55 2025 +0000
@@ -0,0 +1,143 @@
+
+<tool id="interactive_tool_rstudio_bioconductor" tool_type="interactive" name="RStudio" version="4.6.0+3.22" profile="22.01">
+    <icon src="bioconductor.png" />
+    <description>R 4.6.0 with Bioconductor 3.22</description>
+    <requirements>
+        <container type="docker">bioconductor/galaxy-rstudio:RELEASE_3_22</container>
+    </requirements>
+    <entry_points>
+        <entry_point name="RStudio" requires_domain="False" requires_path_in_header_named="X-RStudio-Root-Path">
+            <port>8787</port>
+            <url>/</url>
+        </entry_point>
+    </entry_points>
+    <environment_variables>
+        <environment_variable name="HISTORY_ID" strip="True">${__app__.security.encode_id($rstudio.history_id)}</environment_variable> <!-- FIXME: Warning: The use of __app__ is deprecated and will break backward compatibility in the near future -->
+        <environment_variable name="GALAXY_WEB_PORT">8080</environment_variable>
+        <environment_variable name="GALAXY_URL">$__galaxy_url__</environment_variable>
+        <environment_variable name="DEBUG">true</environment_variable>
+        <environment_variable name="DISABLE_AUTH">true</environment_variable>
+        <environment_variable name="API_KEY" inject="api_key" />
+    </environment_variables>
+    <inputs>
+        <param name="input" multiple="true" type="data" format="data" optional="true" label="Include data into the environment"/>
+    </inputs>
+    <command><![CDATA[
+        #import re
+        echo "[`date`] - Setting up for RStudio as \$(id)." &&
+        ## Match the container user id to the host user/group id if supplied
+        if [ -n "\$USERID" ]; then
+            echo "[`date`] - Setting user id to \$USERID." &&
+            usermod -u "\$USERID" rstudio;
+        fi &&
+        if [ -n "\$GROUPID" ]; then
+            echo "[`date`] - Setting user group to \$GROUPID." &&
+            groupmod -g "\$GROUPID" rstudio;
+        fi &&
+
+        ## This is where GalaxyConnector places files copied from Galaxy
+        mkdir -p /import &&
+        chown rstudio:rstudio /import &&
+        ln -s "/import" /home/rstudio/galaxy_imports &&
+        mkdir -p ./rstudio_outputs && chown rstudio:rstudio ./rstudio_outputs && ln -s "\$PWD/rstudio_outputs" /home/rstudio/galaxy_outputs &&
+
+        echo "[`date`] - Creating Rprofile" &&
+        cp '$__tool_directory__/Rprofile.R' /home/rstudio/.Rprofile &&
+
+        ## Required because of the above usermod command, but before linking the input files
+        chown -R rstudio:rstudio /home/rstudio/ &&
+        chown -R rstudio:rstudio /usr/local/lib/R/library &&
+        chown -R rstudio:rstudio /usr/local/lib/R/doc &&
+
+        #if $input:
+            echo "[`date`] - Linking input files to '/home/rstudio/galaxy_inputs/'" &&
+            mkdir -p /home/rstudio/galaxy_inputs/ &&
+            #for $count, $file in enumerate($input):
+                #set $cleaned_name = str($count + 1) + '_' + re.sub('[^\w\-\.\s]', '_', str($file.element_identifier))
+                echo "[`date`] - Linking '$file' to '/home/rstudio/galaxy_inputs/${cleaned_name}.${file.ext}'" &&
+                ln -sf '$file' '/home/rstudio/galaxy_inputs/${cleaned_name}.${file.ext}' &&
+            #end for
+        #else
+            echo "[`date`] - No input files provided, skipping file linking step." &&
+        #end if
+
+        echo "[`date`] - Starting container processes, including RStudio..." &&
+        /init
+    ]]>
+    </command>
+    <outputs>
+        <data name="rstudio" format="txt" label="RStudio Interactive Tool"></data>
+        <collection name="output_collection" type="list" label="RStudio outputs">
+            <discover_datasets pattern="__name_and_ext__" directory="rstudio_outputs/" assign_primary_output="true" recurse="true"/>
+        </collection>
+    </outputs>
+    <stdio>
+        <exit_code range="129" level="log" description="User shut down the container." />
+    </stdio>
+    <tests>
+        <test expect_num_outputs="1">
+            <param name="mode" value="previous" />
+            <param name="rstudio" value="test.txt" />
+            <param name="run_it" value="true" />
+            <output name="rstudio" file="test.txt" ftype="txt"/>
+        </test>
+    </tests>
+    <help><![CDATA[
+The RStudio Interactive Tool in Galaxy provides a user-friendly interface
+for conducting statistical analysis, visualization, and scripting using the
+R programming language. This tool is ideal for bioinformatics workflows
+involving data exploration, statistical modeling, and custom script
+development within the Galaxy ecosystem.
+
+Use Cases
+---------
+- Exploratory data analysis
+- Custom script development
+- Genomic and transcriptomic data visualization
+- Statistical modeling and hypothesis testing
+
+Galaxy Integration Functions
+----------------------------
+
+To facilitate seamless data transfer between RStudio and Galaxy, the
+following built-in functions are available:
+
+Before launching the tool, you can select datasets from your history to include
+in the RStudio environment. This allows you to work with your data directly
+within RStudio without needing to manually transfer files. All files will be
+located in the `~/galaxy_inputs/` directory. Note that files
+mapped from a Galaxy history into RStudio like this are read only.
+
+Any files that you store in the `~/galaxy_outputs/` directory will be
+automatically transferred back to Galaxy when you finish your session and stop
+the RStudio Interactive Tool.
+
+In addition, you can use the following functions within your R session to
+facilitate interactive data transfer. All imported files will be located in the
+`~/galaxy_imports` directory.
+
+**gx_get(history_dataset_number)** – Loads a dataset from your
+Galaxy history into the R environment. Example:
+
+.. code-block:: r
+
+    gx_get(1)
+    df <- read.csv("~/galaxy_imports/1")
+    head(df)
+
+**gx_put("file_name", ["file_type"])** – Saves an R object as a
+new dataset in your Galaxy history. Example:
+
+.. code-block:: r
+
+  gx_put("/home/rstudio/output.csv")
+
+**gx_save("session_name")** – Saves your R script to Galaxy for
+reproducibility. Example:
+
+.. code-block:: r
+
+    gx_save("analysis_script.R")
+
+    ]]></help>
+</tool>