diff combine.xml @ 20:a9a28e46d54a draft default tip

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
author galaxyp
date Thu, 04 Jul 2024 13:47:49 +0000
parents aad328eb6c0f
children
line wrap: on
line diff
--- a/combine.xml	Wed Apr 19 22:37:46 2023 +0000
+++ b/combine.xml	Thu Jul 04 13:47:49 2024 +0000
@@ -1,25 +1,21 @@
-<tool id="cardinal_combine" name="MSI combine" version="@VERSION@.0">
+<tool id="cardinal_combine" name="MSI combine" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="22.05">
     <description>
         combine several mass spectrometry imaging datasets into one
     </description>
     <macros>
         <import>macros.xml</import>
     </macros>
-    <expand macro="requirements">
-        <requirement type="package" version="3.3.5">r-ggplot2</requirement>
-        <requirement type="package" version="0.12">r-maldiquantforeign</requirement>
-        <requirement type="package" version="1.20">r-maldiquant</requirement>
-    </expand>
+    <expand macro="requirements"/>
     <command detect_errors="exit_code">
     <![CDATA[
         #for $i, $infile in enumerate($infiles):
             #if $infile.ext == 'imzml'
-                ln -s '${infile.extra_files_path}/imzml' infile_${i}.imzML &&
-                ln -s '${infile.extra_files_path}/ibd' infile_${i}.ibd &&
+                cp '${infile.extra_files_path}/imzml' infile_${i}.imzML &&
+                cp '${infile.extra_files_path}/ibd' infile_${i}.ibd &&
             #elif $infile.ext == 'analyze75'
-                ln -s '${infile.extra_files_path}/hdr' infile_${i}.hdr &&
-                ln -s '${infile.extra_files_path}/img' infile_${i}.img &&
-                ln -s '${infile.extra_files_path}/t2m' infile_${i}.t2m &&
+                cp '${infile.extra_files_path}/hdr' infile_${i}.hdr &&
+                cp '${infile.extra_files_path}/img' infile_${i}.img &&
+                cp '${infile.extra_files_path}/t2m' infile_${i}.t2m &&
             #else
                 ln -s '$infile' infile_${i}.RData &&
             #end if
@@ -103,14 +99,8 @@
             get(ls()[ls() != "fileName"])
             }
             msidata_$i = loadRData('infile_${i}.RData')
-            ## keep compatibility with old .RData files:
-            msidata_$i\$column1 = NULL
-            msidata_$i\$column2 = NULL
-            msidata_$i\$column3 = NULL
-            msidata_$i\$column4 = NULL
-            msidata_$i\$column5 = NULL
-            msidata_$i\$combined_sample = NULL
             msidata_$i <- as(msidata_$i, "MSImagingExperiment")
+
         #end if
 
     ## remove duplicated coordinates, otherwise combine will fail
@@ -128,7 +118,6 @@
 ############ 3) Read and process annotation tabular files ######################
 
     #if str($annotation_cond.annotation_tabular) == 'annotation'
-        print("annotations")
 
         ## read annotation tabular, set first two columns as x and y, merge with coordinates dataframe and order according to pixelorder in msidata
         input_annotation = read.delim("annotation_file_${i}.tabular", header = $annotation_cond.tabular_header, stringsAsFactors = FALSE)
@@ -138,7 +127,7 @@
         colnames(msidata_coordinates)[3] = "pixel_index"
 
         annotation_df = merge(msidata_coordinates, input_annotation, by=c("x", "y"), all.x=TRUE)
-        annotation_df_sorted = annotation_df[order(annotation_df\$pixel_index),]## orders pixel according to msidata 
+        annotation_df_sorted = annotation_df[order(annotation_df\$pixel_index),]
         annotation_df_sorted\$pixel_index = NULL
 
         ## extract columnnames from (last) annotation tabular (for QC plot names)
@@ -171,7 +160,7 @@
 
     #elif str( $combine_conditional.combine_method ) == 'automatic_combine':
 
-        ## use name of Galaxy inputfile as sample annotation
+        ## use name of Galaxy input file as sample annotation
         sample_name = character()
         #set escaped_element_identifier = re.sub('[^\w\-\s\[/]]', '_', str($infile.element_identifier))