|
#!/bin/bash |
|
|
|
|
|
|
|
|
|
|
|
echo "Would you like to sync results from O2 or Kempner?" |
|
echo "1) O2" |
|
echo "2) Kempner" |
|
read -p "Enter your choice (1 or 2): " env_choice |
|
|
|
|
|
echo "Which results folder do you want to sync?" |
|
echo "1) data: disease splits" |
|
echo "2) disease split models: checkpoints" |
|
echo "3) disease split models: embeddings" |
|
read -p "Enter your choice (1, 2, or 3): " folder_choice |
|
|
|
|
|
case $folder_choice in |
|
1) SRC_FOLDER="Data/DrugKG/2_harmonize_KG/disease_splits";; |
|
2) SRC_FOLDER="Results/GALAXY/disease_splits/checkpoints";; |
|
3) SRC_FOLDER="Results/GALAXY/disease_splits_0/embeddings";; |
|
*) echo "Invalid folder choice. Please enter 1, 2, or 3."; exit 1;; |
|
esac |
|
|
|
case $env_choice in |
|
1) SRC_DIR="[email protected]:/n/data1/hms/dbmi/zitnik/lab/users/an252/NeuroKG/neuroKG/$SRC_FOLDER";; |
|
2) SRC_DIR="[email protected]:/n/holylabs/LABS/mzitnik_lab/Users/anoori/neuroKG/$SRC_FOLDER";; |
|
*) echo "Invalid source server choice. Please enter 1 or 2."; exit 1;; |
|
esac |
|
|
|
|
|
case $folder_choice in |
|
1) DST_DIR="data/disease_splits";; |
|
2) DST_DIR="models/checkpoints";; |
|
3) DST_DIR="models/embeddings";; |
|
*) echo "Invalid folder choice. Please enter 1, 2, or 3."; exit 1;; |
|
esac |
|
|
|
|
|
|
|
if [[ $folder_choice -eq 2 || $folder_choice -eq 3 ]]; then |
|
echo "Syncing only .ckpt or .pt files from $SRC_DIR to $DST_DIR..." |
|
rsync -avz -e ssh --include="*.ckpt" --include="*.pt" --exclude="*" $SRC_DIR/ $DST_DIR |
|
else |
|
echo "Syncing $SRC_DIR to $DST_DIR..." |
|
rsync -avz -e ssh $SRC_DIR/ $DST_DIR |
|
fi |
|
|
|
echo "Synchronization complete." |
|
|