-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain
More file actions
executable file
·54 lines (45 loc) · 1.27 KB
/
main
File metadata and controls
executable file
·54 lines (45 loc) · 1.27 KB
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
#!/bin/bash
set -euo pipefail
function on_failure {
echo "The script" "${0##*/}" "has failed"
}
trap on_failure ERR
source ./scripts/getopts
# housekeeping
declare -a SCRIPTS=(
"preamble.R"
"create-object-sct.R"
"integrate.R"
)
# do check for multimodal routine
if [[ "${atac:-}" == "TRUE" ]]
then
echo "Running ATAC-multiome WNN Preprocessing"
SCRIPTS=("preamble.R" "atac-multi-wnn.R")
echo "${SCRIPTS[@]}"
elif [[ "${cite:-}" == "TRUE" ]]
then
echo "Running CITE-multiome WNN Preprocessing"
SCRIPTS=("preamble.R" "cite-wnn.R")
echo "${SCRIPTS[@]}"
elif [[ "${harmonize:-}" == "TRUE" ]]
then
echo "Integrating using Harmony"
SCRIPTS=("preamble.R" "create-object-sct.R" "harmonize.R")
echo "${SCRIPTS[@]}"
elif [[ "${mixscape:-}" == "TRUE" ]]
then
echo "Running Mixscape Perturbation Preprocessing"
SCRIPTS=("preamble.R" "create-multi-norm.R" "mixscape.R")
echo "${SCRIPTS[@]}"
else
echo "Creating traditional Seurat object"
fi
# execute pipeline scripts
for i in "${SCRIPTS[@]}"
do
echo "coreSC master version commit $(cat .git/refs/heads/master | cut -c -7)" >> "$OUT_DIR"/log.txt
Rscript ./scripts/"$i" "$OUT_DIR" 2>&1 | tee -a "$OUT_DIR"/log.txt
done
cp ./config/params.csv ./config/samples.csv "$OUT_DIR"
rm -rf "$OUT_DIR"/tmp