Hi there,
I'm trying to run juicer on a slurm cluster and cannot figure out how to tell juicer to use the modules I'm providing. The script wants to use the spack command, can't find it, and then can't find bwa. Am I downloading juicer correctly to use the SLURM scripts? I saw on github that the github page for juicer is the in progress version 2 so I'm using version 1.6.
Error:
/var/spool/slurm/slurmd/job50556639/slurm_script: line 14: spack: command not found
/var/spool/slurm/slurmd/job50556639/slurm_script: line 14: spack: command not found
slurmstepd-uri-cpu067: error: execve(): bwa: No such file or directory
srun: error: uri-cpu067: task 0: Exited with exit code 2
How I downloaded juicer:
```
mkdir /work/pi_hputnam_uri_edu/estrand/packages/Juicer
cd Juicer
wget
https://github.com/aidenlab/juicer/archive/refs/tags/1.6.zipcd juicer-1.6
## symlink slurm scripts to main folder
ln -s SLURM/scripts scripts
mkdir scripts/misc && mkdir scripts/common
cp misc/* scripts/misc
cp CPU/common/* scripts/common/
```
My latest attempt with script:
```
#!/usr/bin/env bash
#SBATCH --export=NONE
#SBATCH --nodes=1 --ntasks-per-node=32
#SBATCH --partition=uri-cpu
#SBATCH --no-requeue
#SBATCH --mem=700GB
#SBATCH --time=30-00:00:00
#SBATCH -o output/"%x_output.%j"
#SBATCH -e output/"%x_error.%j"
## Activate conda environment
#module load conda/latest
#conda activate /work/pi_hputnam_uri_edu/conda/envs/genome_scaffolding
# Trying without conda environment
module purge
unset SPACK_ROOT
unset SPACK_ENV
unset SPACK_PATH
module load bwa/0.7.17
module load samtools/1.19.2
module load openjdk/11.0.24
export JAVA=$(which java)
export BWA=$(which bwa)
export SAMTOOLS=$(which samtools)
export JAVA_HOME=$(dirname $(dirname $JAVA))
export PATH=$(dirname $JAVA):$(dirname $BWA):$(dirname $SAMTOOLS):$PATH
## SET PATHS
WORK_DIR=/scratch4/workspace/emma_strand_uri_edu-lobster_juicer
JUICER_DIR=/work/pi_hputnam_uri_edu/estrand/packages/Juicer/juicer-1.6
FASTQ_DIR="/scratch4/workspace/emma_strand_uri_edu-lobster_juicer/fastq/*.fastq*"
REF_DIR=${WORK_DIR}/references
# must match genome.chrom.sizes
GENOME_ID=genome
out="/scratch4/workspace/emma_strand_uri_edu-lobster_juicer"
## Running JUICER
${JUICER_DIR}/scripts/juicer.sh \
-q uri-cpu -l uri-cpu -L 30-0 -Q 7-0 \
-d ${WORK_DIR} \
-g ${GENOME_ID} \
-s DpnII \
-z ${REF_DIR}/genome.fasta \
-p ${REF_DIR}/genome.chrom.sizes \
-y ${REF_DIR}/genome_DpnII.txt \
-t 32 \
-D ${JUICER_DIR}
```