예제2

다음과 같이 snakemake의 profile 옵션을 활용해볼 수 있습니다. 현재 폴더에 Snakefile 이라는 워크플로우가 존재한다고 가정합니다. (예제1 참고)

아래와 같이 git을 사용해서 템플릿을 다운로드 받습니다.

git clone https://github.com/cbrueffer/snakemake-aws-parallelcluster-slurm.git

mkdir profiles
mv snakemake-aws-parallelcluster-slurm/aws-parallelcluster-slurm/ ./profiles/

config.yaml을 수정합니다. 이때 queue는 sinfo 명령어를 통해 확인할 수 있습니다.

vi profiles/config.yaml
cluster:
  mkdir -p logs/{rule}/ &&
  sbatch
    --parsable
    --cpus-per-task={threads}
    --time={resources.time}
    --job-name=smk-{rule}
    --output=logs/{rule}/{jobid}.out
    --error=logs/{rule}/{jobid}.err
    --partition={resources.partition}
default-resources:
  - time=1440
  - partition='queue0'
  - tmpdir='/tmp'
jobs: 150
latency-wait: 120
local-cores: 1
restart-times: 1
max-jobs-per-second: 10
keep-going: True
rerun-incomplete: True
printshellcmds: True
scheduler: greedy
use-conda: True
conda-frontend: mamba
cluster-status: status-scontrol.sh
cluster-cancel: scancel
max-status-checks-per-second: 10

이제 snakemake executor로 실행해 봅니다.

snakemake --profile profiles/aws-parallelcluster-slurm

Last updated