Mercurial > repos > mini > strelka
diff strelka_wrapper.py @ 7:3e8541ece3c7
trying to fix environment variable 0.0.1
author | mini |
---|---|
date | Fri, 26 Sep 2014 14:30:27 +0200 |
parents | 87568e5a7d4f |
children | 2cee4ed50058 |
line wrap: on
line diff
--- a/strelka_wrapper.py Fri Sep 26 13:24:13 2014 +0200 +++ b/strelka_wrapper.py Fri Sep 26 14:30:27 2014 +0200 @@ -26,7 +26,7 @@ conf_file = open(config_path, "w") conf_file.write("[user]\n") for option in args: - if not option in ["tumorBam", "normalBam", "refFile", "configFile"] and args[option]!=None: + if not option in ["tumorBam", "normalBam", "refFile", "configFile", "scriptPath"] and args[option]!=None: conf_file.write("%s=%s\n" % (option, args[option])) conf_file.close() @@ -64,17 +64,6 @@ def __main__(): #Parse Command Line OPTPARSE DEPRECIATED USE ARGPARSE INSTEAD #MKTEMP DEPRECIATED USE MKDTlizations#EMP INSTEAD - - root_dir= "/home/galaxyusr/data/galaxy_dist/tools/strelka2" - expected_dir="for_tests" - job_dir=os.getcwd() - analysis_dir=job_dir + "/StrelkaAnalysis" - config_script=root_dir + "/configureStrelkaWorkflow.pl" - tmp_dir = "tmp" #tempfile.mkdtemp( prefix='tmp-strelkaAnalysis-' ) - config_ini = "%s/config.ini" % (tmp_dir) - - print("root_dir: " + root_dir + "\njob_dir :" + job_dir + "\nanalysis_dir :" + analysis_dir + "\nconfig_script :" + config_script + "\ntmp_dir :" + tmp_dir + "\nconfig_ini :" + config_ini) - #manage parsing parser = argparse.ArgumentParser() parser.add_argument( '-t', '--tumorBam', help='path to tumor bam file', required = False ) @@ -101,8 +90,20 @@ parser.add_argument( '--extraStrelkaArguments', help='path to tumor bam file', required = False ) parser.add_argument( '--isSkipDepthFilters', help='path to tumor bam file', required = False ) parser.add_argument( '--maxInputDepth', help='path to tumor bam file', required = False ) + parser.add_argument( '--scriptPath', help='path to tumor bam file', required = False ) args = parser.parse_args() + root_dir= SCRIPT_PATH + expected_dir="for_tests" + job_dir=os.getcwd() + analysis_dir=job_dir + "/StrelkaAnalysis" + config_script=root_dir + "/configureStrelkaWorkflow.pl" + tmp_dir = "tmp" #tempfile.mkdtemp( prefix='tmp-strelkaAnalysis-' ) + config_ini = "%s/config.ini" % (tmp_dir) + + print("root_dir: " + root_dir + "\njob_dir :" + job_dir + "\nanalysis_dir :" + analysis_dir + "\nconfig_script :" + config_script + "\ntmp_dir :" + tmp_dir + "\nconfig_ini :" + config_ini) + + #verifying eveything's ok if not os.path.isfile(config_script): sys.exit("ERROR: The strelka workflow must be built prior to running. See installation instructions in '$root_dir/README'")