项目作者: vsoch

项目描述 :
run the parse pileup perl script using Docker
高级语言: Perl
项目地址: git://github.com/vsoch/mpileup.git
创建时间: 2018-06-22T22:24:24Z
项目社区:https://github.com/vsoch/mpileup

开源协议:

下载


mpileup

This is a Docker container to run the parse_pileup_query.pl
script. You can connect this repository to Docker Hub as an automated build
so that the container builds automatically when you commit.

Build

To build the container locally:

  1. docker build -t vanessa/mpileup .

You can also use the one built from this repo on Dockerhub, vanessa/mpileup.

Usage

Interactive

First let’s show how to interact with the container, meaning shelling inside
and looking at the software we have.

  1. $ docker run -it --entrypoint bash vanessa/mpileup
  2. root@34c4600bd019:~# which perl
  3. /usr/local/bin/perl
  4. root@34c4600bd019:~# which samtools
  5. /usr/local/bin/samtools

To access data from your host in the container, you would need to bind a data folder.
Exit from the container and do this command again with -v, which means volume.

  1. $ docker run -it --entrypoint bash -v $PWD/data:/tmp/data vanessa/mpileup
  2. # Here is the mounted data!
  3. root@b95145c080a4:~# ls /tmp/data/
  4. test.bam test.bam.bai test.list.chr2.txt

Let’s now try running the script

  1. cd /code
  2. perl Query_Editing_Level.GRCh37.20161110.pl /tmp/data/test.list.chr2.txt /tmp/data/test.bam /tmp/data/test.out

Note that the reference genome is an example, chr2.fa in the same directory as the script in the
container /code. If you want to change this file, change this line:

  1. my $genomepath = "chr2.fa"; #PATH TO REFERENCE GENOME

External

Likely you want to run this from outside the container, and to do this you will still need to bind the data,
and then reference the path in the container the data is bound to. The entrypoint to the container is the script, so if you run it without arguments,
you will see it. The same command above would look like this:

  1. $ docker run -it -v $PWD/data:/tmp/data vanessa/mpileup
  2. need to provide 3 input:Edit Site list, INDEXED BAM alignment file and output file name

And so then you can provide your data to get it running again! Note that we are providing paths to /tmp/data
where the container has bound to our $PWD/data (location on the host)

  1. docker run -it -v $PWD/data:/tmp/data vanessa/mpileup /tmp/data/test.list.chr2.txt /tmp/data/test.bam /tmp/data/test.out
  2. [mpileup] 1 samples in 1 input files
  3. ...