Unverified Commit f266b1bf authored by Todor Kondic's avatar Todor Kondic
Browse files

pcl: pb-lite-driver: Add new phase buildccs

Also, put quotes removal phase immediately after build.
parent 79dfca53
declare -gx INPUTDIR
declare -agx ALL_STAGES=( "cleanup" "prepare" "fetch_scripts_sources" "build" "sanity_postbuild" "eval4pub" "quotes" "epilog")
declare -agx ALL_STAGES=( "cleanup" "prepare" "fetch_scripts_sources" "build" "quotes" "buildccs" "sanity_postbuild" "eval4pub" "epilog")
declare -a STAGES
STAGES=() # Which stages should be run.
......@@ -54,6 +54,10 @@ function finputdir() {
declare -gx OUTMFFILE=$(basename "${MAPFILE%.map}_$(date +%Y%m%d).csv")
declare -gx OUTMFCLONE=$(basename "${MAPFILE%.map}.csv")
# CCS filename.
declare -gx OUTMFCCSFILE=$(basename "${MAPFILE%.map}_CCSBase_$(date +%Y%m%d).csv")
declare -gx OUTMFCCCSCLONE=$(basename "${MAPFILE%.map}_CCSBase.csv")
# Does manifest exist?
[ ! -e "$MANIF" ] && fatal "(pb-lite-driver.sh): Manifest file $MANIF not found, or unreadable."
......@@ -118,6 +122,13 @@ function build() {
(cd "$WORKDIR"; source "${SCRIPTDIR}/generate" "$FILTERFILE" "$LEGENDFILE")
footer BUILD
}
function buildccs() {
header BUILDCCS
(cd "$WORKDIR"; Rscript --vanilla add_ccs2csv.R "$INPUTFILE" "$WORKDIR/$OUTMFCCSFILE")
footer BUILDCCS
}
function quotes() {
header FIX TRIPLE QUOTES IN MZ
(cd "WORKDIR"; ${SCRIPTDIR}/fix_mass_quotes.R "$WORKDIR/$OUTMFFILE")
......@@ -217,6 +228,9 @@ for stage in "${STAGES[@]}";do
"quotes")
quotes
;;
"buildccs")
buildccs
;;
"epilog")
epilog
;;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment