Skip to content

Commit 67f18ba

Browse files
authored
Merge pull request #74 from mpi2/dev
v2.0.0: SLURM pipeline
2 parents eb56a82 + 56e87af commit 67f18ba

34 files changed

+561
-1851
lines changed

Extract details from StatPackets/ExtractPVals.R

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ DRSummaryAcross = function(x) {
367367

368368

369369
########## Main function
370-
f = function(start, end, file = 'Index_DR101_V1.txt') {
370+
f = function(start, end, file = 'Index_DR101_V1.txt', mp_chooser_file = mp_chooser_file) {
371371
if (is.na(end))
372372
end = start
373373
ofname = paste0('R', '_', start, '-', end, '_pval.tsv')
@@ -421,12 +421,14 @@ f = function(start, end, file = 'Index_DR101_V1.txt') {
421421
stringsAsFactors = FALSE
422422
)
423423
rN = DRrequiredAgeing:::annotationChooser(statpacket = r0,
424-
level = .0001)
424+
level = .0001,
425+
mp_chooser_file = mp_chooser_file)
425426
rW = DRrequiredAgeing:::annotationChooser(
426427
statpacket = r0,
427428
level = .0001,
428429
resultKey = 'Windowed result',
429-
TermKey = 'WMPTERM'
430+
TermKey = 'WMPTERM',
431+
mp_chooser_file = mp_chooser_file
430432
)
431433

432434

@@ -733,13 +735,13 @@ makejobs = function(path = getwd()) {
733735
bf = basename(file)
734736
n = length(parameters)
735737
jobs = paste0 (
736-
'bsub -J IMPC_stats_pipeline_lsf_jobs -M 16000 -e err/err',
738+
'sbatch --job-name=impc_stats_pipeline_job --mem=16G --time=2-00 -e err/err',
737739
bf,
738740
1:n,
739741
' -o out/out',
740742
bf,
741743
1:n,
742-
' "Rscript ExtractPVals.R ',
744+
' --wrap="Rscript ExtractPVals.R ',
743745
parameters,
744746
' ',
745747
file,
@@ -758,7 +760,7 @@ makejobs = function(path = getwd()) {
758760
#makejobs()
759761
#qvalue2AllZips()
760762
#parameter2qvalue(args[1], args[2])
761-
ignore.my.name = f(start = as.numeric(args[1]), end = as.numeric(args[2]),file = args[3])
763+
ignore.my.name = f(start = as.numeric(args[1]), end = as.numeric(args[2]), file = args[3], mp_chooser_file = args[4])
762764

763765

764766

Extract details from StatPackets/ExtractPValsPhenStat.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -637,13 +637,13 @@ makejobs = function(path = getwd()) {
637637
bf = basename(file)
638638
n = length(parameters)
639639
jobs = paste0 (
640-
'bsub -J IMPC_stats_pipeline_lsf_jobs -M 16000 -e err/err',
640+
'sbatch --job-name=impc_stats_pipeline_job --mem=16G --time=2-00 -e err/err',
641641
bf,
642642
1:n,
643643
' -o out/out',
644644
bf,
645645
1:n,
646-
' "Rscript ExtractPVals.R ',
646+
' --wrap="Rscript ExtractPVals.R ',
647647
parameters,
648648
' ',
649649
file,
@@ -661,7 +661,7 @@ makejobs = function(path = getwd()) {
661661
#makejobs()
662662
#qvalue2AllZips()
663663
#parameter2qvalue(args[1], args[2])
664-
ignore.my.name = f(start = as.numeric(args[1]), end = as.numeric(args[2]),file = args[3])
664+
ignore.my.name = f(start = as.numeric(args[1]), end = as.numeric(args[2]), file = args[3])
665665

666666

667667

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
# Split a text files based on #lines
22
split -8500 Index_DR101_V1.txt split_index_
33

4-
5-
# for creating LSF jobs in R
4+
# for creating jobs in R
65
DRrequiredAgeing:::annotationIndexCreator()
76

87
### Logs
98
find ./*/*_RawData/ClusterOut/ -name *ClusterOut -type f |xargs cp --backup=numbered -t ~/NoBckDir/DR10/logs/
109
find ./*/*_RawData/ClusterErr/ -name *ClusterErr -type f |xargs cp --backup=numbered -t ~/NoBckDir/DR10/logs/
1110

12-
1311
### Logs
1412
find ./*/*_RawData/ClusterOut/ -name *ClusterOut -type f |xargs rm
1513
find ./*/*_RawData/ClusterErr/ -name *ClusterErr -type f |xargs rm
1614

17-
1815
### Merge files
1916
cat *.tsv >> all.tsv
2017

21-
22-
### Compress a directory
23-
bsub -J IMPC_stats_pipeline_lsf_jobs -q research-rh74 "tar -zcvf ~/NoBckDir/DR9.2/jo
18+
### Compress a directory: don't forget to specify memory and time
19+
sbatch --job-name=impc_stats_pipeline_job --mem=1G --time=xx:xx:xx --wrap="tar -zcvf ~/NoBckDir/DR9.2/jo"

IMPC annotation pipeline/loader.R

Lines changed: 0 additions & 127 deletions
This file was deleted.

IMPC annotation pipeline/manual_loader.R

Lines changed: 0 additions & 109 deletions
This file was deleted.

Late adults stats pipeline/DRrequiredAgeing/DRrequiredAgeingPackage/R/main.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ mainAgeing = function(file = NULL ,
5151
# Only for Batch generator
5252
BatchProducer = FALSE ,
5353
cpu = 1 ,
54-
memory = 8000 ,
54+
memory = "7G" ,
55+
time = "08:00:00" ,
5556
nMax = 10000 ,
5657
ChunkSize = 24 ,
5758
MinColoniesInChunks = 32 ,
@@ -105,7 +106,7 @@ mainAgeing = function(file = NULL ,
105106
EA2LAMApping = read.csv(file = file.path(local(), 'EA2LA_parameter_mappings_2019-09-24.csv'))
106107
MetaDataList = read.csv(file = file.path(local(), 'metadataParameters.csv'))
107108
exceptionList = unique(c(exceptionList,MetaDataList$parameter_stable_id))
108-
# CategoricalCategoryBlackList = readFile(file = 'CategoricalCategoryBlackList.list')
109+
109110
# Main subdirectory/working directory
110111
message0('Preparing the working directory ...')
111112
cwd = getwd()
@@ -299,6 +300,7 @@ mainAgeing = function(file = NULL ,
299300
center = center ,
300301
cpu = cpu ,
301302
memory = memory ,
303+
time = time ,
302304
extraBatchParameters = extraBatchParameters
303305
)
304306
write(

0 commit comments

Comments
 (0)