-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from apldx/v1.0.0
Copy test data to container and update documentation
- Loading branch information
Showing
2 changed files
with
72 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,83 @@ | ||
docker-bam-readcount | ||
==================== | ||
|
||
Docker image for `bam-readcount` | ||
Docker image based on Ubuntu Focal with `bam-readcount` `v1.0.0` built | ||
and installed. Note that this does *not* build from `master`, but the | ||
`v1.0.0` tag. Edit the `Dockerfile` to use `master` or a different branch | ||
or tag. | ||
|
||
This image is automatically built in DockerHub: https://hub.docker.com/r/mgibio/bam-readcount | ||
|
||
Usage | ||
----- | ||
docker pull mgibio/bam-readcount | ||
|
||
The `bam-readcount` binary is installed as | ||
|
||
/usr/bin/bam-readcount | ||
|
||
|
||
Resources | ||
--------- | ||
|
||
https://github.com/genome/bam-readcount | ||
`bam-readcount` source and documentation | ||
|
||
https://docs.docker.com/ | ||
Docker documentation | ||
|
||
|
||
Usage (via `ENTRYPOINT`) | ||
------------------------ | ||
|
||
The Dockerfile sets | ||
|
||
ENTRYPOINT ["/usr/bin/bam-readcount"] | ||
|
||
so the container can be run as an executable. | ||
|
||
For example, to run `bam-readcount` on a FASTA reference `REFERENCE` and | ||
BAM file `BAMFILE` in the current working directory, you can do | ||
|
||
# --rm | ||
# Remove container when done | ||
# -v $(pwd):$(pwd) | ||
# Maps the current working directory to the same path inside the container | ||
# -w $(pwd) | ||
# Sets the working directory to the current working directory inside | ||
# the container | ||
docker run --rm -v $(pwd):$(pwd) -w $(pwd) mgibio/bam-readcount -f REFERENCE BAMFILE | ||
|
||
|
||
Usage (interactive) | ||
------------------- | ||
|
||
The `ENTRYPOINT` can be overridden for interactive use. | ||
|
||
For example, to run `bam-readcount` on test data included in the container, | ||
do | ||
|
||
# --rm | ||
# Remove container when done | ||
# -it | ||
# Docker interactive flags | ||
# --entrypoint /bin/bash | ||
# Set the Bash shell as the entrypoint | ||
docker run --rm -it --entrypoint /bin/bash mgibio/bam-readcount | ||
|
||
The container will present an interactive prompt, and the working directory | ||
will be `/opt/bam-readcount`. There is a directory `test-data` there, and | ||
`bam-readcount` can be run on this data with | ||
|
||
# -w1 | ||
# The test BAM does not have the SM tag; -w1 will report warnings | ||
# only once to avoid a warning for each read | ||
root@3a0a8df8b278:/opt/bam-readcount# bam-readcount -w1 -f test-data/ref.fa test-data/test.bam | ||
|
||
To make your own data available for interactive use within the container, | ||
use the Docker `-v` and `-w` flags to map your local directories and | ||
set a working directory, for example to use the current working local | ||
directory | ||
|
||
docker run --rm -it -v $(pwd):$(pwd) -w $(pwd) --entrypoint /bin/bash mgibio/bam-readcount | ||
|
||
|
||
|