我现在对SLURM有点问题 总是这样写:
[E :: hts_open_format]无法打开文件,但是当我打印变量时,它实际上看起来一样
文件名也正确,所以我现在不真正要做什么... 这是我脚本的一部分:
#!/bin/bash
#SBATCH --time=2:00:00
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --mem=32G
#SBATCH --cpus-per-task=16 # Nb of threads we want to run on
#SBATCH -o log/slurmjob-%A-%a
#SBATCH --job-name=deeptools_test
#SBATCH --partition=short
#SBATCH --array=0-7
# Handling errors
#set -x # debug mode on
set -o errexit # ensure script will stop in case of ignored error
set -o nounset # force variable initialisation
#set -o verbose
#set -euo pipefail
array=($(find "$HOME"/align -type f -name "*_.bam"))
printf '%s\n' "${array[@]}" >&2
tab_s1=($(for Item in ${array[@]} ; do if [[ "$Item" =~ "sample" ]]; then echo -n "$Item " ; fi ; done))
tab_s2=($(for Item in ${array[@]} ; do if [[ "$Item" =~ "treat" ]]; then echo -n "$Item " ; fi ; done))
echo "print tab_s1: " >&2
printf '%s\n' "${tab_s1[@]}" >&2 #works here
echo "print tab_s2: " >&2
printf '%s\n' "${tab_s2[@]}" >&2 #works here
#Program
bamfile1=($(for Item in ${tab_s1[@]} ; do if [[ "$Item" =~ "treat_R1" ]]; then echo -n "$Item " ; fi ; done))
bamfile2=($(for Item in ${tab_s1[@]} ; do if [[ "$Item" =~ "ctrl_R1" ]]; then echo -n "$Item " ; fi ; done))
echo "bamfile1 : "
printf '%s\n' "$bamfile1" >&2 #works
echo "bamfile2 : "
printf '%s\n' "$bamfile2" >&2 #works
bamCompare --bamfile1 "$bamfile1" --bamfile2 "$bamfile2" -p "max" --outFileName "$SCRATCHDIR"/normalized_s1_R1.bw #file won't open
当我在bamcompare内部传递变量时,不想打开文件。路径与我打印时提到的路径相同,我有不同的文件,但无法打开...
真的需要帮助