-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnf_template.sh
75 lines (62 loc) · 1.69 KB
/
nf_template.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/env bash
#SBATCH -J launch_cci_pipeline
#SBATCH --mail-type=END,FAIL
#SBATCH --mail-user=JohnDoe@mail.com
#SBATCH --partition=long
#SBATCH --ntasks=1
#SBATCH --nodes=1
#SBATCH --cpus-per-task=1
#SBATCH --mem=1G
#SBATCH --time=01:00:00
#SBATCH --output=slurm_out/%x_%j.out
#SBATCH --error=slurm_out/%x_%j.out
module load java/18
project_dir="scrnaseq-cellcomm-pipeline"
# ---- PIPELINE CONFIGURATION ---- #
# Input seurat file
input_file="${project_dir}/data/example_data.rds"
# Output directory
output_dir="${project_dir}/output"
init_step=1
# Pre-processing
sample_var="Sample"
annot="seurat_annotations"
condition_var="Condition"
patient_var="Patient"
min_patients=2
min_cells=70
is_confident=0
# Cell-cell interactions
n_perm=10
min_pct=0.10
alpha=0.05
# ---- NEXTFLOW CONFIGURATION ---- #
# Path to nextflow executable
nf_exec="${HOME}/nextflow-23.04.3-all"
# Work directory - all executed tasks (processes) are stored here
work_dir="${project_dir}/nf-work"
nf_profile="conda"
# Output directory for: trace, report + timeline by NextFlow
outdir="${project_dir}/nf-logs"
# Create directories
mkdir -p "${output_dir}"
mkdir -p "${outdir}"
echo "Running pipeline..."
${nf_exec} run ${project_dir} -with-report -with-trace \
-profile ${nf_profile} \
-w ${work_dir} \
--input_file $input_file \
--sample_var ${sample_var} \
--annot ${annot} \
--min_cells ${min_cells} \
--n_perm ${n_perm} \
--min_pct ${min_pct} \
--alpha $alpha \
--init_step $init_step \
--condition_var $condition_var \
--patient_var $patient_var \
--min_patients $min_patients \
--is_confident ${is_confident} \
--outdir ${outdir} \
--output_dir ${output_dir}
echo "Done!"