Thank you very much, and I hope to receive your help.
#!/bin/bash
#SBATCH --job-name=scte
#SBATCH --partition=bingxing
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=32
#SBATCH --array=1-2%2
#SBATCH --output=scte_output_%A_%a.txt
#SBATCH --error=scte_error_%A_%a.txt
source /public/software/apps/anaconda3/5.2.0/etc/profile.d/conda.sh
conda activate scte
cd /public/home/zzs000213/data_yao/single-cell/Data/CleanData/output
index=$SLURM_ARRAY_TASK_ID
file=$(find . -type f -name "possorted_genome_bam.bam" | sed -n "${index}p")
if [ -z "$file" ]; then
echo " possorted_genome_bam.bam "
exit 1
fi
echo ": $file"
sample_name=$(basename $(dirname $(dirname "$file")))
output_dir="/public/home/zzs000213/data_yao/single-cell/Data/scTE/$sample_name"
mkdir -p "$output_dir"
scTE -i "$file" -o "$output_dir" -x /public/home/zzs000213/human_index/scte_index/hg38.exclusive.idx -p 12