Mercurial > repos > jetbrains > zinbra
changeset 0:5f97f28e65ca
Initial commit
author | Oleg Shpynov <oleg.shpynov@gmail.com> |
---|---|
date | Tue, 27 Oct 2015 14:20:42 +0300 |
parents | |
children | 8cbb06892b62 |
files | README.md tool_dependencies.xml zinbra.py zinbra.xml |
diffstat | 4 files changed, 123 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.md Tue Oct 27 14:20:42 2015 +0300 @@ -0,0 +1,41 @@ +Galaxy Applications +================= + +Quick setup +------------ + +* Download local copy of [galaxy](https://wiki.galaxyproject.org/Admin/GetGalaxy) +* Checkout latest release: `git checkout release_15.01` +* Create `config/galaxy.ini` as a copy of `config/galaxy.ini.sample` +* Configure `tools_config_file`, `check_migrate_tools` properties +* Minimal `tool_conf.xml` +``` + <?xml version='1.0' encoding='utf-8'?> + <toolbox> + <section id="getext" name="Get Data"> + <tool file="data_source/upload.xml" /> + <tool file="data_source/ucsc_tablebrowser.xml" /> + <tool file="data_source/ebi_sra.xml" /> + <tool file="data_source/biomart.xml" /> + </section> + <section id="jetbrains" name="JetBrains tools"> + <tool file="<PATH_TO_TOOLS>tools.xml" /> + </section> + </toolbox> +``` + +Useful links +------------ +* Galaxy + * [Develop apps](https://wiki.galaxyproject.org/Develop) + * [Add tool tutorial](https://wiki.galaxyproject.org/Admin/Tools/AddToolTutorial) + * [Tool config format](https://wiki.galaxyproject.org/Admin/Tools/ToolConfigSyntax) + * [Quick reStructured text](http://docutils.sourceforge.net/docs/user/rst/quickref.html) + * [Main tools Shed resource](https://toolshed.g2.bx.psu.edu/repository) + * [Bed tools Shed example](https://github.com/galaxyproject/tools-iuc/blob/master/packages/package_bedtools_2_24/tool_dependencies.xml) + * [Biostar Galaxy](https://biostar.usegalaxy.org) +* Biolabs + * Our [homepage](http://beta-research.jetbrains.org/groups/biolabs) + * Our [wiki](http://biolabs.intellij.net) + * Our NIH powered [genome browser](http://genomebrowser.labs.intellij.net) + * [TeamCity](https://teamcity.jetbrains.com/project.html?projectId=Epigenome)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_dependencies.xml Tue Oct 27 14:20:42 2015 +0300 @@ -0,0 +1,26 @@ +<?xml version="1.0"?> +<!-- +Tags information is here: +https://wiki.galaxyproject.org/ToolDependenciesTagSets +--> +<tool_dependency> + <package name="epigenome" version="0.0.1"> + <install version="1.0"> + <actions> + <action type="download_by_url">http://teamcity.jetbrains.com/guestAuth/repository/download/Epigenome_Tools_GenestackIntegration/lastSuccessful/genestack-Dev-all.jar</action> + <action type="move_directory_files"> + <source_directory>.</source_directory> + <destination_directory>$INSTALL_DIR/</destination_directory> + </action> + <!-- Set environment variable $EPIGENOME_JAR so Python script knows where to look --> + <action type="set_environment"> + <environment_variable name="EPIGENOME_JAR" action="set_to">$INSTALL_DIR/genestack-Dev-all.jar</environment_variable> + </action> + </actions> + </install> + <readme> + Downloads epigenome integration v0.0.1 + </readme> + </package> +</tool_dependency> +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zinbra.py Tue Oct 27 14:20:42 2015 +0300 @@ -0,0 +1,30 @@ +#!/usr/bin/env python +""" +Python wrapper for zinbra.xml +Usage: zinbra.py "${genome}" "${bed}" "${bin}" "${fdr}" +""" + +import os +import sys +import subprocess + +argv = sys.argv[1:] +print 'Arguments {0}'.format(argv) +genome, bed, bin, fdr = argv + +# Configure main jar path +epigenomeJar = os.environ.get("EPIGENOME_JAR") +print 'Using JAR distributive file {0}'.format(epigenomeJar) + +print 'Genome file {0}'.format(genome) + +# See https://github.com/JetBrains-Research/zinbra for command line options +# cla.argument_string_list() is configured at ZinbraApplications#rebuildArgumentStringsFromVisualOptions +cmd = 'java -cp {0} org.jetbrains.bio.zinbra.ZinbraCLA ' \ + 'analyze -i {1} -bed result.bed -r {2} -b {3} -fdr {4}'.format(epigenomeJar, + bed, + genome, + bin, fdr) +print 'Launching zinbra: {0}'.format(cmd) +subprocess.check_call(cmd, cwd=None, shell=True) +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zinbra.xml Tue Oct 27 14:20:42 2015 +0300 @@ -0,0 +1,26 @@ +<tool id="zinbra" name="Zinbra" version="0.0.1"> + <description>ChIP-Seq enrichment</description> + <requirements> + <requirement type="package" version="0.0.1">epigenome</requirement> + </requirements> + <stdio> + <!-- Wrapper ensures anything other than zero is an error --> + <exit_code range="1:" /> + <exit_code range=":-1" /> + </stdio> + <command interpreter="python"> + zinbra.py "${genome}" "${bed}" "${bin}" "${fdr}" + </command> + <inputs> + <param name="bed" type="data" format="bed" label="Aligned reads" description="BED Aligned reads to process" /> + <param name="genome" type="genomebuild" label="Genome build" description="Genome build used for alignment" /> + <param name="bin" size="5" type="integer" value="200" label="Bin size" /> + <param name="fdr" size="5" type="float" value="0.0001" label="FDR" /> + </inputs> + <outputs> + <data name="result" format="bed" label="result.bed" /> + </outputs> + <help> +Zinbra is a tool for analyzing and comparing ChIP-Seq data using Zero Inflated Negative Binomial Restricted Algorithm. + </help> +</tool>