Mercurial > repos > mini > strelka
comparison strelka_wrapper.py @ 9:0e8e6011082b
Strelka Workflow 0.0.2
author | mini |
---|---|
date | Fri, 26 Sep 2014 15:51:35 +0200 |
parents | 2cee4ed50058 |
children | 137e05f24336 |
comparison
equal
deleted
inserted
replaced
8:2cee4ed50058 | 9:0e8e6011082b |
---|---|
96 root_dir= args.scriptPath | 96 root_dir= args.scriptPath |
97 expected_dir="for_tests" | 97 expected_dir="for_tests" |
98 job_dir=os.getcwd() | 98 job_dir=os.getcwd() |
99 analysis_dir=job_dir + "/StrelkaAnalysis" | 99 analysis_dir=job_dir + "/StrelkaAnalysis" |
100 config_script=root_dir + "/configureStrelkaWorkflow.pl" | 100 config_script=root_dir + "/configureStrelkaWorkflow.pl" |
101 tmp_dir = "tmp" #tempfile.mkdtemp( prefix='tmp-strelkaAnalysis-' ) | 101 tmp_dir = tempfile.mkdtemp( prefix='tmp-strelkaAnalysis-' ) |
102 config_ini = "%s/config.ini" % (tmp_dir) | 102 config_ini = "%s/config.ini" % (tmp_dir) |
103 | 103 |
104 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) | 104 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) |
105 | 105 |
106 | 106 |
111 if os.path.exists(analysis_dir): | 111 if os.path.exists(analysis_dir): |
112 sys.exit("'" + analysis_dir + "' already exist, if you are executing this tool from galaxy it should not happen") | 112 sys.exit("'" + analysis_dir + "' already exist, if you are executing this tool from galaxy it should not happen") |
113 | 113 |
114 | 114 |
115 # creating index if needed | 115 # creating index if needed |
116 os.environ['PATH']= root_dir + "/opt/samtools:" + os.environ['PATH'] | 116 #os.environ['PATH']= root_dir + "/opt/samtools:" + os.environ['PATH'] |
117 bam_filenames = [ args.tumorBam, args.normalBam ] | 117 bam_filenames = [ args.tumorBam, args.normalBam ] |
118 index_bam_files( bam_filenames, tmp_dir ) | 118 index_bam_files( bam_filenames, tmp_dir ) |
119 fasta_files = [ args.refFile ] | 119 fasta_files = [ args.refFile ] |
120 index_fasta_files( fasta_files, tmp_dir ) | 120 index_fasta_files( fasta_files, tmp_dir ) |
121 | 121 |
127 my_Popen(cmdbash, "copy_default_file_err", tmp_dir, "Error during the copy of default config file, maybe it was removed") | 127 my_Popen(cmdbash, "copy_default_file_err", tmp_dir, "Error during the copy of default config file, maybe it was removed") |
128 else: | 128 else: |
129 if not os.path.exists(args.configFile): | 129 if not os.path.exists(args.configFile): |
130 print( "The path to your configuration File seems to be wrong, use another one or custom option", file=sys.stderr) | 130 print( "The path to your configuration File seems to be wrong, use another one or custom option", file=sys.stderr) |
131 cmdbash="cp %s %s" % (args.configFile, config_ini) | 131 cmdbash="cp %s %s" % (args.configFile, config_ini) |
132 my_Popen(cmdbash, "copy_default_file_err", tmp_dir, "Error during the copy of default config file, maybe it was removed") | 132 my_Popen(cmdbash, "copy_default_file_err", tmp_dir, "Error during the copy of the selected config file") |
133 | 133 |
134 | 134 |
135 | 135 |
136 | 136 |
137 #configuration of workflow | 137 #configuration of workflow |