# HG changeset patch
# User oleg@oleg-desktop.times.labs.intellij.net
# Date 1446052100 -10800
# Node ID 7d532e820976e0c90b1f4647ad280615d309c0a1
# Parent ae6878068d07888441d288f467dde035ac6ed231
Support comparison in zinbra. 3fba761
diff -r ae6878068d07 -r 7d532e820976 tool_dependencies.xml
--- a/tool_dependencies.xml Wed Oct 28 19:52:30 2015 +0300
+++ b/tool_dependencies.xml Wed Oct 28 20:08:20 2015 +0300
@@ -20,7 +20,6 @@
Downloads epigenome integration JAR.
- See for more details: https://teamcity.jetbrains.com/project.html?projectId=Epigenome_Tools&tab=projectOverview&guest=1
diff -r ae6878068d07 -r 7d532e820976 zinbra.py
--- a/zinbra.py Wed Oct 28 19:52:30 2015 +0300
+++ b/zinbra.py Wed Oct 28 20:08:20 2015 +0300
@@ -1,7 +1,6 @@
#!/usr/bin/env python
"""
Python wrapper for zinbra.xml
-Usage: zinbra.py "${genome}" "${bed}" "${bin}" "${fdr}"
"""
import os
@@ -10,7 +9,14 @@
argv = sys.argv[1:]
print 'Arguments {0}'.format(argv)
-genome, bed, bin, fdr = argv
+
+# Check command
+if len(argv) == 5:
+ genome, bin, fdr, action, bed = argv
+ assert action == "analyze"
+else:
+ genome, bin, fdr, action, bed1, bed2 = argv
+ assert action == "compare"
# Configure main jar path
jar = os.environ.get("INTEGRATION_JAR")
@@ -21,10 +27,11 @@
subprocess.check_call(cmd, cwd=None, shell=True)
# 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 reference.2bit -b {3} -fdr {4}'.format(jar,
- bed,
- bin, fdr)
+if action == "analyze":
+ cmd = 'java -cp {0} org.jetbrains.bio.zinbra.ZinbraCLA ' \
+ 'analyze -i {1} -bed result.bed -r reference.2bit -b {3} -fdr {4}'.format(jar, bed, bin, fdr)
+else:
+ cmd = 'java -cp {0} org.jetbrains.bio.zinbra.ZinbraCLA ' \
+ 'compare -1 {1} -2 {2} -bed result.bed -r reference.2bit -b {3} -fdr {4}'.format(jar, bed1, bed2, bin, fdr)
print 'Launching zinbra: {0}'.format(cmd)
subprocess.check_call(cmd, cwd=None, shell=True)
diff -r ae6878068d07 -r 7d532e820976 zinbra.xml
--- a/zinbra.xml Wed Oct 28 19:52:30 2015 +0300
+++ b/zinbra.xml Wed Oct 28 20:08:20 2015 +0300
@@ -5,20 +5,36 @@
-
-
+
+
- zinbra.py "${genome}" "${bed}" "${bin}" "${fdr}"
+ #if $action.selection == "analyze"
+ zinbra.py "${genome}" "${bin}" "${fdr}" analyze "${bed}"
+ #else
+ zinbra.py "${genome}" "${bin}" "${fdr}" compare "${bed1}" "${bed2}"
+ #end if
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
Zinbra is a tool for analyzing and comparing ChIP-Seq data using Zero Inflated Negative Binomial Restricted Algorithm.