@@ -4912,7 +4912,8 @@ StatsPipeline = function(path = getwd(),
49124912
49134913IMPC_statspipelinePostProcess = function (SP.results = getwd(),
49144914 waitUntillSee = ' impc_stats_pipeline_job' ,
4915- ignoreThisLineInWaitingCheck = 0 ) {
4915+ ignoreThisLineInWaitingCheck = 0 ,
4916+ mp_chooser_file = NULL ) {
49164917
49174918 DRrequiredAgeing ::: message0(' Step 1: Clean ups and creating the global index of results' )
49184919 DRrequiredAgeing ::: message0(' Zipping the logs ...' )
@@ -4952,7 +4953,7 @@ IMPC_statspipelinePostProcess = function(SP.results = getwd(),
49524953 setwd(file.path(SP.results , ' ExtractPvalues' ))
49534954 system(' cp ../SingleIndeces/AllResultsIndeces.txt .' , wait = TRUE )
49544955
4955- DRrequiredAgeing ::: splitIndexFileIntoPiecesForPvalueExtraction(indexFilePath = ' AllResultsIndeces.txt' )
4956+ DRrequiredAgeing ::: splitIndexFileIntoPiecesForPvalueExtraction(indexFilePath = ' AllResultsIndeces.txt' , mp_chooser_file = mp_chooser_file )
49564957 system(' chmod 775 ExtractPValJobs.bch' , wait = TRUE )
49574958 system(' rm -f ExtractPVals.R' ,wait = TRUE )
49584959 system(
@@ -5965,7 +5966,7 @@ annotationChooser = function(statpacket = NULL,
59655966 rrlevel = .005 ,
59665967 TermKey = ' MPTERM' ,
59675968 resultKey = ' Normal result' ,
5968- mp_chooser_file = ' mp_chooser.json.Rdata ' ) {
5969+ mp_chooser_file = NULL ) {
59695970 requireNamespace(' RPostgreSQL' )
59705971 requireNamespace(' data.table' )
59715972 requireNamespace(" data.table" )
@@ -5999,7 +6000,7 @@ annotationChooser = function(statpacket = NULL,
59996000 )
60006001 # #################################################################
60016002 message(' \t Reading the index file ...' )
6002- load(file.path(local(), ' annotation ' , mp_chooser_file ) )
6003+ load(mp_chooser_file )
60036004 message(
60046005 ' \t ~>' ,
60056006 paste(
@@ -6228,7 +6229,8 @@ splitIndexFileIntoPiecesForPvalueExtraction = function(indexFilePath = NULL,
62286229 split = 1500 ,
62296230 mem = " 9G" ,
62306231 time = " 2-00" ,
6231- outputfile = ' ExtractPValJobs.bch' ) {
6232+ outputfile = ' ExtractPValJobs.bch' ,
6233+ mp_chooser_file = NULL ) {
62326234 ldf = length(readLines(indexFilePath ))
62336235 ind = round(seq(1 , ldf , length.out = split ))
62346236
@@ -6260,6 +6262,8 @@ splitIndexFileIntoPiecesForPvalueExtraction = function(indexFilePath = NULL,
62606262 ind [i ] - 1 ,
62616263 ' "' ,
62626264 indexFilePath ,
6265+ ' " "' ,
6266+ mp_chooser_file ,
62636267 ' "' ,
62646268 " '" ,
62656269 sep = ' '
@@ -6298,7 +6302,7 @@ IMPC_HadoopLoad = function(SP.results = getwd(),
62986302 waitUntillSee = ' impc_stats_pipeline_job' ,
62996303 ignoreThisLineInWaitingCheck = 0 ,
63006304 # ##
6301- mp_chooser_file = ' mp_chooser.json.Rdata ' ,
6305+ mp_chooser_file = NULL ,
63026306 host = " hh-hdp-master-02.ebi.ac.uk" ,
63036307 path = ' impc/statpackets' ,
63046308 prefix = ' DRXXX_' ,
@@ -6376,6 +6380,14 @@ IMPC_HadoopLoad = function(SP.results = getwd(),
63766380 DRrequiredAgeing ::: message0(' Writing the config file ...' )
63776381 save(configlist ,file = ' configHadoop.Rdata' )
63786382
6383+ if (is.null(mp_chooser_file ) || ! file.exists(mp_chooser_file )) {
6384+ DRrequiredAgeing ::: message0(
6385+ ' ERROR: mp_chooser not found at location\n\t ' ,
6386+ mp_chooser_file
6387+ )
6388+ quit()
6389+ }
6390+
63796391 DRrequiredAgeing ::: annotationIndexCreator(
63806392 path = getwd(),
63816393 pattern = ' split_index' ,
@@ -6385,19 +6397,6 @@ IMPC_HadoopLoad = function(SP.results = getwd(),
63856397 )
63866398 system(' chmod 775 annotation_jobs.bch' , wait = TRUE )
63876399
6388-
6389- if (is.null(mp_chooser_file ) || ! file.exists(file.path(DRrequiredAgeing ::: local(), ' annotation' , mp_chooser_file ))) {
6390- DRrequiredAgeing ::: message0(
6391- ' mp_chooser not found\n\t ' ,
6392- file.path(DRrequiredAgeing ::: local(), ' annotation' , mp_chooser_file )
6393- )
6394- mp_chooser_file = ' mp_chooser.json.Rdata'
6395- DRrequiredAgeing ::: message0(
6396- ' mp_chooser defaulted to \n ' ,
6397- file.path(DRrequiredAgeing ::: local(), ' annotation' , mp_chooser_file )
6398- )
6399- }
6400-
64016400 DRrequiredAgeing ::: message0(' Downloading the action script ...' )
64026401 system(
64036402 ' wget -O loader.R https://raw.githubusercontent.com/mpi2/impc_stats_pipeline/dev/IMPC%20annotation%20pipeline/loaderHadoop.R' ,
0 commit comments