forked from RSC-RP/cutandrun_nf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain_run.sh
32 lines (29 loc) · 808 Bytes
/
main_run.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
#!/bin/bash
set -eu
DATE=$(date +%F)
NFX_CONFIG=./nextflow.config
#Options: 'local_singularity', 'PBS_singularity'
NFX_PROFILE='PBS_singularity'
#Options: 'bowtie2_index_only', 'align_call_peaks', 'call_peaks'
NFX_ENTRY='align_call_peaks'
#The output prefix on filenames for reports/logs
REPORT=${1:-"pipeline_report"}
# Load the modules
if [[ $NFX_PROFILE =~ "singularity" ]]
then
module load singularity
singularity --version
singularity cache clean --force
fi
# Nextflow run to execute the workflow
PREFIX=${REPORT}_${DATE}
nextflow -C ${NFX_CONFIG}\
-log reports/${PREFIX}_nextflow.log \
run main.nf \
-entry ${NFX_ENTRY} \
-profile ${NFX_PROFILE} \
-with-report reports/${PREFIX}.html \
-with-dag dag/${PREFIX}_dag.pdf \
-cache TRUE \
-resume \
"$@"