-
Notifications
You must be signed in to change notification settings - Fork 50
/
Makefile
61 lines (52 loc) · 1.72 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
# download and install IGV
install: igv.jar
igv.jar: IGV_2.4.10.zip
unzip IGV_2.4.10.zip && \
rm -f IGV_2.4.10.zip && \
ln -s IGV_2.4.10/igv.jar
IGV_2.4.10.zip:
wget http://data.broadinstitute.org/igv/projects/downloads/2.4/IGV_2.4.10.zip -O tmp && mv tmp IGV_2.4.10.zip
.INTERMEDIATE: tmp
# build the Docker container from the current repo dir
DOCKER_TAG:=stevekm/igv-snapshot-automator
docker-build:
docker build -t "$(DOCKER_TAG)" .
# run the script on the test data inside the docker container
docker-test:
docker run \
--rm -ti \
-v $$PWD:$$PWD \
"$(DOCKER_TAG):latest" \
$$PWD/test_data/test_alignments.bam \
-r $$PWD/regions.bed \
-o $$PWD/snapshots
# build the Singularity container using Docker
# bind the current directory (project root dir) into the container as /host
# outputs the container file `make_IGV_snapshots.sif` in the current directory
# NOTE: singularityware/singularity:v3.3.0 has `singularity` as the entrypoint
singularity-build:
docker run --privileged --rm -ti \
-v $$PWD:/host \
singularityware/singularity:v3.3.0 \
build \
/host/make_IGV_snapshots.sif \
/host/make_IGV_snapshots.def
# recipe to shell into the singularity container with Docker
singularity-shell:
docker run --privileged --rm -ti \
-v $$PWD:/host \
singularityware/singularity:v3.3.0 \
shell \
/host/make_IGV_snapshots.sif
# run the script on the test data inside the Singularity container using Docker
# uses default paths for regions.bed and igv.jar
singularity-test:
docker run \
--privileged \
--rm -ti \
-v $$PWD:/host \
singularityware/singularity:v3.3.0 \
run \
-B /host:/host \
/host/make_IGV_snapshots.sif \
bash -c 'make_IGV_snapshots.py /IGV-snapshot-automator/test_data/test_alignments.bam -o /host/snapshots'