Skip to content

Commit 19e8b22

Browse files
committed
Merge branch 'hotfix/1.0.2'
2 parents 99ababb + 7f381af commit 19e8b22

10 files changed

+40
-57
lines changed

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
dist: trusty
2+
# safelist
3+
branches:
4+
only:
5+
- master
6+
- develop
7+
- /^\d+\.\d+\.\d+$/
28

39
notifications:
410
email: false

CHANGES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 1.0.2
2+
* Updated docker to install from release dist
3+
* added merged annotation list
4+
* Works with symlinked vcf files provided tabix index is at same location
5+
## 1.0.1
6+
* Updated docker file
17
## 1.0.0
28
* First working release
39

Dockerfile

Lines changed: 22 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,43 @@
1-
FROM ubuntu:20.04 as builder
2-
USER root
1+
FROM python:3.7-slim as builder
32

43
54

6-
ENV ANNOTATEVCF_VER '1.0.0'
5+
ENV ANNOTATEVCF_VER '1.0.2'
76

87
# install system tools
9-
RUN apt-get -yq update
10-
RUN apt-get install -yq --no-install-recommends \
11-
locales \
12-
g++ \
13-
make \
14-
gcc \
15-
pkg-config \
16-
python3 python3-dev python3-pip python3-setuptools python3-wheel \
17-
zlib1g-dev libbz2-dev liblzma-dev libcurl4-gnutls-dev \
18-
bcftools tabix git
198

20-
ENV CGP_OPT /opt/wtsi-cgp
21-
RUN mkdir $CGP_OPT
22-
ENV PYTHONPATH $CGP_OPT/python-lib/lib/python3.6/site-packages
9+
ENV CGP_OPT /opt/wtsi-cgp/venv
10+
11+
RUN python -m venv $CGP_OPT
12+
# Make sure we use the virtualenv:
13+
ENV PATH $CGP_OPT/bin:$CGP_OPT/python-lib/bin:$PATH
14+
ENV PYTHONPATH $CGP_OPT/python-lib/lib/python3.7/site-packages
15+
RUN pip3 install --upgrade setuptools
2316

24-
RUN locale-gen en_US.UTF-8
25-
RUN update-locale LANG=en_US.UTF-8
26-
ENV LC_ALL en_US.UTF-8
27-
ENV LANG en_US.UTF-8
17+
RUN pip3 install --install-option="--prefix=$CGP_OPT/python-lib" https://github.com/cancerit/annotateVCF/archive/${ANNOTATEVCF_VER}.tar.gz
2818

29-
COPY requirements.txt $CGP_OPT/requirements.txt
30-
RUN pip3 --no-cache-dir install -r $CGP_OPT/requirements.txt
31-
# install annotatevcf
32-
RUN pip3 --no-cache-dir install https://github.com/cancerit/annotateVCF/releases/download/${ANNOTATEVCF_VER}/annotateVcf-${ANNOTATEVCF_VER}-py3-none-any.whl
19+
COPY . .
3320

34-
COPY ..
21+
RUN python3 setup.py sdist
22+
RUN pip3 install --install-option="--prefix=$CGP_OPT/python-lib" dist/$(ls -1 dist/)
3523

36-
FROM ubuntu:20.04
24+
FROM python:3.7-slim
3725

3826
LABEL uk.ac.sanger.cgp="Cancer Genome Project, Wellcome Sanger Institute" \
39-
version="1.0.0" \
27+
version="$ANNOTATEVCF_VER" \
4028
description="Tool to perform vcf file annotation"
4129

42-
### security upgrades and cleanup
30+
# Make sure we use the virtualenv:
31+
ENV CGP_OPT /opt/wtsi-cgp/venv
32+
RUN mkdir -p $CGP_OPT
33+
COPY --from=builder $CGP_OPT $CGP_OPT
4334
RUN apt-get -yq update
4435
RUN apt-get install -yq --no-install-recommends \
45-
apt-transport-https \
46-
locales \
47-
ca-certificates \
48-
time \
49-
unattended-upgrades \
50-
python3 \
51-
zlib1g-dev libbz2-dev liblzma-dev libcurl4-gnutls-dev && \
52-
unattended-upgrade -d -v && \
53-
apt-get remove -yq unattended-upgrades && \
54-
apt-get autoremove -yq
55-
56-
57-
RUN locale-gen en_US.UTF-8
58-
RUN update-locale LANG=en_US.UTF-8
59-
60-
ENV CGP_OPT /opt/wtsi-cgp
36+
bcftools tabix
37+
#set PATHS
6138
ENV PATH $CGP_OPT/bin:$CGP_OPT/python-lib/bin:$PATH
62-
ENV PYTHONPATH $CGP_OPT/python-lib/lib/python3.6/site-packages
63-
ENV LD_LIBRARY_PATH $OPT/lib
64-
ENV LC_ALL en_US.UTF-8
65-
ENV LANG en_US.UTF-8
66-
67-
RUN mkdir -p $CGP_OPT
68-
COPY --from=builder $CGP_OPT $CGP_OPT
69-
39+
ENV PYTHONPATH $CGP_OPT/python-lib/lib/python3.7/site-packages
7040
## USER CONFIGURATION
71-
7241
RUN adduser --disabled-password --gecos '' ubuntu && chsh -s /bin/bash && mkdir -p /home/ubuntu
7342

7443
USER ubuntu

annotate/config/drvData.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"drv_genes":"lof_genes_v1.0.txt",
33
"drv_genes_prev":"lof_genes_previous_symbol.v1.0.txt",
4-
"drv_mut":"driver_mutations_grch38_v1.0.tsv.gz",
4+
"drv_mut":"driver_mutations_grch38_v1.0.2.tsv.gz",
55
"lof_consequences":["stop_lost","start_lost","ess_splice","frameshift","nonsense"],
66
"header_info":"vcf_info.txt",
77
"genome_loc":"genome_grch38.tab.gz"
167 KB
Binary file not shown.
Binary file not shown.
-167 KB
Binary file not shown.
-27.4 KB
Binary file not shown.

annotate/staticMethods.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ def input_checker(infile):
4040
checks user input file and returns it's type
4141
"""
4242
try:
43-
if os.path.isfile(infile):
43+
if os.path.exists(infile) and os.path.islink(infile):
44+
return 'y'
45+
elif os.path.isfile(infile):
4446
return 'y'
4547
else:
4648
return None
@@ -250,4 +252,4 @@ def tempdir(mypath):
250252
try:
251253
shutil.rmtree(path)
252254
except IOError:
253-
sys.stderr.write('Failed to clean up temp dir {}'.format(path))
255+
sys.stderr.write('Failed to clean up temp dir {}'.format(path))

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from setuptools import setup
44

55
config = {
6-
'version': '1.0.0',
6+
'version': '1.0.2',
77
'name': 'annotateVcf',
88
'description': 'Tool to annotate vcf files...',
99
'author': 'Shriram Bhosle',

0 commit comments

Comments
 (0)