| #!/bin/bash |
|
|
| |
| |
| |
|
|
| main_task="preprocess" |
| data_task_type="fimo" |
| fimo_thresh="1e-2" |
| fimo_thresh_mode="q" |
| max_stored="100000" |
| fimo_outdir="dpacman/data_files/processed/fimo/fimo_out_q" |
| debug="false" |
|
|
| |
| |
| chromosomes=('3') |
| |
| |
| |
|
|
| for chrom in "${chromosomes[@]}"; do |
| timestamp=$(date "+%Y-%m-%d_%H-%M-%S") |
| run_dir="$HOME/DPACMAN/logs/${main_task}/${data_task_type}/runs/${timestamp}_chr${chrom}" |
| mkdir -p "$run_dir" |
|
|
| sbatch <<EOF |
| #!/bin/bash |
| #SBATCH --job-name=fimo${chrom} |
| #SBATCH --partition=genoa-lrg-mem |
| #SBATCH -N 1 ## Number of nodes |
| #SBATCH --mem=0 |
| #SBATCH --ntasks-per-node=64 |
| #SBATCH --output=${run_dir}/run.log |
| #SBATCH --error=${run_dir}/run.log |
| |
| echo "Running FIMO for chromosome ${chrom} at \$(date)" |
| cd /vast/projects/pranam/lab/sophie/DPACMAN/dpacman |
| |
| # Load environment |
| source /vast/projects/pranam/lab/shared/miniconda3/etc/profile.d/conda.sh |
| conda activate dpacman |
| |
| # Run Hydra-based script |
| python -u -m scripts.preprocess \\ |
| hydra.run.dir="${run_dir}" \\ |
| data_task=${data_task_type}/run_fimo \\ |
| data_task.chroms=["${chrom}"] \\ |
| data_task.fimo.thresh=${fimo_thresh} \\ |
| data_task.fimo.thresh_mode=${fimo_thresh_mode} \\ |
| data_task.paths.fimo_outdir=${fimo_outdir} \\ |
| data_task.fimo.max_stored=${max_stored}\\ |
| data_task.debug=${debug} |
| |
| # Save SLURM job ID |
| echo \$SLURM_JOB_ID > "${run_dir}/pid.txt" |
| EOF |
|
|
| done |