Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Dockerfile #27

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM continuumio/miniconda:latest

COPY environment.yml .
RUN apt-get update -y && apt-get install -y zlib1g zlib1g-dev gcc
RUN conda update -n base -c defaults conda && \
conda env update --name base --file /environment.yml && \
rm /environment.yml

COPY SNP/ /SNP
WORKDIR /checkmate
COPY patterngenerator/ .
COPY ngscheckmate_fastq-source ./ngscheckmate_fastq-source
COPY patterngenerator ./patterngenerator
RUN cd ngscheckmate_fastq-source && alias cc=$(which gcc) && make
RUN cd patterngenerator && make
RUN chmod +x ngscheckmate_fastq-source/ngscheckmate_fastq && cp ngscheckmate_fastq-source/ngscheckmate_fastq /bin/ && cp ngscheckmate_fastq-source/ngscheckmate_fastq ./
RUN chmod +x patterngenerator/patternconverter && cp patterngenerator/patternconverter /bin/ && cp patterngenerator/patternconverter ./

COPY tests/ .
COPY ncm_fastq.py ncm_test.py ncm.py /bin/

RUN chmod +x /bin/ncm_fastq.py && chmod +x /bin/ncm.py

ENV NCM_HOME /checkmate
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ export NCM_HOME=<installation_dir>/NGSCheckMate
#### 2) Configuration (required only for the BAM module)
If your input is BAM/VCF files, add the following lines in your ncm.conf file in the package directory. If your input is FASTQ files, you can skip this step.
```
REF=<path for the reference FASTA file >
SAMTOOLS=<path for samtools>
BCFTOOLS=<path for bcftools>
export REF=<path/to/reference>
export SAMTOOLS=<path/to/samtools>
export BCFTOOLS=<path/to/bcftools>
```

#### Buid for fastq module / patterngenerator
Expand Down
16 changes: 16 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: NGSCheckMate
channels:
- anaconda
- conda-forge
- bioconda
dependencies:
- python=2.7
- samtools=1.3.1
- bcftools=1.9
- make
- zlib
- gxx_linux-64
- pip
- pip:
- requests
- git+https://github.com/SimBioSysInc/MAFpy.git
14 changes: 5 additions & 9 deletions ncm.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python

import os
import math
import subprocess, time
Expand Down Expand Up @@ -1177,15 +1179,9 @@ def run_mpileup():
else:
print "WARNNING : NCM_HOME is not defined yet. Therefore, program will try to search ncm.conf file from the current directory"
INSTALL_DIR=""
with open(INSTALL_DIR + "ncm.conf",'r') as F:
for line in F.readlines():
temp = line.split('=')
if temp[0].startswith("SAMTOOLS"):
SAMTOOLS = temp[1].strip()
elif temp[0].startswith("BCFTOOLS"):
BCFTOOLS = temp[1].strip()
elif temp[0].startswith("REF"):
REF = temp[1].strip()
SAMTOOLS = os.environ.get("SAMTOOLS", False) or "samtools"
BCFTOOLS = os.environ.get("BCFTOOLS", False) or "bcftools"
REF= os.environ.get("BCFTOOLS", False)
# REF="/NAS/nas33-2/mpileup/hg19.fasta"

version =""
Expand Down
1 change: 1 addition & 0 deletions ncm_fastq.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python
import os
import sys
import math
Expand Down
16 changes: 4 additions & 12 deletions ncm_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,18 +888,10 @@ def remove_internal_files():
def run_mpileup():


SAMTOOLS=""
BCFTOOLS=""
REF=""
with open("./ncm.conf",'r') as F:
for line in F.readlines():
temp = line.split('\"')
if temp[0].startswith("SAMTOOLS"):
SAMTOOLS = temp[1].strip()
elif temp[0].startswith("BCFTOOLS"):
BCFTOOLS = temp[1].strip()
elif temp[0].startswith("REF"):
REF = temp[1].strip()
SAMTOOLS = os.environ.get("SAMTOOLS", False) or "samtools"
BCFTOOLS = os.environ.get("BCFTOOLS", False) or "bcftools"
REF= os.environ.get("BCFTOOLS", False)

# REF="/NAS/nas33-2/mpileup/hg19.fasta"

for sample in bam_list:
Expand Down
10 changes: 5 additions & 5 deletions ngscheckmate_fastq-source/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
COMPILER = gcc
CC ?= gcc
DFLAGS =
CFLAGS = -c
OFLAGS = -lpthread -lm -lz -o
Expand All @@ -7,15 +7,15 @@ OFLAGS = -lpthread -lm -lz -o
EXECNAME = ngscheckmate_fastq

ngscheckmate: stringhash2.o ngscheckmate_functions.o ngscheckmate_main.o
${COMPILER} ${DFLAGS} stringhash2.o ngscheckmate_functions.o ngscheckmate_main.o ${OFLAGS} ${EXECNAME}
${CC} ${DFLAGS} stringhash2.o ngscheckmate_functions.o ngscheckmate_main.o ${OFLAGS} ${EXECNAME}

stringhash2.o: stringhash2.c stringhash2.h
${COMPILER} ${DFLAGS} ${CFLAGS} stringhash2.c
${CC} ${DFLAGS} ${CFLAGS} stringhash2.c

ngscheckmate_functions.o: ngscheckmate_functions.c ngscheckmate.h patternconvert.h
${COMPILER} ${DFLAGS} ${CFLAGS} ngscheckmate_functions.c patternconvert.h
${CC} ${DFLAGS} ${CFLAGS} ngscheckmate_functions.c patternconvert.h

ngscheckmate_main.o: ngscheckmate_main.c ngscheckmate.h
${COMPILER} ${DFLAGS} ${CFLAGS} ngscheckmate_main.c
${CC} ${DFLAGS} ${CFLAGS} ngscheckmate_main.c


1 change: 1 addition & 0 deletions vaf_ncm.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python
import os
import sys
import math
Expand Down