-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrrun-i-concept-post-processing-batch.sh
executable file
·69 lines (57 loc) · 3.39 KB
/
rrun-i-concept-post-processing-batch.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/sh
source ./rrun.env.sh
SCRIPT=./scripts/pipelines/concepts/run_post_process.sh
# TEXT_PIPELINE_KEY=MEDLINE_XML_TO_TEXT
# TEXT_PIPELINE_VERSION="0.1.1"
# MAX_SUBSET_INDEX=36
# SUBSET_PREFIX=PUBMED_SUB_
TEXT_PIPELINE_KEY=FILTER_UNACTIONABLE_TEXT
TEXT_PIPELINE_VERSION="recent"
SUBSET_PREFIX=PMC_SUBSET_
MAX_SUBSET_INDEX=41
AUGMENTED_TEXT_PIPELINE_KEY="DOC_TEXT_AUGMENTATION"
AUGMENTED_TEXT_PIPELINE_VERSION="recent"
OGER_PP_PIPELINE_VERSION="recent"
ABBREV_PIPELINE_VERSION="recent"
CRF_PIPELINE_VERSION="recent"
OUTPUT_PIPELINE_VERSION='0.3.0'
#FILTER_FLAG=NONE
FILTER_FLAG=BY_CRF
# # ---------------------------------------------
# # process a single collection
# COLLECTION="PMC_SUBSET_0"
# $SCRIPT $PROJECT_ID ${COLLECTION} ${STAGE_LOCATION} ${TEMP_LOCATION} ${WORK_BUCKET} $TEXT_PIPELINE_KEY $TEXT_PIPELINE_VERSION $AUGMENTED_TEXT_PIPELINE_KEY $AUGMENTED_TEXT_PIPELINE_VERSION $OGER_PP_PIPELINE_VERSION $CRF_PIPELINE_VERSION $ABBREV_PIPELINE_VERSION $FILTER_FLAG $JAR_VERSION $OUTPUT_PIPELINE_VERSION &> "./logs/concept-post-process-${COLLECTION}.log" &
# ---------------------------------------------
# use the below for bulk processing
#
for INDEX in $(seq 1 4 $MAX_SUBSET_INDEX)
do
ind=$(($INDEX + 0))
if (( ind <= $MAX_SUBSET_INDEX)); then
echo "Starting oger pipeline... ${ind} $(date)"
COLLECTION="${SUBSET_PREFIX}${ind}"
$SCRIPT $PROJECT_ID ${COLLECTION} ${STAGE_LOCATION} ${TEMP_LOCATION} ${WORK_BUCKET} $TEXT_PIPELINE_KEY $TEXT_PIPELINE_VERSION $AUGMENTED_TEXT_PIPELINE_KEY $AUGMENTED_TEXT_PIPELINE_VERSION $OGER_PP_PIPELINE_VERSION $CRF_PIPELINE_VERSION $ABBREV_PIPELINE_VERSION $FILTER_FLAG $JAR_VERSION $OUTPUT_PIPELINE_VERSION &> "./logs/concept-post-process-${COLLECTION}.log" &
sleep 120
fi
ind=$(($INDEX + 1))
if (( ind <= $MAX_SUBSET_INDEX)); then
echo "Starting oger pipeline... ${ind} $(date)"
COLLECTION="${SUBSET_PREFIX}${ind}"
$SCRIPT $PROJECT_ID ${COLLECTION} ${STAGE_LOCATION} ${TEMP_LOCATION} ${WORK_BUCKET} $TEXT_PIPELINE_KEY $TEXT_PIPELINE_VERSION $AUGMENTED_TEXT_PIPELINE_KEY $AUGMENTED_TEXT_PIPELINE_VERSION $OGER_PP_PIPELINE_VERSION $CRF_PIPELINE_VERSION $ABBREV_PIPELINE_VERSION $FILTER_FLAG $JAR_VERSION $OUTPUT_PIPELINE_VERSION &> "./logs/concept-post-process-${COLLECTION}.log" &
sleep 120
fi
ind=$(($INDEX + 2))
if (( ind <= $MAX_SUBSET_INDEX)); then
echo "Starting oger pipeline... ${ind} $(date)"
COLLECTION="${SUBSET_PREFIX}${ind}"
$SCRIPT $PROJECT_ID ${COLLECTION} ${STAGE_LOCATION} ${TEMP_LOCATION} ${WORK_BUCKET} $TEXT_PIPELINE_KEY $TEXT_PIPELINE_VERSION $AUGMENTED_TEXT_PIPELINE_KEY $AUGMENTED_TEXT_PIPELINE_VERSION $OGER_PP_PIPELINE_VERSION $CRF_PIPELINE_VERSION $ABBREV_PIPELINE_VERSION $FILTER_FLAG $JAR_VERSION $OUTPUT_PIPELINE_VERSION &> "./logs/concept-post-process-${COLLECTION}.log" &
sleep 120
fi
ind=$(($INDEX + 3))
if (( ind <= $MAX_SUBSET_INDEX)); then
echo "Starting oger pipeline... ${ind} $(date)"
COLLECTION="${SUBSET_PREFIX}${ind}"
$SCRIPT $PROJECT_ID ${COLLECTION} ${STAGE_LOCATION} ${TEMP_LOCATION} ${WORK_BUCKET} $TEXT_PIPELINE_KEY $TEXT_PIPELINE_VERSION $AUGMENTED_TEXT_PIPELINE_KEY $AUGMENTED_TEXT_PIPELINE_VERSION $OGER_PP_PIPELINE_VERSION $CRF_PIPELINE_VERSION $ABBREV_PIPELINE_VERSION $FILTER_FLAG $JAR_VERSION $OUTPUT_PIPELINE_VERSION &> "./logs/concept-post-process-${COLLECTION}.log" &
fi
wait
done