-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpreps.sh
More file actions
44 lines (34 loc) · 1.38 KB
/
Copy pathpreps.sh
File metadata and controls
44 lines (34 loc) · 1.38 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
#!/bin/bash
set -e # Stops execution immediately if any python script fails
# Command Line Arguments
WORKFLOW=$1
DATASET=$2
SPECIES=${3:-human} # Defaults to human if not specified
if [ -z "$WORKFLOW" ] || [ -z "$DATASET" ]; then
echo "Usage: ./preps.sh [finetune|train|apply] [dataset_name] [human|mouse]"
echo "Example: ./preps.sh apply glioma2 human"
exit 1
fi
echo "========================================"
echo "🚀 Starting PREPS Workflow: $WORKFLOW"
echo "📂 Dataset: $DATASET | 🧬 Species: $SPECIES"
echo "========================================"
if [ "$WORKFLOW" == "finetune" ]; then
python tokenize_data.py "$DATASET" -s "$SPECIES"
python finetune.py "$DATASET" -s "$SPECIES"
elif [ "$WORKFLOW" == "train" ]; then
python tokenize_data.py "$DATASET" -s "$SPECIES"
python annotate.py "$DATASET"
# Train regressor and classifier models using the dynamic dataset name
python patchseq_glm.py "$DATASET"
# Automatically scan the output directory and select the best models
python select_best_models.py "${DATASET}_preds/"
elif [ "$WORKFLOW" == "apply" ]; then
python tokenize_data.py "$DATASET" -s "$SPECIES"
python annotate.py "$DATASET"
python patchseq_predict.py "$DATASET" -m patchseq
else
echo "❌ Invalid workflow. Choose finetune, train, or apply."
exit 1
fi
echo "✅ Workflow $WORKFLOW completed successfully!"