Debian Codegraph @

paper/containers/data/hg38/bwameth-index/build.sh

raw
1 # Note: The index commands require ~32G free memory -- more than we have on a
2 # desktop -- and Singularity can't mount Docker data volumes. Thus, we don't
3 # currently use this script. Instead, we copy the reference fasta to the
4 # cluster rather than getting it from the container. The Singularity command is:
5 # singularity run -H $(pwd) docker://jdidion/bwa /usr/local/bin bwameth.py index hg38.fa
6
7 # create a data volume from the reference genome image
8 #docker create -v /data/reference/hg38 --name hg38 jdidion/hg38_reference && \
9 # build the bwa index
10 # create a local volume to store the output bind reference data volume
11 # and run bwa mem from bwa image
12 # create a new image that includes the index
13 mkdir index \
14 && docker run \
15 -v $(pwd)/index:/data/index/bwameth/hg38 \
16 --volumes-from hg38 \
17 --rm jdidion/bwabase bash -c \
18 "cp /data/reference/hg38/hg38.fa /data/index/bwameth/hg38 && \
19 bwameth.py index /data/index/bwameth/hg38/hg38.fa" \
20 && docker build -f Dockerfile -t jdidion/bwameth_hg38index . \
21 && rm -Rf index