changeset 2:45e094f8858f

Add SitePro tool
author Jim Johnson <jj@umn.edu>
date Mon, 15 Dec 2014 15:31:58 -0600
parents 0476ee45d253
children f404ec7f679c
files sitepro.xml
diffstat 1 files changed, 171 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sitepro.xml	Mon Dec 15 15:31:58 2014 -0600
@@ -0,0 +1,171 @@
+<tool id="ceas_sitepro" name="SitePro: Score profile near Intervals" version="0.1.0">
+  <description>Draw the score profile near a given interval</description>
+  <macros>
+    <import>ceas_macros.xml</import>
+  </macros>
+  <expand macro="requirements" />
+  <command>
+sitepro 
+#if $mode.mode_select == "single"
+ -w $mode.wfile -b $mode.bfile 
+#elif $mode.mode_select == "multiwig"
+ -w $mode.wfile -l $mode.label 
+ #for $m in $mode.more
+  -w "$m.wig" -l "$m.label"
+ #end for
+ -b $mode.bfile
+#elif $mode.mode_select == "multibed"
+ -w $mode.wfile -b $mode.bfile -l $mode.label 
+ #for $m in $mode.more
+  -b "$m.bfile" -l "$m.label"
+ #end for
+#end if
+--span=$span --pf-res=$pfres --name=$name --dump &amp;> $log  
+cat *_dump.txt > $dump
+  </command>
+  <inputs>
+    <param name="name" type="hidden" value="sitepro_out"/>
+    <conditional name="mode">
+      <param name="mode_select" type="select" label="Sitepro behaviour mode" force_select="true">
+	<option value="single"> 1 wiggle vs 1 BED file</option>
+	<option value="multiwig"> multiple wiggle vs 1 BED</option>
+	<option value="multibed"> multiple BED vs 1 wiggle</option>
+      </param>
+
+      <when value="single">
+	<param ftype="wig" name="wfile" type="data" label="Wiggle file"/>
+	<param ftype="bed" name="bfile" type="data" label="BED file(100,000 lines max)"/>
+      </when>
+
+      <when value="multiwig">
+	<param format="wig" name="wfile" type="data" label="Wiggle file"/>
+	<param name="label" type="text" label="Wiggle label" optional="false" />
+	<repeat name="more" title="wiggle file">
+	  <param format="wig" name="wig" type="data" label="Select another wiggle file"/>
+	  <param name="label" type="text" label="Wiggle label"  optional="false" />
+	</repeat>
+	<param format="bed" name="bfile" type="data"
+	label="BED file"/>
+      </when>
+
+      <when value="multibed">
+	<param format="bed" name="bfile" type="data" label="BED file(100,000 lines max)"/>
+	<param name="label" type="text" label="BED label" optional="false" />
+	<repeat name="more" title="BED file">
+	  <param format="bed" name="bfile" type="data" label="Select another BED file(100,000 lines max)"/>
+	  <param name="label" type="text" label="BED label"  optional="false" />
+	</repeat>
+	<param format="wig" name="wfile" type="data" label="Wiggle file"/>
+      </when>
+
+    </conditional>
+
+    <param name="span" type="integer" label="Span" value="1000">
+    	<validator type="in_range" max="1000000" min="100" message="Span is out of range, Span has to be between 100 to 1000000" />
+    </param>	
+    <param name="pfres" type="integer" label="Profiling Resolution" value="50">
+    	<validator type="in_range" max="1000" min="10" message="Profiling Resolution is out of range, Profiling Resolution has to be between 10 to 1000" />
+    </param>	
+  </inputs>
+  <outputs>
+    <data name="output" format="pdf" from_work_dir="sitepro_out.pdf"/>
+    <data name="log" format="txt" label="sitepro job log" />
+    <data name="dump" format="txt" label="txt file with profiles" />
+  </outputs>
+<tests>
+  <test maxseconds="3600" name="Sitepro_1">
+    <param name="mode_select" value="single" />
+    <param name="wfile" value="treatment.wig" />
+    <param name="bfile" value="peaks.bed" />
+    <param name="span" value="1000" />
+    <param name="pfres" value="50" />
+    <output name="output" file="sitepro_1/sitepro_1.pdf" />
+    <output name="output" file="sitepro_1/sitepro_1.log" lines_diff = "200" />
+    <output name="output" file="sitepro_1/sitepro_1_dump.txt" />
+    <output name="log">
+        <assert_contents>
+          <has_text_matching expression="See sitepro_out.pdf for the graphical result of sitepro" />
+        </assert_contents>
+    </output>
+  </test>
+</tests>
+  <help>
+This tool draws the average score profile around given genomic
+sites. It's a module in CEAS package which is written by Hyunjin Gene
+Shin, published in Bioinformatics (pubmed id:19689956).
+
+.. class:: infomark
+
+**TIP #1:** If your query does not apper in the pulldown menu for BED Files, please convert your interval files to BED format.
+
+.. class:: infomark
+
+**TIP #2:** You can't use multiple BED files *AND* multiple Wiggle files as input. 
+
+.. class:: infomark
+
+**TIP #3:** The tool can be used to check the signals of your ChIP
+sample around certain regions such as Transcription Start Sites, or
+Transcription Factor Binding Sites.
+
+.. class:: warningmark
+
+**NEED IMPROVEMENT**
+
+-----
+
+**Parameters**
+
+- **Sitepro behaviour mode** can only be '1 wiggle file against 1 BED
+  file', or 'multiple wiggle files against 1 BED file', or '1 wiggle
+  file against multiple BED files'.
+- **Wiggle label** When 'multi wiggle' mode is selected, you need to assign the labels for every wiggle files which will be shown in the final figure.
+- **BED label** When 'multi BED' mode is selected, you need to assign the labels for every BED files which will be shown in the final image.
+- **Span** is the distance from the center of each BED region in both directions(+/-) (eg, [c - span, c + span], where c is the center of a region).
+- **Profiling resolution** is the resolution to bin the scores in the final image.
+
+-----
+
+**script parameter list of Sitepro**
+
+Options:
+  --version             show program's version number and exit
+  -h, --help            Show this help message and exit.
+  -w WIG, --wig=WIG     input WIG file. WARNING: both fixedStep and
+                        variableStep WIG formats are accepted. Multiple WIG
+                        files can be given via -w (--wig) individually (eg -w
+                        WIG1.wig, -w WIG2.wig). WARNING! multiple wig and bed
+                        files are not allowed.
+  -b BED, --bed=BED     BED file of regions of interest. (eg, binding sites or
+                        motif locations) Multiple BED files can be given via
+                        -b (--bed) individually (eg -b BED1.bed -b BED2.bed).
+                        WARNING! multiple wig and bed files are not allowed.
+  --span=SPAN           Span from the center of each BED region in both
+                        directions(+/-) (eg, [c - span, c + span], where c is
+                        the center of a region), default:1000 bp
+  --pf-res=PF_RES       Profiling resolution, default: 50 bp
+  --dir                 If set, the direction (+/-) is considered in
+                        profiling. If no strand info given in the BED, this
+                        option is ignored.
+  --dump                If set, profiles are dumped as a TXT file
+  --name=NAME           Name of this run. If not given, the body of the bed
+                        file name will be used,
+  -l LABEL, --label=LABEL
+                        Labels of the wig files. If given, they are used as
+                        the legends of the plot and in naming the TXT files of
+                        profile dumps; otherwise, the WIG file names will be
+                        used as the labels. Multiple labels can be given via
+                        -l (--label) individually (eg, -l LABEL1 -l LABEL2).
+                        WARNING! The number and order of the labels must be
+                        the same as the WIG files.
+
+-----
+
+**Output**
+
+- **PDF** format file.
+- Dumped signals within given intervals in **plain text**.
+
+  </help>
+
+</tool>