# HG changeset patch # User mini # Date 1412069796 -7200 # Node ID 137e05f2433657673f2736606d7c8a69f4501624 # Parent f66f23fcc83ac36834fa04b88e9b6cfbb7fff48b# Parent 0e8e6011082b7096d798f3a7cec374f6b914ec48 merged diff -r 0e8e6011082b -r 137e05f24336 strelka.xml --- a/strelka.xml Fri Sep 26 15:51:35 2014 +0200 +++ b/strelka.xml Tue Sep 30 11:36:36 2014 +0200 @@ -1,6 +1,6 @@ - - - Strelka good interface but no dependencies + + + Strelka SCRIPT_PATH samtools @@ -60,7 +60,7 @@ - + @@ -90,25 +90,37 @@ - - - - - - - - - + + + + + + + - - - - + + output1_file_check == True + + + output2_file_check == True + + + output3_file_check == True + + + output4_file_check == True + - conf_file.conf_file_switch == "Yes" + conf_file_check == True + + + output5_file_check == True + + + output6_file_check == True diff -r 0e8e6011082b -r 137e05f24336 strelka_wrapper.py --- a/strelka_wrapper.py Fri Sep 26 15:51:35 2014 +0200 +++ b/strelka_wrapper.py Tue Sep 30 11:36:36 2014 +0200 @@ -1,5 +1,8 @@ #!/usr/bin/env python -#Dan Blankenberg +#Gregoire Seguin-Henry (Engineer IT) +#Amine Sbitti (Data Scientist) +#Ludovic Marie-Sainte (Project Manager) +#For Geviteam 2014 """ A wrapper script for running the GenomeAnalysisTK.jar commands. @@ -10,14 +13,7 @@ from binascii import unhexlify from string import Template from galaxy import eggs -#import pkg_resources; pkg_resources.require( "bx-python" ) -#GALAXY_EXT_TO_GATK_EXT = { 'gatk_interval':'intervals', 'bam_index':'bam.bai', 'gatk_dbsnp':'dbSNP', 'picard_interval_list':'interval_list' } #items not listed here will use the galaxy extension as-is -#GALAXY_EXT_TO_GATK_FILE_TYPE = GALAXY_EXT_TO_GATK_EXT #for now, these are the same, but could be different if needed -#DEFAULT_GATK_PREFIX = "gatk_file" -#CHUNK_SIZE = 2**20 #1mb -# -# def cleanup_before_exit( tmp_dir ): if tmp_dir and os.path.exists( tmp_dir ): shutil.rmtree( tmp_dir ) @@ -62,9 +58,8 @@ my_Popen( command, "fasta_index_stderr", tmp_dir, "Error during indexation of fasta file :" + fasta_filename) def __main__(): - #Parse Command Line OPTPARSE DEPRECIATED USE ARGPARSE INSTEAD - #MKTEMP DEPRECIATED USE MKDTlizations#EMP INSTEAD - #manage parsing + + #Manage options parser = argparse.ArgumentParser() parser.add_argument( '-t', '--tumorBam', help='path to tumor bam file', required = False ) parser.add_argument( '-n', '--normalBam', help='path to tumor bam file', required = False ) @@ -101,7 +96,7 @@ tmp_dir = 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) + #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 @@ -113,7 +108,6 @@ # creating index if needed - #os.environ['PATH']= root_dir + "/opt/samtools:" + os.environ['PATH'] bam_filenames = [ args.tumorBam, args.normalBam ] index_bam_files( bam_filenames, tmp_dir ) fasta_files = [ args.refFile ] @@ -148,55 +142,3 @@ my_Popen( cmd, "workflow_stderr", tmp_dir, "Error during workflow execution !") print("**** completed workflow execution") - - - - - - - - - - - - - -#bam_filenames = [] -# if options.datasets: -# for ( dataset_arg, filename, galaxy_ext, prefix ) in options.datasets: -# gatk_filename = filename_from_galaxy( filename, galaxy_ext, target_dir = tmp_dir, prefix = prefix )#return the link to the dataset that has been created in the function -# if dataset_arg: -# cmd = '%s %s "%s"' % ( cmd, gatk_filetype_argument_substitution( dataset_arg, galaxy_ext ), gatk_filename ) -# if galaxy_ext == "bam": -# bam_filenames.append( gatk_filename ) -# #set up stdout and stderr output options -# stdout = open_file_from_option( options.stdout, mode = 'wb' ) -# stderr = open_file_from_option( options.stderr, mode = 'wb' ) -# #if no stderr file is specified, we'll use our own -# if stderr is None: -# stderr = tempfile.NamedTemporaryFile( prefix="strelka-stderr-", dir=tmp_dir ) -# -# proc = subprocess.Popen( args=cmd, stdout=stdout, stderr=stderr, shell=True, cwd=tmp_dir ) -# return_code = proc.wait() -# -# if return_code: -# stderr_target = sys.stderr -# else: -# stderr_target = sys.stdout -# stderr.flush() -# stderr.seek(0) -# while True: -# chunk = stderr.read( CHUNK_SIZE ) -# if chunk: -# stderr_target.write( chunk ) -# else: -# break -# stderr.close() -# #generate html reports -# if options.html_report_from_directory: -# for ( html_filename, html_dir ) in options.html_report_from_directory: -# html_report_from_directory( open( html_filename, 'wb' ), html_dir ) -# -# cleanup_before_exit( tmp_dir ) - -if __name__=="__main__": __main__()