Skip to content

Commit

Permalink
moved to fixed version
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Lyon committed Apr 17, 2019
1 parent f2fef8c commit 86fb0b2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ FROM python:3.6.4
MAINTAINER "Matt Lyon" matt.lyon@bristol.ac.uk

# copy flask app to container
COPY . /app/
COPY . /app
WORKDIR /app

# install python dependencies
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
RUN pip install -r ./requirements.txt

# add watcher script
RUN mkdir /home/bin
ADD watcher.py /home/bin
ADD ./watcher.py /home/bin
RUN chmod 775 /home/bin/watcher.py

# Path
Expand Down
11 changes: 4 additions & 7 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,16 @@
import pysam
from harmonise import Harmonise
from datetime import datetime
import git
import os
import json
from param import Param
import sys


def main():
repo = git.Repo(os.path.dirname(os.path.realpath(__file__)))
sha = repo.head.object.hexsha
version = "1.0.0"

parser = argparse.ArgumentParser(description='Map GWAS summary statistics to VCF/BCF')
parser.add_argument('-v', '--version', action='version', version='%(prog)s {}'.format(sha))
parser.add_argument('-v', '--version', action='version', version='%(prog)s {}'.format(version))
parser.add_argument('--out', dest='out', required=True, help='Path to output VCF/BCF')
parser.add_argument('--data', dest='gwas', required=True, help='Path to GWAS summary stats')
parser.add_argument('--ref', dest='fasta', required=True, help='Path to reference FASTA')
Expand All @@ -37,7 +34,7 @@ def main():
if args.log:
logging.basicConfig(level=getattr(logging, args.log), format='%(asctime)s %(levelname)s %(message)s')

logging.info("GWAS Harmonisation {}".format(sha))
logging.info("GWAS Harmonisation {}".format(version))

# check values are valid
if args.cohort_frac_cases is not None:
Expand Down Expand Up @@ -106,7 +103,7 @@ def main():
logging.info("Skipped {} of {}".format(total_variants - len(harmonised), total_variants))

params = {
'gwas_harmonisation_command': ' '.join(sys.argv[1:]) + "; " + sha,
'gwas_harmonisation_command': ' '.join(sys.argv[1:]) + "; " + version,
'file_date': datetime.now().isoformat(),
'counts.total_variants': total_variants,
'counts.variants_not_read': total_variants - len(gwas),
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
biopython==1.72
GitPython==2.1.11
pysam==0.15.2
marshmallow==2.18.1

0 comments on commit 86fb0b2

Please sign in to comment.