diff misp.xml @ 0:87f7630ab82f draft default tip

Imported from capsule None
author jjohnson
date Thu, 25 Sep 2014 14:05:16 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/misp.xml	Thu Sep 25 14:05:16 2014 -0400
@@ -0,0 +1,136 @@
+<tool name="MISP: Motif-based Interval Screener with PSSM" id="misp" version="0.1.0">
+  <description>Input one or more motifs, find all hits in peak regions</description>
+  <requirements>
+    <requirement type="package" version="2013-11-28">misp</requirement>
+    <requirement type="package" version="2.19.1">bedtools</requirement>
+  </requirements>
+  <command>
+#if $motifopt.motifopt_select == "upload"
+  #set $motif_db = str($motifopt.motif_file)
+#else
+  #set $motif_db = "\${MISP_DATABASE_PATH}/motif/cistrome.db"
+#end if
+#set $motif_id = str($motifopt.motif_id)
+#if $refGenomeSource.genomeSource == "history":
+  #set $genome_file = $refGenomeSource.ownFile
+#else:
+  #set $genome_file = $refGenomeSource.index.fields.path
+#end if
+bedtools getfasta -fi $genome_file -bed $bedfile -fo out.fasta > /dev/null &amp;&amp;
+misp out.fasta $motif_db $pvalue $motif_id output &amp;> $log  &amp;&amp;
+cat output* > $outputtxt
+  </command>
+  <stdio>
+    <exit_code range="1:" level="fatal" description="Error" />
+  </stdio>
+  <inputs>
+     <param format="bed" name="bedfile" type="data" label="bed file for regions">
+       <validator type="unspecified_build" />
+     </param>
+    <conditional name="refGenomeSource">
+      <param name="genomeSource" type="select" label="Use a built in reference genome or own from your history" help="Built-ins genomes were created using default options">
+        <option value="cached" selected="True">Use a built-in genome</option>
+        <option value="history">Use a genome from history</option>
+      </param>
+      <when value="cached">
+        <param name="index" type="select" label="Select a reference genome" help="If your genome of interest is not listed, contact the Galaxy team">
+          <options from_data_table="all_fasta">
+            <filter type="data_meta" ref="bedfile" key="dbkey" column="1" multiple="True" separator="," />
+            <validator type="no_options" message="No reference build available for selected input" />
+          </options>
+        </param>
+      </when>
+      <when value="history">
+        <param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select the reference genome" />
+      </when>  <!-- history -->
+    </conditional>  <!-- refGenomeSource -->
+     <conditional name="motifopt">
+       <param name="motifopt_select" type="select" label="upload a motif or select from our database.">
+         <option value="upload">Use uploaded motif</option>
+         <option value="database">Use motif in cistrome database.</option>
+       </param>
+       <when value="upload">
+         <param name="motif_file" type="data" label="motif file" />
+         <param name="motif_id" type="text" label="The motif id in uploaded motif file. Or write 'all' to run all motifs in the file." />
+       </when>
+       <when value="database">
+         <param name="motif_id" type="text" label="The motif id in Cistrome motif collection. Or write 'all' to run all motifs in the file." />
+       </when>
+     </conditional>
+     <param name="pvalue" type="float" label="p-value cutoff for the motif screen" value="0.001">
+      	<validator type="in_range" max="1" min="0" message="pvalue is out of range, width has to be between 0 to 1" />
+     </param>
+  </inputs>
+  <outputs>
+     <data format="txt" name="outputtxt" label="MISP hits on ${bedfile.name}"/>
+     <data format="txt" name="log" label="Log of MISP on ${bedfile.name}"/>     
+  </outputs>
+  <tests>
+    <test>
+      <param name="bedfile" type="bed" value="test.bed" dbkey="mm9"/>
+      <param name="genomeSource" value="history" />
+      <param name="ownFile" type="fasta" value="mm9_chr19_part.fasta" dbkey="mm9"/>
+      <param name="motifopt_select" value="upload" />
+      <param name="motif_file" value="misp_motif" />
+      <param name="motif_id" value="M00139" />
+      <param name="pvalue" value="0.001" />
+      <output name="outputtxt" file="misp.hits"/>
+      <output name="log" file="misp.log"/>
+    </test>
+  </tests>
+  <help>
+Given a motif, this tool will find all hits of the motif in specified region.
+
+-----
+
+**Formula**
+
+.. image:: ./static/cistrome_icons/misp_formula.png
+
+-----
+
+**TIP:** The source code of misp is available at bitbucket_
+
+.. _bitbucket: https://bitbucket.org/hanfeisun/misp/overview
+
+
+**TIP:** To check the motif id in our database, click here_
+
+.. _here: http://cistrome.org/motif/
+
+-----
+
+Left to right shoule be:
+
+T
+
+C
+
+G
+
+A
+
+**Example of the format of uploaded motif database.**
+
+M00139
+
+0.667 0.111 0.667 0.01 0.01 0.01 0.01 0.01 0.333 0.01 0.01 0.333 0.444 0.222 0.01 0.01 0.01 0.01
+
+0.01 0.546 0.111 0.97 0.01 0.97 0.01 0.97 0.111 0.01 0.444 0.444 0.536 0.333 0.222 0.111 0.01 0.222
+
+0.01 0.333 0.111 0.01 0.01 0.01 0.97 0.01 0.222 0.01 0.536 0.111 0.01 0.333 0.758 0.556 0.667 0.667
+
+0.313 0.01 0.111 0.01 0.97 0.01 0.01 0.01 0.334 0.97 0.01 0.112 0.01 0.112 0.01 0.323 0.313 0.101
+
+hPDI060
+
+0.01 0.01 0.01 0.625 0.01 0.01
+
+0.97 0.97 0.97 0.01 0.5 0.97
+
+0.01 0.01 0.01 0.01 0.48 0.01
+
+0.01 0.01 0.01 0.355 0.01 0.01
+  </help>
+
+</tool>