-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
83 lines (64 loc) · 2.45 KB
/
Makefile
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
76
77
78
79
80
81
82
83
SHELL:=/bin/bash
# Set default make call to do nothing
none:
###############################################################################
# Install Git LFS
install-gitlfs-linuxamd64:
wget https://github.com/git-lfs/git-lfs/releases/download/v3.2.0/git-lfs-linux-amd64-v3.2.0.tar.gz
tar -zxvf git-lfs-linux-amd64-v3.2.0.tar.gz --exclude=README.md --exclude=CHANGELOG.md --exclude=install.sh
rm git-lfs-linux-amd64-v3.2.0.tar.gz
mv git-lfs-3.2.0/git-lfs .
rm -rf git-lfs-3.2.0/
git lfs install
###############################################################################
# Install/update Nextflow
./nextflow:
curl -s https://get.nextflow.io | bash
install-nextflow: ./nextflow
nextflow-test: ./nextflow
./nextflow run hello
update-nextflow: ./nextflow
./nextflow self-update
###############################################################################
# Prepare reference genome files and create input directory
prep-pipeline:
gunzip -q references/hg38/Homo_sapiens_assembly38.fasta.gz
gunzip -q references/hg38/Homo_sapiens_assembly38.fasta.64.bwt.gz
gunzip -q references/hg38/Homo_sapiens_assembly38.fasta.64.sa.gz
mkdir -p input
mkdir -p input/preprocessedBams
mkdir -p logs
###############################################################################
# Save the necessary output files and clean the directories of any unneeded files after
# successful completion of the steps of the pipeline
preprocessing-completion:
mkdir -p logs/preprocessing
mv nextflow_report.*.html logs/preprocessing
mv timeline_report.*.html logs/preprocessing
mv trace.*.txt logs/preprocessing
germline-completion:
mkdir -p logs/germline
mv nextflow_report.*.html logs/germline
mv timeline_report.*.html logs/germline
mv trace.*.txt logs/germline
somatic-completion:
mkdir -p logs/somatic
mv nextflow_report.*.html logs/somatic
mv timeline_report.*.html logs/somatic
mv trace.*.txt logs/somatic
###############################################################################
# Remove logs/pid/reports/trace/slurmsub files
quick-clean:
rm -f .nextflow.log*
rm -f .nextflow.pid*
rm -f nextflow_report.*.html*
rm -f timeline_report.*.html*
rm -f trace.*.txt*
rm -f slurmsub.*.*.*
# Clean up the pipeline directory after a successful run to prep for new run
clean-postrun: quick-clean
rm -rf work/*
# Completely scrub the pipeline directory
clean-all: clean-postrun
rm -rf output/*
###############################################################################