# HG changeset patch
# User kpbioteam
# Date 1559912246 14400
# Node ID fef50103f6b3a90daca065ae2d3872a4d35a3422
# Parent  9c6fbb7d5a2a7b501f3a3403ed2470553bafb518
planemo upload for repository https://github.com/kpbioteam/ewas_galaxy commit 945cecdba6528d35c6dfa866f785f182c5dd22ed

diff -r 9c6fbb7d5a2a -r fef50103f6b3 minfi_read450k.xml
--- a/minfi_read450k.xml	Mon May 20 07:14:26 2019 -0400
+++ b/minfi_read450k.xml	Fri Jun 07 08:57:26 2019 -0400
@@ -4,22 +4,20 @@
         <requirement type="package" version="1.24.0">bioconductor-minfi</requirement>
     </requirements>
     <command detect_errors="exit_code"><![CDATA[
-      #for $counter, $file in enumerate($files_red):
-        ln -s $file ./${counter+1}_Red.idat &&
+      #for $counter, $input in enumerate($files_red):
+        #set $redname = str( getattr( $input, 'element_identifier', 'sample' ) ).replace( "/", '-' ).replace( "\t", "-" )
+        ln -s $input ./${redname} &&
       #end for
-      #for $counter, $file in enumerate($files_grn):
-            ln -s $file ./${counter+1}_Grn.idat &&
+      #for $counter, $input in enumerate($files_grn):
+        #set $grnname = str( getattr( $input, 'element_identifier', 'sample' ) ).replace( "/", '-' ).replace( "\t", "-" )
+        ln -s $input ./${grnname} &&
       #end for
       Rscript '$read_idat_script'
       ]]></command>
       <configfiles>
       <configfile name="read_idat_script"><![CDATA[
         require("minfi", quietly = TRUE)
-        files<-list()
-        #for $counter, $input in enumerate($files_red):
-        files['${counter+1}'] <- '${counter+1}'
-        #end for
-        out <- read.metharray(files)
+        out <- read.metharray(list.files(pattern="_Red.idat"))
         save(out, file = '$RGChannelSet')
         ]]> </configfile>
         </configfiles>
@@ -33,12 +31,12 @@
              <tests>
         <test>
             <param name="files_red" value="GSM1588707_8795207119_R06C02_Red.idat,GSM1588706_8795207135_R02C02_Red.idat,GSM1588705_8795207119_R05C02_Red.idat,GSM1588704_8795207135_R01C02_Red.idat" ftype="idat"/>
-            <param name="files_grn" value="GSM1588707_8795207119_R06C02_Grn.idat,GSM1588706_8795207135_R02C02_Grn.idat,SM1588705_8795207119_R05C02_Grn.idat,GSM1588704_8795207135_R01C02_Grn.idat" ftype="idat"/>
+            <param name="files_grn" value="GSM1588707_8795207119_R06C02_Grn.idat,GSM1588706_8795207135_R02C02_Grn.idat,GSM1588705_8795207119_R05C02_Grn.idat,GSM1588704_8795207135_R01C02_Grn.idat" ftype="idat"/>
             <output name="RGChannelSet" file="RGChannelSet.rdata"/>
         </test>
     </tests>
     <help><![CDATA[
-The tool load the binary 450K array “IDAT” raw files generated by the Illumina Scanner. In addition to the methylated and an unmethylated intensity values for each 450,000 CpG positions, IDAT file contains some extra info such as control probes.
+The tool loads the binary 450K array “IDAT” raw files generated by the Illumina Scanner. In addition to the methylated and an unmethylated intensity values for each 450,000 CpG positions, IDAT file contains some extra info such as control probes.
 
 ]]></help>
     <citations>