Skip to content

Commit

Permalink
Merge pull request #1 from uclahs-cds/maotian-create-initial-commit
Browse files Browse the repository at this point in the history
Create docker image for bam-readcount 0.8.0
  • Loading branch information
maotian06 authored Nov 8, 2021
2 parents 2e4718b + b6ecbf7 commit f1269d2
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 55 deletions.
56 changes: 56 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
## Description

<!--Provide a brief summary of the PR here-->

<!--- Please read each of the following items and confirm by replacing the [ ] with a [X] --->
## Checklist

### Formatting

- [ ] I have read the [code review guidelines](https://confluence.mednet.ucla.edu/display/BOUTROSLAB/Code+Review+Guidelines) and the [code review best practice on GitHub check-list](https://confluence.mednet.ucla.edu/display/BOUTROSLAB/Code+Review+Best+Practice+on+GitHub+-+Check+List).

- [ ] The name of the branch is meaningful and well formatted following the [standards](https://confluence.mednet.ucla.edu/display/BOUTROSLAB/Code+Review+Best+Practice+on+GitHub+-+Check+List), using [AD_username (or 5 letters of AD if AD is too long)-[brief_description_of_branch].

- [ ] I have set up or verified the branch protection rule following the [github standards](https://confluence.mednet.ucla.edu/pages/viewpage.action?spaceKey=BOUTROSLAB&title=GitHub+Standards#GitHubStandards-Branchprotectionrule) before opening this pull request.

### File Updates

- [ ] I have updated the version number/dependencies and added my name to the maintainer listing in the `Dockerfile`.

- [ ] I have updated the version number/feature changes in the `README.md`.

<!--- This acknowledgement is optional if you do not want to be listed--->
- [ ] I have updated the version number and added my name to the contributors listing in the `metadata.yaml`.

- [ ] I have added the changes included in this pull request to the `CHANGELOG.md` under the next release version or unreleased, and updated the date.

<!---If any previous versions have bugs, add "deprecated" in the version tag and list the bug in the corresponding release--->
- [ ] I have drafted the new version release with any addidtions/changes and have linked the `CHANGELOG.md` in the release.

### Docker Hub Auto Build Rules

- [ ] I have created automated build rules following [this page](https://confluence.mednet.ucla.edu/display/BOUTROSLAB/How+to+set+up+automated+builds+for+Docker+Hub) and I have not manually pushed this Docker image to the `blcdsdockerregistry` on [Docker Hub](https://hub.docker.com).

### Docker Image Testing

- [ ] I have tested the Docker image with the `docker run` command as described below.

Test the Docker image with at least one A-mini sample. Verify the new Docker image works using:

```docker run -u $(id -u):$(id -g) –w <working-directory> -v <directory-you-want-to-mount>:<how-you-want-to-mount-it-within-the-docker> --rm <docker-image-name> <command-to-the-docker-with-all-parameters>```

My command:

```Provide the command you ran here```

<!--- Copy and paste the results list below for more cases that were tested--->
<!--- If the case addresses an issue that should be closed, begin with "Closes <Issue #>"--->
## Testing Results

Closes #<!--Issue #-->

- Case 1
- sample: <!-- e.g. A-mini S2.T-1, A-mini S2.T-n1 -->
- input files: <!--path to input file(s) (if more than one, list in indented bullet points below this line)-->
- config: <!--path to config file-->
- output: <!--path to output directory-->
25 changes: 2 additions & 23 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
---

## [Unreleased]
### Changed
- Changed something but it is not part of the last release.

---

## [1.0.0] - YYYY-MM-DD
## [0.8.0] - 2021-11-02
### Added
- For new features.
- Added item 1.

### Changed
- For changes in existing functionality.
- Changed item 1.

### Deprecated
- For soon-to-be removed features.

### Removed
- For now removed features.
- Removed item 1.

### Fixed
- For any bug fixes.
- Fixed item 1.

### Security
- In case of vulnerabilities.
- Create dockerfile for bam-readcount 0.8.0.
38 changes: 27 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
FROM blcdsdockerregistry/bl-base:1.0.0 AS builder
FROM ubuntu:20.04
ARG BAM_READCOUNT_VERSION=0.8.0
ARG BAM_READCOUNT_SHA512=ef2acdc9e9b581cb0e4ccea51e3cb445394733f9812f68790a171b71d5f2f089f73aa39a62a6ddf372baa174b884f7d1e52f3f2c9a2abb716599fd7832501a97
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends\
build-essential \
git-core \
cmake \
zlib1g-dev \
libncurses-dev \
patch \
wget \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*

# Use conda to install tools and dependencies into /usr/local
ARG TOOL_VERSION=X.X.X
RUN conda create -qy -p /usr/local \
-c bioconda \
-c conda-forge \
tool_name==${TOOL_VERSION}
WORKDIR /
RUN wget https://github.com/genome/bam-readcount/archive/refs/tags/v${BAM_READCOUNT_VERSION}.tar.gz && \
echo "${BAM_READCOUNT_SHA512} v${BAM_READCOUNT_VERSION}.tar.gz" | sha512sum --strict -c - && \
tar xzf v${BAM_READCOUNT_VERSION}.tar.gz &&\
rm v${BAM_READCOUNT_VERSION}.tar.gz

# Deploy the target tools into a base image
FROM ubuntu:20.04
COPY --from=builder /usr/local /usr/local
RUN mkdir bam-readcount \
&& cd bam-readcount \
&& cmake /bam-readcount-${BAM_READCOUNT_VERSION} \
&& make \
&& rm -rf /bam-readcount-v${BAM_READCOUNT_VERSION} \
&& ln -s /bam-readcount/bin/bam-readcount /usr/local/bin/bam-readcount

LABEL maintainer="Your Name <[email protected]>"
WORKDIR /app
CMD ["bash"]
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,39 @@
# docker-tool_name
Template Repository for the Boutros Lab Dockerfiles based on the bl-base image.
# docker-bam-readcount
Bam-readcount is a utility that counts DNA sequence reads in BAM and CRAM files. It generates metrics for `.bam` files at single nucleotide positions:
```
Usage: bam-readcount [OPTIONS] <bam_file> [region]
Example: bam-readcount -f ref.fa some.bam
```
The output of bam-readcount is a no header tab-separated file end with `.readcount`. For more description of bam-readcount usage and output, please see [the main github page of bam-readcount](https://github.com/genome/bam-readcount).

The bl-base image is located in the Boutros Lab Docker Hub repo: https://hub.docker.com/repository/docker/blcdsdockerregistry/bl-base
The bam-readcount image is located in the Boutros Lab Docker Hub repo [here](https://hub.docker.com/repository/docker/blcdsdockerregistry/bam-readcount).

# Documentation
Docker introduction [here](https://confluence.mednet.ucla.edu/display/BOUTROSLAB/Docker+Introduction)
The main github page of bam-readcount can be found [here](https://github.com/genome/bam-readcount) with documentations. The official latest docker image is available [here](https://hub.docker.com/r/mgibio/bam-readcount).

Dockerfile Best Practices [here](https://confluence.mednet.ucla.edu/display/BOUTROSLAB/Dockerfile+Best+Practices)

Docker image versioning standard [here](https://confluence.mednet.ucla.edu/display/BOUTROSLAB/Docker+image+versioning+standardization)
The Boutros lab docker image versioning standard [here](https://confluence.mednet.ucla.edu/display/BOUTROSLAB/Docker+image+versioning+standardization).


# Version
| Tool | Version |
|------|---------|
|tool_name| X.X.X|
|tool_name_2|X.X.X|

|bam-readcount| 0.8.0|

---

## References

1. Tool specific references can be listed here
1. Khanna, Ajay et al. “Bam-readcount -- rapid generation of basepair-resolution sequence metrics.” ArXiv arXiv:2107.12817v1. 27 Jul. 2021 Preprint.

---

## License

Author: Name1, Name2
Author: Caden Bugh, Mao Tian

[docker repo name] is licensed under the GNU General Public License version 2. See the file LICENSE for the terms of the GNU GPL license.
docker-bam-readcount is licensed under the GNU General Public License version 2. See the file LICENSE for the terms of the GNU GPL license.

<one line to give the program's name and a brief idea of what it does.>
docker-bam-readcount is a utility that runs on a BAM or CRAM file and generates low-level information about sequencing data at specific nucleotide positions.

Copyright (C) 2021 University of California Los Angeles ("Boutros Lab") All rights reserved.

Expand Down
14 changes: 7 additions & 7 deletions metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
Category: 'docker'
Description: 'Template Docker repository for tool_name' # Description of why the repository exists
Maintainers: ['YourName@mednet.ucla.edu'] # email address of maintainers
Contributors: ['Your Name'] # Full names of contributors
Description: 'Docker repository for bam-readcount' # Description of why the repository exists
Maintainers: ['[email protected]', 'maotian@mednet.ucla.edu'] # email address of maintainers
Contributors: ['Caden Bugh', 'Mao Tian'] # Full names of contributors
Languages: ['Dockerfile'] # programming languages used
Tools: ['tool_name'] # Name of the tool(s) used in the Dockerfile
Version: ['X.X.X'] # Tool version number
Purpose of tool: '' # Description of what this tool does
References: '' # is the tool/dependencies published, is there a confluence page
Tools: ['bam-readcount'] # Name of the tool(s) used in the Dockerfile
Version: ['0.8.0'] # Tool version number
Purpose of tool: 'a utility that counts DNA sequence reads in BAM and CRAM files.' # Description of what this tool does
References: 'Khanna, Ajay et al. “Bam-readcount -- rapid generation of basepair-resolution sequence metrics.” ArXiv arXiv:2107.12817v1. 27 Jul. 2021 Preprint.' # is the tool/dependencies published, is there a confluence page

0 comments on commit f1269d2

Please sign in to comment.