Skip to content
Merged
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
57 changes: 57 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Based on Jeremiah H. Savage <[email protected]> 's kent image
FROM fedora:28

MAINTAINER Alex Kotlar <[email protected]>

ENV PATH="/root/mpd-perl/bin:${PATH}" \
PERL5LIB="/root/perl5/lib/perl5:/root/mpd-perl/lib:${PERL5LIB}"

WORKDIR /root

RUN dnf install -y \
gcc \
gcc-c++ \
libpng-devel \
libuuid-devel \
make \
mariadb-devel \
patch \
perl \
rsync \
unzip \
wget \
which \
git \
openssh-clients

RUN wget http://hgdownload.cse.ucsc.edu/admin/jksrc.v371.zip \
&& unzip -q jksrc.v371.zip \
&& rm jksrc.v371.zip

RUN mkdir -p bin/x86_64 \
&& export MACHTYPE=x86_64 \
&& cd kent/src/ && make libs \
&& cd lib/ && make \
&& cd ../jkOwnLib/ && make \
&& cd ../isPcr/ && make \
&& cd /root && rm -rf kent

WORKDIR /root

RUN git clone https://bitbucket.org/wingolab/mpd-dat \
&& mkdir /root/2bit && cd $_ \
&& wget http://hgdownload.cse.ucsc.edu/goldenPath/hg38/bigZips/hg38.2bit \
&& cd /root

WORKDIR /root

ADD ./ /root/mpd-perl/

RUN curl -L https://cpanmin.us | perl - App::cpanminus \
&& mkdir -p /root/perl5/lib/perl \
&& cpanm --local-lib=/root/perl5 local::lib && eval $(perl -I /root/perl5/lib/perl5 -Mlocal::lib) \
&& cd /root/mpd-perl && cpanm MPD.tar.gz && cpanm --installdeps . \
&& git clone https://github.com/wingolab-org/mpd-c /root/mpd-c \
&& cd /root/mpd-c && make

WORKDIR /root/mpd-perl/
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,29 @@

This package assists in the automation of multiplex primer design. To get the most out of this package you will need the companion C code, which you can find [here (mpd-c)](http://github.com/wingolab-org/mpd-c).

## Installation
## Install in Docker

Run mpd-perl inside of a Docker instance. Configured for hg38.

```sh
git clone https://github.com/wingolab-org/mpd-perl && cd $_
docker build -t mpd ./

# Run
docker run <docker_args> mpd design.pl <mpd_args>
```

Example running MPD from within Docker:

```sh
# Assuming you have a /mnt/data and wish to mount it as /data inside of the docker container
# that you have ~/data/markers.txt.bed with your targets, and that you wish to write to ~/data/outdir/outfile.txt
# config/hg38.yml comes installed with this docker image, inside of the image
# if you wish, you can pass in your own config
docker run -v ~/data:/data mpd design.pl -b /data/markers.txt.bed -c config/hg38.yml -d ~/data/outdir -o outfile.txt
```

## Manual Installation

- Compiling the c binaries. Follow the instructions here: [mpd-c](http://github.com/wingolab-org/mpd-c).
- Clone the perl MPD package (e.g., `git clone https://github.com/wingolab-org/mpd-perl.git`).
Expand All @@ -14,6 +36,7 @@ This package assists in the automation of multiplex primer design. To get the mo
- See examples scripts in the `ex` directory or look at the tests, specifically, `t/05-Mpd.t` to see how to build and use the MPD object.

## Optional features

- The MPD package can be made to use the standalone binary for isPcr by Jim Kent. If you are not familiar with isPcr [here is a web version](https://genome.ucsc.edu/cgi-bin/hgPcr) which has details about obtaining the source code to build the stand alone binary.
- If you use the isPcr you will need the 2bit genome of the organism.

Expand Down
Loading