ayushnoori's picture
Patch colormaps bug
5e86426
#!/bin/bash
# Set permissions with chmod +x sync_data.sh
# Run with ./sync_data.sh
# Ask the user for the environment
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
# Ask the user which results folder to sync
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
# Map user input to folder names
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
# Map user input to destination folder names
case $folder_choice in
1) DST_DIR="data/disease_splits";;
2) DST_DIR="models/checkpoints";; # Don't need checkpoints for this application
3) DST_DIR="models/embeddings";;
*) echo "Invalid folder choice. Please enter 1, 2, or 3."; exit 1;;
esac
# Sync source and destination folders with specific file types for checkpoints or embeddings
# Note, local files not present in the source will be deleted
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."