Revert some debug code in RecalQual.py. Make LogisticRegression easier to Ctrl-C out of.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@904 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
61ae00c7bf
commit
2035d7dfd3
|
|
@ -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."
|
"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
|
base = source_file.name[:source_file.name.rfind('.csv')] + '.' + read_group
|
||||||
regression_command = ' '.join((R_exe,logistic_regression_script,base,base,dinuc))
|
regression_command = ' '.join((R_exe,logistic_regression_script,base,base,dinuc))
|
||||||
print "Running " + regression_command
|
result = os.system(regression_command)
|
||||||
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'))
|
parameters_filename = '.'.join((base,dinuc,'parameters'))
|
||||||
if not os.access(parameters_filename,os.R_OK):
|
if not os.access(parameters_filename,os.R_OK):
|
||||||
exit("Unable to read output of R from file " + parameters_filename)
|
exit("Unable to read output of R from file " + parameters_filename)
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ if not os.path.isdir('output'):
|
||||||
os.mkdir('output')
|
os.mkdir('output')
|
||||||
|
|
||||||
# assemble the required program arguments
|
# 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'))
|
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))
|
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))
|
index_calibrated_bamfile = ' '.join((samtools_exe,'index',calibrated_bam))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue