Mercurial > repos > jetbrains > zinbra
view zinbra.py @ 2:0eb50728861a
Released version:
Updated intergration artifact downloading c585add5cb6f16dce315be256f72119fe530e8f5
author | oleg@oleg-desktop.times.labs.intellij.net |
---|---|
date | Wed, 28 Oct 2015 18:48:43 +0300 |
parents | 8cbb06892b62 |
children | 7d532e820976 |
line wrap: on
line source
#!/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 jar = os.environ.get("INTEGRATION_JAR") print 'Using JAR distributive file {0}'.format(jar) cmd = 'java -cp {0} org.jetbrains.bio.genestack.FastaToTwoBitCLA {1} reference.2bit'.format(jar, genome) print 'Converting reference genome fasta to 2bit: {0}'.format(cmd) 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) print 'Launching zinbra: {0}'.format(cmd) subprocess.check_call(cmd, cwd=None, shell=True)