changeset 18:2948554ae3d7 draft default tip

added nmeme option
author kevyin
date Thu, 22 Nov 2012 20:27:29 -0500
parents 5bb9eb050e57
children
files README meme_chip_wrapper.xml tool-data/meme_chip_motifs.loc.sample tool_data_table_conf.xml.sample tool_dependencies.xml
diffstat 5 files changed, 292 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README	Thu Nov 22 20:27:29 2012 -0500
@@ -0,0 +1,40 @@
+Meme-chip wrapper for Galaxy
+
+=========================================:
+========Installation instructions========:
+=========================================:
+The tool_dependencies.xml can attempt to install meme in a folder specific for this tool.
+(such as bwa_wrappers)
+
+The procedure does NOT download motif databases you will need to download them yourself
+
+Meme-chip assumes the meme tools are in PATH.
+Make sure meme is accessible
+
+
+========Tool data table conf========
+Check the meme_chip_motifs entry is in tool_data_table_conf.xml
+
+========Tool loc file========
+
+Example in tool-data/meme_chip_motifs.loc.sample
+Entries come from the motif_db.csv in the motif database folder
+
+make sure:
+- 3 cols
+- tab delimited
+- paths are correct
+
+There is a script to convert the csv to the loc format here:
+https://bitbucket.org/gvl/meme-chip/src
+After running delete the loc entries with multiple paths eg. All Vertebrates
+
+
+=========================================:
+LICENSE for this wrapper: 
+=========================================:
+Kevin Ying
+Garvan Institute: http://www.garvan.org.au
+GVL: https://genome.edu.au/wiki/GVL
+
+http://opensource.org/licenses/mit-license.php
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/meme_chip_wrapper.xml	Thu Nov 22 20:27:29 2012 -0500
@@ -0,0 +1,194 @@
+<tool id="meme_chip_wrapper" name="meme-chip" version="1.2.4">
+    <requirements>
+        <requirement type="package" version="4.9.0">meme</requirement>
+    </requirements>
+    <description></description>
+    <version_command>echo "MEME version r4.9.0"</version_command>
+    <command> meme-chip $input_file -o ${memechip_out.files_path} 
+        #for p in str.split($motif_dbs.fields.path,","):
+            -db $p
+        #end for
+
+        #if str( $options_type.options_type_selector ) == 'advanced':
+            #if str( $options_type.bg_type.bg_type_selector) == 'bg_user':
+                -bfile "${ str( $options_type.bg_type.bfile ) }"
+            #end if
+            
+            #if str( $options_type.nmeme) != '-1':
+                -nmeme "${ str( $options_type.nmeme ) }"
+            #end if
+
+            #if str( $options_type.ccut ) != '-1':
+                -ccut "${ str( $options_type.ccut ) }"
+            #end if
+
+            #if str( $options_type.time ) != '-1':
+                -time "${ str( $options_type.time ) }"
+            #end if
+
+            -desc "${ str( $options_type.desc ) }"
+            
+            #if str( $options_type.meme_mod ) != '':
+                -meme-mod "${ str($options_type.meme_mod) }"
+            #end if
+
+            #if str( $options_type.meme_minw ) != '-1':
+                -meme-minw "${ str($options_type.meme_minw) }"
+            #end if
+
+            #if str( $options_type.meme_maxw ) != '-1':
+                -meme-maxw "${ str($options_type.meme_maxw) }"
+            #end if
+
+            #if str( $options_type.meme_nmotifs ) != '-1':
+                -meme-nmotifs "${ str($options_type.meme_nmotifs) }"
+            #end if
+
+            #if str( $options_type.meme_minsites ) != '-1':
+                -meme-minsites "${ str($options_type.meme_minsites) }"
+            #end if
+
+            #if str( $options_type.meme_maxsites ) != '-1':
+                -meme-maxsites "${ str($options_type.meme_maxsites) }"
+            #end if
+
+            #if $options_type.meme_pal:
+                -meme-pal "${ str($options_type.meme_pal) }"
+            #end if
+            
+            #if str( $options_type.dreme_e ) != '-1.0':
+                -dreme-e "${ str($options_type.dreme_e) }"
+            #end if
+
+            #if str( $options_type.dreme_m ) != '-1':
+                -dreme-m "${ str($options_type.dreme_m) }"
+            #end if
+
+            #if str($options_type.centrimo_score) != '-1.0':
+                -centrimo-score "${ str($options_type.centrimo_score) }"
+            #end if
+
+            #if str( $options_type.centrimo_maxreg ) != '-1':
+                -centrimo-maxreg "${ str($options_type.centrimo_maxreg) }"
+            #end if
+
+            #if str( $options_type.centrimo_ethresh ) != '-1.0':
+                -centrimo-ethresh "${ str($options_type.centrimo_ethresh) }"
+            #end if
+
+            #if $options_type.centrimo_noseq:
+                -centrimo-noseq 
+            #end if
+
+        #end if
+        <!--pipe stderr to stdout because of annoying log4perl warnings. Error when exit status-->
+        2&gt;&amp;1 || echo "Error running MEME."
+        <!--&amp;&amp; mv ${html_outfile.files_path}/index.html ${html_outfile}-->
+        <!--&amp;&amp; zip -r result $html_outfile.files_path-->
+        &amp;&amp; cd ${memechip_out.files_path} 
+        &amp;&amp; zip -rp memechip_out ./
+        &amp;&amp; mv memechip_out.zip ${memechip_out}
+    </command>
+    <inputs>
+        <param format="fasta" name="input_file" type="data" label="Sequences in fasta format" />
+        <param name="motif_dbs" label="MEME Motif databases" type="select" multiple="true" display="checkboxes" help="Use CTRL to select multiple databases">
+            <options from_data_table="meme_chip_motifs">
+                <filter type="sort_by" column="1"/>
+                <validator type="no_options" message="No indexes are available for the selected dataset"/>
+            </options>
+          
+        </param>
+        <param name="non_commercial_use" label="I certify that I am not using this tool for commercial purposes." type="boolean" truevalue="NON_COMMERCIAL_USE" falsevalue="COMMERCIAL_USE" checked="True">
+            <validator type="expression" message="This tool is only available for non-commercial use.">value == True</validator>
+        </param>
+        <conditional name="options_type">
+            <param name="options_type_selector" type="select" label="Options Configuration">
+                <option value="basic" selected="true">Basic</option>
+                <option value="advanced">Advanced</option>
+            </param>
+            <when value="basic">
+            <!-- do nothing here -->
+            </when>
+            <when value="advanced">
+                <!--bfile-->
+                <conditional name="bg_type">
+                    <param name="bg_type_selector" type="select" label="Custom background">
+                        <option value="bg_default" selected="True">Default Background</option>
+                        <option value="bg_user">Background in your History</option>
+                    </param>
+                    <when value="bg_default">
+                        <!--do nothing here-->
+                    </when>
+                    <when value="bg_user">
+                        <param name="bfile" type="data" label="-bfile: Background File" />
+                    </when>
+                </conditional>
+                <!--nmeme-->
+                <param name="nmeme" type="integer" value="-1" label="-nmeme: limit of sequences to pass to MEME; -1: Default behaviour" />
+                <!--ccut-->
+                <param name="ccut" type="integer" value="-1" label="-ccut: Max size of a seq before it is cut down; 0: do not cut; -1: Default behaviour" />
+                <!--tine-->
+                <param name="time" type="integer" value="-1" label="-time: Maximum time (minutes) that this program has to run and create output in; -1: no limit" />
+                <!--desc-->
+                <param name="desc" type="text" value="Galaxy MEME-Chip" label="-desc: Description of the analysis" >
+                    <sanitizer>
+                      <valid initial="string.printable">
+                        <remove value="&apos;"/>
+                      </valid>
+                      <mapping initial="none">
+                        <add source="&apos;" target=""/>
+                      </mapping>
+                    </sanitizer>
+                </param>
+                <!--MEME options-->
+                <param name="meme_mod" type="select" label="-meme-mod: Sites used in a single sequence" >
+                    <option value="" selected="True"/>
+                    <option value="oops" />
+                    <option value="zoops" />
+                    <option value="anr" />
+                </param>
+                <param name="meme_minw" type="integer" value="-1" label="-meme-minw: minimum motif width; -1: Default behaviour" />
+                <param name="meme_maxw" type="integer" value="-1" label="-meme-maxw: maximum motif width; -1: Default behaviour" />
+                <param name="meme_nmotifs" type="integer" value="-1" label="-meme-nmotifs: maximum number of motifs to find; -1: Default behaviour" />
+                <param name="meme_minsites" type="integer" value="-1" label="-meme-minsites: minimum number of sites per motif; -1: Default behaviour" />
+                <param name="meme_maxsites" type="integer" value="-1" label="-meme-maxsites: maximum number of sites per motif; -1: Default behaviour" />
+                <param name="meme_pal" type="boolean" label="-meme-pal: look for palindromes only" />
+                <!--DREME options-->
+                <param name="dreme_e" type="float" value="-1" label="-dreme-e: stop searching after reaching this E-value threshold; -1: Default behaviour" />
+                <param name="dreme_m" type="integer" value="-1" label="-dreme-e: stop searching after finding this many motifs; -1: Default behaviour" />
+                <!--CentriMo options-->
+                <param name="centrimo_score" type="float" value="-1" label="-centrimo-score: set the minimum allowed match score; -1: Default behaviour" />
+                <param name="centrimo_maxreg" type="integer" value="-1" label="-centrimo-maxreg: set the maximum region size to be considered; -1: Default behaviour" />
+                <param name="centrimo_ethresh" type="float" value="-1" label="-centrimo-ethresh: set the E-value threshold for reporting; -1: Default behaviour" />
+                <param name="centrimo_noseq" type="boolean" label="-centrimo-noseq: don't store sequence IDs in the output" />
+
+            </when>
+        </conditional>
+    </inputs>
+    <outputs>
+        <!--<data format="html" name="html_outfile" label="index" />-->
+        <!--<data format="html" hidden="True" name="html_outfile" label="index.html" />-->
+        <data format="zip" name="memechip_out" label="SAVE ME ${tool.name} on #echo os.path.splitext(str($input_file.name))[0]#.zip" />
+    </outputs>
+
+
+    <tests>
+        <test>
+            <param name="input_file" value="extract_genomic_dna.fa" />
+            <output name="html_file" file="sample_output.html" ftype="html" />
+        </test>
+    </tests>
+
+    <help>
+
+        .. class:: infomark
+
+        After the job finishes, save the zip file, unzip and open "index.html"
+
+        The actual meme-chip command is displayed under "Command line summary"
+
+        Defaults:
+        http://meme.nbcr.net/meme/doc/meme-chip.html
+
+    </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/meme_chip_motifs.loc.sample	Thu Nov 22 20:27:29 2012 -0500
@@ -0,0 +1,31 @@
+# value name path
+JASPAR CORE	JASPAR CORE	/home/kevyin/bin/meme/db/motif_databases/JASPAR_CORE_2009.meme
+JASPAR CORE vertebrates	JASPAR CORE vertebrates	/home/kevyin/bin/meme/db/motif_databases/JASPAR_CORE_2009_vertebrates.meme
+JASPAR CORE fungi	JASPAR CORE fungi	/home/kevyin/bin/meme/db/motif_databases/JASPAR_CORE_2009_fungi.meme
+JASPAR CORE insects	JASPAR CORE insects	/home/kevyin/bin/meme/db/motif_databases/JASPAR_CORE_2009_insects.meme
+JASPAR CORE nematodes	JASPAR CORE nematodes	/home/kevyin/bin/meme/db/motif_databases/JASPAR_CORE_2009_nematodes.meme
+JASPAR CORE plants	JASPAR CORE plants	/home/kevyin/bin/meme/db/motif_databases/JASPAR_CORE_2009_plants.meme
+JASPAR CORE urochordates	JASPAR CORE urochordates	/home/kevyin/bin/meme/db/motif_databases/JASPAR_CORE_2009_urochordates.meme
+JASPAR PHYLOFACTS	JASPAR PHYLOFACTS	/home/kevyin/bin/meme/db/motif_databases/JASPAR_PHYLOFACTS_2008.meme
+JASPAR FAM	JASPAR FAM	/home/kevyin/bin/meme/db/motif_databases/JASPAR_FAM_2008.meme
+JASPAR POLII	JASPAR POLII	/home/kevyin/bin/meme/db/motif_databases/JASPAR_POLII_2008.meme
+JASPAR CNE	JASPAR CNE	/home/kevyin/bin/meme/db/motif_databases/JASPAR_CNE_2008.meme
+JASPAR SPLICE	JASPAR SPLICE	/home/kevyin/bin/meme/db/motif_databases/JASPAR_SPLICE_2008.meme
+UniPROBE/BEEML-PBM (Zhao and Stormo 2011)	UniPROBE/BEEML-PBM (Zhao and Stormo 2011)	/home/kevyin/bin/meme/db/motif_databases/zhao2011.meme
+Human and Mouse (Jolma2010)	Human and Mouse (Jolma2010)	/home/kevyin/bin/meme/db/motif_databases/jolma2010.meme
+Human and Mouse (MacIsaac THEME)	Human and Mouse (MacIsaac THEME)	/home/kevyin/bin/meme/db/motif_databases/macisaac_theme.v1.meme
+Prokaryotes (Prodoric Release 8.9)	Prokaryotes (Prodoric Release 8.9)	/home/kevyin/bin/meme/db/motif_databases/prodoric.meme
+Prokaryotes (RegTransBase v4)	Prokaryotes (RegTransBase v4)	/home/kevyin/bin/meme/db/motif_databases/regtransbase.meme
+Drosophila (FLYREG; Bergman & Pollard v2)	Drosophila (FLYREG; Bergman & Pollard v2)	/home/kevyin/bin/meme/db/motif_databases/flyreg.v2.meme
+Drosophila (DMMPMM; Kulakovskiy et al. 2009)	Drosophila (DMMPMM; Kulakovskiy et al. 2009)	/home/kevyin/bin/meme/db/motif_databases/dmmpmm2009.meme
+Drosophila (iDMMPMM; Kulakovskiy et al. 2009)	Drosophila (iDMMPMM; Kulakovskiy et al. 2009)	/home/kevyin/bin/meme/db/motif_databases/idmmpmm2009.meme
+Homeodomains (Berger et al.)	Homeodomains (Berger et al.)	/home/kevyin/bin/meme/db/motif_databases/homeodomain.meme
+Mouse (UniPROBE)	Mouse (UniPROBE)	/home/kevyin/bin/meme/db/motif_databases/uniprobe_mouse.meme
+Mouse (Chen2008)	Mouse (Chen2008)	/home/kevyin/bin/meme/db/motif_databases/chen2008.meme
+ETS factors (Wei et al. 2010)	ETS factors (Wei et al. 2010)	/home/kevyin/bin/meme/db/motif_databases/wei2010*.meme
+E. coli (DPINTERACT)	E. coli (DPINTERACT)	/home/kevyin/bin/meme/db/motif_databases/dpinteract.meme
+GLIs and TCF7L2/TCF4 (Hallikas et al. 2006)	GLIs and TCF7L2/TCF4 (Hallikas et al. 2006)	/home/kevyin/bin/meme/db/motif_databases/hallikas2006.meme
+Worm (UniPROBE)	Worm (UniPROBE)	/home/kevyin/bin/meme/db/motif_databases/uniprobe_worm.meme
+Malaria (Campbell et al. 2010)	Malaria (Campbell et al. 2010)	/home/kevyin/bin/meme/db/motif_databases/campbell2010_malaria_pbm.meme
+Yeast (MacIsaac v1)	Yeast (MacIsaac v1)	/home/kevyin/bin/meme/db/motif_databases/macisaac_yeast.v1.meme
+Yeast (SCPD)	Yeast (SCPD)	/home/kevyin/bin/meme/db/motif_databases/scpd_matrix.meme
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.sample	Thu Nov 22 20:27:29 2012 -0500
@@ -0,0 +1,8 @@
+<!-- Location of meme-chip files -->
+<tables>
+      <table name="meme_chip_motifs" comment_char="#">
+          <columns>value, name, path</columns>
+          <file path="tool-data/meme_chip_motifs.loc" />
+      </table>
+</tables>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml	Thu Nov 22 20:27:29 2012 -0500
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<tool_dependency>
+  <package name="meme" version="4.9.0">
+    <install version="1.0">
+      <actions>
+        <action type="download_by_url">ftp://ftp.ebi.edu.au/pub/software/MEME/r4.9.0/rc5/meme_4.9.0.tar.gz</action>
+        <action type="shell_command">./configure --prefix=$INSTALL_DIR</action>
+        <action type="shell_command">make</action>
+        <action type="shell_command">make install</action>
+        <action type="set_environment">
+          <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/bin</environment_variable>
+        </action>
+      </actions>
+    </install>
+    <readme>
+      Skeleton file for meme install. Does not actually install meme.
+    </readme>
+  </package>
+</tool_dependency>