Debian Codegraph @

paper/containers/data/hg37/reference/build.sh

raw
1 GENCODE_VERSION=26
2 FILE="gencode.v${GENCODE_VERSION}lift37.annotation.gtf.gz"
3 ANNOURL="ftp://ftp.sanger.ac.uk/pub/gencode/Gencode_human/release_${GENCODE_VERSION}/GRCh37_mapping/${FILE}"
4 # Download the reference chromosomes and concat into single file
5 if [ ! -f hg37.fa ]
6 do
7 URL='ftp://hgdownload.cse.ucsc.edu/goldenPath/hg19/chromosomes'
8 wget -r --no-parent --no-directories -A 'chr*' $URL && \
9 zcat *.gz > hg37.fa && rm *.gz && \
10 docker run -v $(pwd):/data --rm jdidion/bwa samtools faidx /tmp/hg37.fa \
11 done && \
12 if [ ! -f ${FILE} ] \
13 do \
14 wget --no-parent --no-directories -O ${FILE} ${ANNOURL} && \
15 gunzip ${FILE} \
16 done && \
17 # Build data container
18 docker build -f Dockerfile -t jdidion/hg37_reference:latest . && \
19 rm -Rf hg37.fa*
20