diff diffbind.xml @ 17:2605cbdaa7d8 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/diffbind commit 3da34ac6e5b18fd5deacaf31b757aca6bae82251
author iuc
date Fri, 15 Dec 2023 19:39:14 +0000
parents 163688bb8f73
children
line wrap: on
line diff
--- a/diffbind.xml	Wed Nov 18 12:54:07 2020 +0000
+++ b/diffbind.xml	Fri Dec 15 19:39:14 2023 +0000
@@ -1,7 +1,16 @@
-<tool id="diffbind" name="DiffBind" version="2.10.0+galaxy0">
+<tool id="diffbind" name="DiffBind" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description> differential binding analysis of ChIP-Seq peak data</description>
+    <macros>
+        <token name="@TOOL_VERSION@">2.10.0</token>
+        <token name="@VERSION_SUFFIX@">1</token>
+        <token name="@PROFILE@">22.05</token>
+    </macros>
+    <xrefs>
+        <xref type="bio.tools">diffbind</xref>
+        <xref type="bioconductor">diffbind</xref>
+    </xrefs>
     <requirements>
-        <requirement type="package" version="2.10.0">bioconductor-diffbind</requirement>
+        <requirement type="package" version="@TOOL_VERSION@">bioconductor-diffbind</requirement>
         <requirement type="package" version="3.5.1">r-base</requirement>
         <requirement type="package" version="1.20.3">r-getopt</requirement>
         <requirement type="package" version="0.2.20">r-rjson</requirement>
@@ -33,14 +42,14 @@
 
 #for $g in $rep_group:
 
-    #set $peak_files = list()
-    #set $bam_files = list()
-    #set $bam_controls = list()
+    #set $peak_files = dict()
+    #set $bam_files = dict()
+    #set $bam_controls = dict()
 
     #for $file in $g.peaks:
         #set $file_name = str($g.groupName) + "-" + re.sub('[^\w\-]', '_', str($file.element_identifier)) + "-peaks.bed"
         ln -s '${file}' '${file_name}' &&
-        $peak_files.append($file_name)
+        #set $peak_files[str($file.element_identifier)] = str($file_name)
     #end for
 
     #for $bam in $g.bamreads:
@@ -49,11 +58,14 @@
         #set $bam_index = $bam_name + "-bamreads.bai"
         ln -s '${bam}' '${bam_file}' &&
         ln -s '${bam.metadata.bam_index}' '${bam_index}' &&
-        $bam_files.append($bam_file)
+        #set $bam_files[str($bam.element_identifier)] = str($bam_file)
     #end for
 
-    $temp_factor.append( {str($g.groupName): $peak_files} )
-    $temp_factor.append( {str($g.groupName): $bam_files} )
+    #if len($peak_files.keys()) != len($bam_files.keys())
+        >&2 echo "Group $g.groupName: same number of Peak and Bam files needs to be given" && exit 1 &&
+    #end if
+    $temp_factor.append( {str($g.groupName): [f[1] for f in sorted($peak_files.items())]} )
+    $temp_factor.append( {str($g.groupName): [f[1] for f in sorted($bam_files.items())]} )
 
     #if str( $g.bamcontrol ) != 'None':
         #for $ctrl in $g.bamcontrol:
@@ -64,9 +76,12 @@
                 ln -s '${ctrl}' '${ctrl_file}' &&
                 ln -s '${ctrl.metadata.bam_index}' '${ctrl_index}' &&
             #end if
-            $bam_controls.append($ctrl_file)
+            #set $bam_controls[str($ctrl.element_identifier)] = str($ctrl_file)
         #end for
-        $temp_factor.append( {str($g.groupName): $bam_controls} )
+        #if len($peak_files.keys()) != len($bam_files.keys())
+            >&2 echo "Group $g.groupName: same number of Peak and Bam control files needs to be given" && exit 1 &&
+        #end if
+        $temp_factor.append( {str($g.groupName): [f[1] for f in sorted($bam_controls.items())]} )
     #end if
 
 #end for
@@ -305,6 +320,11 @@
 be associated with each peakset (one for the ChIP data, and optionally another representing
 a control sample)
 
+Inputs for a group will be sorted by identifier before processing. For each group the corresponding
+sets of peak and BAM files need to be provided. Ideally this is accomplished by providing the data in
+collections.
+
+
 **Groups**
 
 You have to specify the name of the Group and the peak and BAM files for the two Groups you want to compare (e.g Resistant and Responsive) in the tool form above.