diff homer_findMotifsGenome.xml @ 1:3126da33847c draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/homer commit a03582e72f78a25fb4d840a1ec0cb4ef61473bb9"
author iuc
date Sun, 26 Sep 2021 12:29:15 +0000
parents ec974e69e0b5
children a8f207b43f64
line wrap: on
line diff
--- a/homer_findMotifsGenome.xml	Sun Aug 08 11:02:42 2021 +0000
+++ b/homer_findMotifsGenome.xml	Sun Sep 26 12:29:15 2021 +0000
@@ -58,6 +58,14 @@
         #end if
     #end if
 #end if
+#if str( $background.use ) != "none":
+   -bg '$background.bg'
+#end if
+#if str( $background.use ) == "withbg":
+   -keepOverlappingBg
+#else if str( $background.use ) == "chopify":
+   -chopify
+#end if
 -len '$len'
 -S $S
 -mis $mis
@@ -109,13 +117,18 @@
 #elif str( $advanced.homer12.version ) == "homer1":
     -depth '$advanced.homer12.depth'
 #end if
-#if not $nomotif:
-    && cp '${output}'/homerResults.html outputHomer.html
-    && cp -r '${output}' '${html_homer_file.files_path}'
-#end if
-#if not $motif_options.noknown:
-    && cp '${output}'/knownResults.html outputKnown.html
-    && cp -r '${output}' '${html_file.files_path}'
+#if str( $background.use ) == "none":
+    #if not $nomotif:
+        && cp '${output}'/homerResults.html outputHomer.html
+        && cp -r '${output}' '${html_homer_file.files_path}'
+    #end if
+    #if not $motif_options.noknown:
+        && cp '${output}'/knownResults.html outputKnown.html
+        && cp -r '${output}' '${html_file.files_path}'
+    #end if
+#else
+   && cp '${output}'/homerResults.html outputHomer.html
+   && cp -r '${output}' '${html_homer_file.files_path}'
 #end if
         ]]></command>
     <inputs>
@@ -150,6 +163,24 @@
                 <expand macro="mask_size"/>
             </when>
         </conditional>
+        <conditional name="background">
+            <param name="use" type="select" label="Will you use a background model?" >
+                <option value="none" selected="true" >No background model</option>
+                <option value="model" >Background model with regions removed from target Peak file</option>
+                <option value="withbg" >Background model with regions not removed from target Peak file</option>
+                <option value="chopify" >Chop large background model regions to the average size of target Peak file regions</option>
+            </param>
+            <when value="none"></when>
+            <when value="model">
+                <param argument="-bg" type="data" format="bed,encodepeak,tabular" label="Background Peak file"/>
+            </when>
+            <when value="withbg">
+                <param argument="-bg" type="data" format="bed,encodepeak,tabular" label="Background Peak file"/>
+            </when>
+            <when value="chopify">
+                <param argument="-bg" type="data" format="bed,encodepeak,tabular" label="Background Peak file" />
+            </when>
+        </conditional>
         <param argument="-len" type="text" value="8,10,12" label="comma-separated motif lengths" help="values greater 12 may cause the program to run out of memory - in these cases decrease the number of sequences analyzed (-N), or try analyzing shorter sequence regions (i.e. -size 100)">
             <validator type="regex" message="motif lengths must be comma-separated integers without space">^(\d+,)*(\d+)$</validator>
         </param>
@@ -222,6 +253,7 @@
     <outputs>
         <data format="html" name="html_file" from_work_dir="outputKnown.html" label="${tool.name} on ${on_string}: Known motifs">
             <filter>motif_options['noknown'] is False</filter>
+            <filter>background['use'] == "none"</filter>
         </data>
         <data format="html" name="html_homer_file" from_work_dir="outputHomer.html" label="${tool.name} on ${on_string}: De novo motifs">
             <filter>nomotif is False</filter>
@@ -304,6 +336,41 @@
                 </assert_contents>
             </output>
         </test>
+        <!-- background tests -->
+        <test expect_num_outputs="1">
+            <param name="input" value="fake_phix_peaks.bed"/>
+            <conditional name="genome">
+                <param name="source" value="installed"/>
+                <param name="all_fasta_source" value="phiX174"/>
+            </conditional>
+            <conditional name="background">
+                <param name="use" value="withbg" />
+                <param name="bg" value="fake_phix_peaks.subset.bed" />
+            </conditional>
+            <output name="html_homer_file">
+                <assert_contents>
+                    <has_text text="HOXB13/MA0901.2/Jaspar(0.948)"/>
+                    <has_text text="Yeast"/>
+                </assert_contents>
+            </output>
+        </test>
+        <test expect_num_outputs="1">
+            <param name="input" value="fake_phix_peaks.bed"/>
+            <conditional name="genome">
+                <param name="source" value="installed"/>
+                <param name="all_fasta_source" value="phiX174"/>
+            </conditional>
+            <conditional name="background">
+                <param name="use" value="chopify" />
+                <param name="bg" value="fake_phix_peaks.subset.bed" />
+            </conditional>
+            <output name="html_homer_file">
+                <assert_contents>
+                    <has_text text="CCA"/>
+                    <has_text text="YAP5"/>
+                </assert_contents>
+            </output>
+        </test>
     </tests>
     <help><![CDATA[