Commit ed318093 authored by jarunanp's avatar jarunanp
Browse files

Merge branch 'main' into 'main'

setup_alphafold_run_script.sh updated

See merge request jarunanp/alphafold_on_euler!1
parents 2bf9f2ab 60667f0d
>sp|Q07955|SRSF1_HUMAN Serine/arginine-rich splicing factor 1 OS=Homo sapiens OX=9606 GN=SRSF1 PE=1 SV=2
MSGGGVIRGPAGNNDCRIYVGNLPPDIRTKDIEDVFYKYGAIRDIDLKNRRGGPPFAFVEFEDPRDAEDAVYGRDGYDYDGYRLRVEFPRSGRGTGRGGGGGGGGGAPRGRYGPPSRRSENRVVVSGLPPSGSWQDLKDHMREAGDVCYADVYRDGTGVVEFVRKEDMTYAVRKLDNTKFRSHEGETAYIRVKVDGPRSPSYG
#!/usr/bin/bash
#BSUB -n 12
#BSUB -n 24:00
#BSUB -n 04:00
#BSUB -R "rusage[mem=10000, scratch=10000]"
#BSUB -R "rusage[ngpus_excl_p=1] select[gpu_mtotal0>=10240]"
#BSUB -R "span[hosts=1]"
......@@ -21,16 +21,16 @@ export XLA_PYTHON_CLIENT_MEM_FRACTION=1.0
python /cluster/apps/nss/alphafold/alphafold-2.1.1/run_alphafold.py \
--data_dir=$DATA_DIR \
--output_dir=$OUTPUT_DIR \
--max_template_date="2022-01-28" \
--max_template_date="2022-02-21" \
--bfd_database_path=$DATA_DIR/bfd/bfd_metaclust_clu_complete_id30_c90_final_seq.sorted_opt \
--uniref90_database_path=$DATA_DIR/uniref90/uniref90.fasta \
--uniclust30_database_path=$DATA_DIR/uniclust30/uniclust30_2018_08/uniclust30_2018_08 \
--mgnify_database_path=$DATA_DIR/mgnify/mgy_clusters_2018_12.fa \
--template_mmcif_dir=$DATA_DIR/pdb_mmcif/mmcif_files \
--obsolete_pdbs_path=$DATA_DIR/pdb_mmcif/obsolete.dat \
--model_preset=multimer --pdb_seqres_database_path=$DATA_DIR/pdb_seqres/pdb_seqres.txt --uniprot_database_path=/uniprot/uniprot.fasta \
--fasta_paths=/cluster/work/sis/cdss/jarunanp/21_12_alphafold_benchmark/fastafiles/IFGSC_6mer.fasta
--pdb70_database_path=$DATA_DIR/pdb70/pdb70 \
--fasta_paths=/cluster/home/ruedsimo/alphafold/alphafold_on_euler/SRSF1.fasta
mkdir -p output/IFGSC_6mer
rsync -av $TMPDIR/output/IFGSC_6mer ./output/IFGSC_6mer
mkdir -p output/SRSF1
rsync -av $TMPDIR/output/SRSF1 ./output/SRSF1
......@@ -5,9 +5,37 @@ FASTAFILE="undefined.fasta"
WORKDIR=$PWD
MAX_TEMPLATE_DATE=$(date +'%Y-%m-%d')
print_help()
{
# Display Help
echo "Script to create input file for AlphaFold2 on Euler."
echo
echo "Syntax: setup_alphafold_run_script.sh [-f fastafile] [-w working directory] [--max_template_date Y-M-D] [--skip_minimization]"
echo "options:"
echo "-h print help and exit"
echo "-f FASTA filename"
echo "-w working directory"
echo "--max_template_date format: "
echo "--skip_minimization no Amber minimization will be performed"
echo
}
# Print help if not options are provided
if [[ $# -eq 0 ]];then
print_help
exit 1
fi
# Parse in arguments
while [[ $# -gt 0 ]]; do
case $1 in
-h|--help)
# Print help and exit
print_help
exit
;;
-f|--fastafile)
# Get absolute path
FASTAFILE=$(readlink -m $2)
......@@ -33,9 +61,20 @@ while [[ $# -gt 0 ]]; do
shift;
shift;
;;
--skip_minimization)
# Amber minimization is done per default
# For large proteins with more than 3000 amino acids minimzation is time consuming
SKIP_MINIMIZATION=True
shift;
;;
* )
print_help
exit 1
esac
done
# Count the number of lines in the fastafile
n_lines=$(grep -cve '^\s*$' $FASTAFILE)
echo " Number of sequences: $((n_lines/2))"
......@@ -113,16 +152,19 @@ elif (( "$sum_aa" >= 3500 )); then
ENABLE_UNIFIED_MEMORY=1
MEM_FRACTION=$((TOTAL_GPU_MEM_MB/GPU_MEM_MB))
fi
echo -e " Estimate required resources:"
echo -e " Run time: "
echo -e " Number of CPUs: "
echo -e " Total CPU memory: "
echo -e " Number of GPUs: "
echo -e " Total GPU memory: "
echo -e " Total scratch space: "
echo -e " Estimate required resources: "
echo -e " Run time: " $RUNTIME
echo -e " Number of CPUs: " $NCPUS
echo -e " Total CPU memory: " $TOTAL_CPU_MEM_MB
echo -e " Number of GPUs: " $NGPUS
echo -e " Total GPU memory: " $TOTAL_GPU_MEM_MB
echo -e " Total scratch space: " $TOTAL_SCRATCH_MB
########################################
# Output an LSF run script for AlphaFold
########################################
mkdir -p $WORKDIR
RUNSCRIPT=$WORKDIR/"run_alphafold.bsub"
echo -e " Output an LSF run script for AlphaFold2: $RUNSCRIPT"
......@@ -165,3 +207,7 @@ mkdir -p output/$PROTEIN
rsync -av \$TMPDIR/output/$PROTEIN ./output/$PROTEIN
EOF
#env2lmod
#module load gcc/6.3.0 openmpi/4.0.2 alphafold/2.1.1
#alphafold_init
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment