Skip to content

Commit

Permalink
organisation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
explodecomputer committed Oct 20, 2024
1 parent a700381 commit ee45454
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 13 deletions.
2 changes: 1 addition & 1 deletion 03-prs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,5 +139,5 @@ done

echo "Successfully generated correlation matrices for each phenotype!"
echo "Generating PRS-phenotype associations for each subset"
Rscript resources/phenotypes/score.r ${phenotype_processed_dir}/phenolist ${genotype_processed_dir}/scratch/tophits ${results_dir}/04
Rscript resources/phenotypes/score.r ${phenotype_processed_dir}/phenolist ${genotype_processed_dir}/scratch/tophits ${results_dir}/03
echo "Successfully generated scores!"
41 changes: 37 additions & 4 deletions utils/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,42 @@

source config.env


echo "Checking R packages..."
Rscript -e "renv::status()"

./bin/plink2 --version
./bin/flashpca --version
./bin/gcta-1.94.1
./bin/king
tf=$(mktemp)

echo "Checking plink..."
if ./bin/plink2 --version > $tf 2>&1; then
echo "All good!"
else
cat $tf
fi

echo "Checking flashpca..."
if ./bin/flashpca --version > $tf 2>&1; then
echo "All good!"
else
cat $tf
fi

echo "Checking gcta..."

./bin/gcta-1.94.1 > $tf 2>&1
if cat $tf | grep -q "Genome"; then
echo "All good!"
else
cat $tf
fi

echo "Checking gcta..."

./bin/king > $tf 2>&1
if cat $tf | grep -q "KING"; then
echo "All good!"
else
cat $tf
fi


17 changes: 9 additions & 8 deletions utils/run_apptainer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,25 @@

source config.env

apptainer pull -F docker://MRCIEU/lifecourse-gwas:latest
# apptainer pull -F docker://mrcieu/lifecourse-gwas:latest

# Run without pwd binding

d=${PWD}
echo $d
td=$(mktemp -d)
cd $td
# d=${PWD}
# echo $d
# td=$(mktemp -d)
# cd $td

apptainer run \
--bind "${d}/config.env:/project/config.env" \
--containall \
--bind "${PWD}/config.env:/project/config.env" \
--bind "${phenotype_input_dir}:${phenotype_input_dir}" \
--bind "${phenotype_processed_dir}:${phenotype_processed_dir}" \
--bind "${genotype_input_dir}:${genotype_input_dir}" \
--bind "${genotype_processed_dir}:${genotype_processed_dir}" \
--bind "${results_dir}:${results_dir}" \
--cwd /project \
${d}/lifecourse-gwas_latest.sif \
${PWD}/lifecourse-gwas_latest.sif \
"$@"

cd $d
# cd $d

0 comments on commit ee45454

Please sign in to comment.