| 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 and annotation |
| 4 |
# file to the cluster rather than getting it from the container. The Singularity |
| 5 |
# command is: |
| 6 |
# singularity run -H $(pwd) docker://jdidion/star /usr/local/bin $INDEX_CMD 8 |
| 7 |
|
| 8 |
THREADS=$1 |
| 9 |
GENCODE_VERSION=26 |
| 10 |
INDEX_CMD="STAR --runMode genomeGenerate --runThreadN ${THREADS} \ |
| 11 |
--genomeDir /index-build \ |
| 12 |
--genomeFastaFiles /index-build/hg37.fa \ |
| 13 |
--sjdbGTFfile /data/annotations/hg37/gencode.v${GENCODE_VERSION}lift37.annotation.gtf \ |
| 14 |
--sjdbOverhang 75 --limitGenomeGenerateRAM 16000000000" |
| 15 |
|
| 16 |
docker create -v /data/reference/hg37 --name hg37 jdidion/hg37_reference \ |
| 17 |
&& mkdir -p index \ |
| 18 |
&& docker run --rm \ |
| 19 |
-v $(pwd)/index:/index-build --volumes-from hg37 \ |
| 20 |
jdidion/starbase bash -c \ |
| 21 |
"cp /data/reference/hg37/hg37.fa /index-build && \ |
| 22 |
${INDEX_CMD}" \ |
| 23 |
&& docker build -f Dockerfile -t jdidion/star_hg38index . \ |
| 24 |
&& docker rm -v hg37 \ |
| 25 |
&& rm -Rf index |