Download dpacman/scripts/run_fimo_batch.sh from ChatterjeeLab/DPACMAN: direct link, hf CLI and curl.
- Browser
- Download file 1.66 kB
-
https://huggingface.co/ChatterjeeLab/DPACMAN/resolve/main/dpacman/scripts/run_fimo_batch.sh
- Command line
-
hf download hf://ChatterjeeLab/DPACMAN/dpacman/scripts/run_fimo_batch.sh
-
curl -L -o run_fimo_batch.sh https://huggingface.co/ChatterjeeLab/DPACMAN/resolve/main/dpacman/scripts/run_fimo_batch.sh
1.66 kB
| # ------------------------- | |
| # Slurm + Hydra Configuration | |
| # ------------------------- | |
| 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 to run | |
| #chromosomes=('1' '10' '11' '12' '13' '14' '15' '16' '17' '18' '19' '2' '20' '21' '22' '3' '4' '5' '6' '7' '8' '9' 'X' 'Y') | |
| chromosomes=('3') | |
| # ------------------------- | |
| # Slurm Job Submission | |
| # ------------------------- | |
| 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 |