diff --git a/python/LogisticRegressionByReadGroup.py b/python/LogisticRegressionByReadGroup.py index b6299d3ab..f4389ea7f 100755 --- a/python/LogisticRegressionByReadGroup.py +++ b/python/LogisticRegressionByReadGroup.py @@ -44,8 +44,9 @@ def process_file(source_file,read_group,dinuc,target_file,R_exe,logistic_regress "Process the contents of an intermediate file. An intermediate file is the specific data arranged per read group, per dinuc." base = source_file.name[:source_file.name.rfind('.csv')] + '.' + read_group regression_command = ' '.join((R_exe,logistic_regression_script,base,base,dinuc)) - print "Running " + regression_command - os.system(regression_command) + result = os.system(regression_command) + if result != 0: + exit('Unable to run linear regression; command was %s, error code was %d' % (regression_command, result),1) parameters_filename = '.'.join((base,dinuc,'parameters')) if not os.access(parameters_filename,os.R_OK): exit("Unable to read output of R from file " + parameters_filename) diff --git a/python/RecalQual.py b/python/RecalQual.py index 1bfbc6ac2..20f5ea540 100755 --- a/python/RecalQual.py +++ b/python/RecalQual.py @@ -67,7 +67,7 @@ if not os.path.isdir('output'): os.mkdir('output') # assemble the required program arguments -gatk_base_cmdline = ' '.join((java_exe,'-ea','-jar',gatk,'-R',reference,'--DBSNP',dbsnp,'-l INFO','-L chrM')) +gatk_base_cmdline = ' '.join((java_exe,'-ea','-jar',gatk,'-R',reference,'--DBSNP',dbsnp,'-l INFO')) generate_covariates = ' '.join((gatk_base_cmdline,'-T CountCovariates','-I',bam,'-mqs 40','--OUTPUT_FILEROOT output/initial','--CREATE_TRAINING_DATA','--MIN_MAPPING_QUALITY 1')) apply_logistic_regression = ' '.join((gatk_base_cmdline,'-T LogisticRecalibration','-I',bam,'-logisticParams output/linear_regression_results.out','-outputBAM',calibrated_bam)) index_calibrated_bamfile = ' '.join((samtools_exe,'index',calibrated_bam))