comparison zinbra.py @ 0:5f97f28e65ca

Initial commit
author Oleg Shpynov <oleg.shpynov@gmail.com>
date Tue, 27 Oct 2015 14:20:42 +0300
parents
children 8cbb06892b62
comparison
equal deleted inserted replaced
-1:000000000000 0:5f97f28e65ca
1 #!/usr/bin/env python
2 """
3 Python wrapper for zinbra.xml
4 Usage: zinbra.py "${genome}" "${bed}" "${bin}" "${fdr}"
5 """
6
7 import os
8 import sys
9 import subprocess
10
11 argv = sys.argv[1:]
12 print 'Arguments {0}'.format(argv)
13 genome, bed, bin, fdr = argv
14
15 # Configure main jar path
16 epigenomeJar = os.environ.get("EPIGENOME_JAR")
17 print 'Using JAR distributive file {0}'.format(epigenomeJar)
18
19 print 'Genome file {0}'.format(genome)
20
21 # See https://github.com/JetBrains-Research/zinbra for command line options
22 # cla.argument_string_list() is configured at ZinbraApplications#rebuildArgumentStringsFromVisualOptions
23 cmd = 'java -cp {0} org.jetbrains.bio.zinbra.ZinbraCLA ' \
24 'analyze -i {1} -bed result.bed -r {2} -b {3} -fdr {4}'.format(epigenomeJar,
25 bed,
26 genome,
27 bin, fdr)
28 print 'Launching zinbra: {0}'.format(cmd)
29 subprocess.check_call(cmd, cwd=None, shell=True)
30