-
Notifications
You must be signed in to change notification settings - Fork 14
/
quant.mk
executable file
·70 lines (58 loc) · 1.85 KB
/
quant.mk
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
#!/usr/bin/make -rRsf
SHELL=/bin/bash -o pipefail
#USAGE:
#
# quant.mk all MEM= CPU= JOBS= SAMPLE= SUFFIX= TRANSCRIPTOME=
#
###############################################################
## More detailed information about the job
###############################################################
MAKEDIR := $(dir $(firstword $(MAKEFILE_LIST)))
DIR := ${CURDIR}
CPU=16
MEM=128
JOBS=1
RCORR := ${shell which rcorrector}
RCORRDIR := $(dir $(firstword $(RCORR)))
TRANSCRIPTOME=
SAMPLE=
SUFFIX=
START=1
INPUT := $(shell basename ${READ1}) ## NOT NEEDED?
brewpath := $(shell which brew 2>/dev/null)
rcorrpath := $(shell which rcorrector 2>/dev/null)
trimmomaticpath := $(shell which trimmomatic 2>/dev/null)
salmonpath := $(shell which salmon 2>/dev/null)
VERSION := ${shell cat ${MAKEDIR}version.txt}
check:
setup:${DIR}/quant_setup.done
salmon:${DIR}/${SAMPLE}salmonquant.done
all: check setup salmon
.DELETE_ON_ERROR:
.PHONY:report check
${DIR}/quant_setup.done:
@mkdir -p ${DIR}/reports
@mkdir -p ${DIR}/quants
touch ${DIR}/quant_setup.done
check:
ifdef salmonpath
else
$(error "\n\n*** SALMON is not installed, must fix ***")
endif
ifdef trimmomaticpath
else
$(error "\n\n Maybe TRIMMOMATIC is not installed, or maybe you are working on Bridges")
endif
ifdef rcorrpath
else
$(error "\n\n *** RCORRECTOR is not installed, must fix ***")
endif
${DIR}/${SAMPLE}salmonquant.done:
salmon index --no-version-check -t ${TRANSCRIPTOME} -i ${TRANSCRIPTOME}.ortho.idx --type quasi -k 31
salmon quant --no-version-check -p ${CPU} -i ${TRANSCRIPTOME}.ortho.idx --seqBias --gcBias -l a -1 ${DIR}/${SAMPLE}1${SUFFIX} -2 ${DIR}/${SAMPLE}2${SUFFIX} -o ${DIR}/quants/${SAMPLE};\
touch ${DIR}/${SAMPLE}salmonquant.done
printf " \n\n"
echo ${SAMPLE} quantification complete
runtime=$(shell time)
echo $(runtime)
source ${MAKEDIR}/software/anaconda/install/bin/deactivate