Last active
December 5, 2025 07:34
-
-
Save explodecomputer/aac46b07170a10a4559c73f5a2266d85 to your computer and use it in GitHub Desktop.
Reset RHDS project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| MY_GITHUB_URL=$1 | |
| if [ -z "${MY_GITHUB_URL}" ]; then | |
| echo "Please MY_GITHUB_URL as the argument to this script" | |
| exit 1; | |
| fi | |
| # create relevant directories | |
| mkdir -p ${WORK}/data/rhds/data | |
| mkdir -p ${WORK}/data/rhds/results | |
| # Get the relevant results file | |
| wget -O ${WORK}/data/rhds/results/combined-clin-pred-proteins.txt https://raw.githubusercontent.com/MRCIEU/rhds-tcga/refs/heads/raw/combined-clin-pred-proteins.txt | |
| # Get the relevant scripts | |
| if [ -d ~/rhds_template ]; then | |
| echo "exists" | |
| rm -rf ~/rhds_template | |
| fi | |
| git clone https://github.com/explodecomputer/rhds ~/rhds_template | |
| cd ~/rhds_template | |
| # Update my github repo with these scripts | |
| git remote set-url origin $MY_GITHUB_URL | |
| git push -f | |
| # Create new config files | |
| > config.env | |
| echo "datadir=\"$(realpath $WORK/data/rhds/data)\"" >> config.env | |
| echo "resultsdir=\"$(realpath $WORK/data/rhds/results)\"" >> config.env | |
| # Install the R packages | |
| Rscript -e "install.packages('renv'); renv::restore()" | |
| # Check that it works | |
| Rscript scripts/analysis.r |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This will
~/rhds_templaterenv.lockfiles