I have installed BEAST using conda in HPC.
$conda install -c bioconda beast
Now I'm trying to run it through Slurm script using 10 million generation
#!/bin/sh
#SBATCH --job-name=Beast_10Mn # Job name
#SBATCH --ntasks=16 # Run on the no. of CPU
#SBATCH --ntasks-per-node=4 # cores to spread across distinct nodes
#SBATCH --output=BST_log_%j # Standard output log
#SBATCH --error=job.%J.err # Standard error log
for i in dipTime_10mn.xml
do
echo "${i}"
java -jar /lib/beast.jar -threads 16 "${i}"
done;
But it shows Error: Unable to access jar file /lib/beast.jar
It will be an immense help if someone kindly helps.
Thanks,
2 answers
SOLVED
#!/bin/sh
#SBATCH --job-name=R4_beast # Job name
#SBATCH --ntasks=2 # Run on the no. of CPU
#SBATCH --ntasks-per-node=2 # cores to spread across distinct nodes
#SBATCH --output=R4_%j.log # Standard output log
#SBATCH --error=R4_%J.err # Standard error log
for i in *.xml
do
echo "${i}"
/home/d.kabiraj/software/BEAST2.6/beast2.6/bin/XML_input/R4/beast/bin/beast "${i}"
done;
Instead of jar file I used sh file with multiple XML input.
However, still I have a problem I can not connect with the BEAGLE library
If you installed BEAST with conda, it won't be located at /lib/. Besides, BEAST has several wrapper scripts, you don't need to call java -jar.
The conda installer will put the wrapper scripts (applauncher, beast, beauti, loganalyser, logcombiner, treeannotator, treestatin) in the base conda PATH, or in the BEAST env PATH, in case you installed BEAST onto its own environment (which is advisable).
Log in to answer this question.
If you are using SLURM on a cluster it is unlikely that you have permissions to write to
/libdirectory. Yourbeast.jarmust be installed in a local directory by conda. Find and replace that path.You would also want to use the
forloop outside to set individual SLURM jobs up to make this efficient. Submitting a single job with aforloop inside it is not taking advantage of your cluster resources.looks wrong to me