forked from nanoporetech/spliced_bam2gff
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (52 loc) · 1.82 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
all: build
.PHONY: ct com push fetch gt fmt fix
TOOLS=../tools
# Utility targets:
ct:
git log --graph
fmt: *.go
go fmt *.go
com: fmt
git commit -a
push:
git push --all
fetch:
git fetch --all
fix:
go fix .
# Target:
BINARY=spliced_bam2gff
# These are the values we want to pass for VERSION and BUILD
VERSION=2.1.0
BUILD=`git rev-parse HEAD`
# Setup the -ldflags option for go build here, interpolate the variable values
LDFLAGS=-ldflags "-X main.Version=${VERSION} -X main.Build=${BUILD}"
# Builds the project
build: *.go
go build ${LDFLAGS} -o ${BINARY}
# Installs our project: copies binaries
install:
go install ${LDFLAGS}
# Cleans our project: deletes binaries
clean:
if [ -f ${BINARY} ] ; then rm ${BINARY} ; fi
# Test tool on simulated data (with no sequencing errors) agains the GFF output generated by GMAP:
test:
./spliced_bam2gff -g ./test_data/sirv_no_errors_gmap.bam > ./test_data/test_out.gff
(cd test_data; gffcompare -V -r sirv_no_errors_gmap.gff test_out.gff)
cat ./test_data/gffcmp.stats
rm ./test_data/test_out.gff ./test_data/gffcmp.*
# Test tool on simulated data (with sequencing errors) agains the GFF output generated by GMAP:
test_err:
./spliced_bam2gff -g ./test_data/sirv_errors_gmap.bam > ./test_data/test_out_err.gff
(cd test_data; gffcompare -V -r sirv_errors_gmap.gff test_out_err.gff)
cat ./test_data/gffcmp.stats
rm ./test_data/test_out_err.gff ./test_data/gffcmp.*
# Run tool on larger simulated data (with sequencing errors):
test_sim:
./spliced_bam2gff -d 20 -M -s ./test_data/sirv_simulated.bam > ./test_data/sirv_simulated_mm2.gff
rm ./test_data/sirv_simulated_mm2.gff
test_bundle:
./spliced_bam2gff -b 2000 -d 20 -M -L ./test_data/sirv_simulated_mm2_bundles -s ./test_data/sirv_simulated.bam
ls ./test_data/sirv_simulated_mm2_bundles/
rm -fr ./test_data/sirv_simulated_mm2_bundles