Skip to content

Commit

Permalink
adding core-snp-filter version 0.2.0 (#1125)
Browse files Browse the repository at this point in the history
* adding core-snp-filter version 0.2.0

* used variable for version
  • Loading branch information
erinyoung authored Dec 17, 2024
1 parent 2dafbe8 commit 18e30fa
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 0 deletions.
1 change: 1 addition & 0 deletions Program_Licenses.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ The licenses of the open-source software that is contained in these Docker image
| CirculoCov | GNU GPLv3 | https://github.com/erinyoung/CirculoCov/blob/main/LICENSE |
| Clair3 | non-standard | https://github.com/HKU-BAL/Clair3/blob/main/LICENSE.md |
| colorid | MIT | https://github.com/hcdenbakker/colorid/blob/master/LICENSE |
| Core-SNP-filter | GNU General Public License v3.0 | https://github.com/rrwick/Core-SNP-filter/blob/main/LICENSE |
| datasets-sars-cov-2 | Apache 2.0 | https://github.com/CDCgov/datasets-sars-cov-2/blob/master/LICENSE |
| diamond | GNU GPLv3 | https://github.com/bbuchfink/diamond/blob/master/LICENSE |
| dnaapler | MIT | https://github.com/gbouras13/dnaapler/blob/main/LICENSE |
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ To learn more about the docker pull rate limits and the open source software pro
| [Clair3](https://hub.docker.com/r/staphb/clair3) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/clair3)](https://hub.docker.com/r/staphb/clair3) | <ul><li>[1.0.9](./clair3/1.0.9/)</li><li>[1.0.10](./clair3/1.0.10/)</li></ul> | https://github.com/HKU-BAL/Clair3 |
| [Clustalo](https://hub.docker.com/r/staphb/clustalo) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/clustalo)](https://hub.docker.com/r/staphb/clustalo) | <ul><li>1.2.4</li></ul> | http://www.clustal.org/omega/ |
| [colorid](https://hub.docker.com/r/staphb/colorid) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/colorid)](https://hub.docker.com/r/staphb/colorid) | <ul><li>0.1.4.3</li></ul> | https://github.com/hcdenbakker/colorid |
| [Core-SNP-filter](https://hub.docker.com/r/staphb/core-snp-filter) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/core-snp-filter)](https://hub.docker.com/r/staphb/core-snp-filter) | <ul><li>[0.2.0](./core-snp-filter/0.2.0/)</li></ul> | https://github.com/rrwick/Core-SNP-filter |
| [cutshaw-report-env](https://hub.docker.com/r/staphb/cutshaw-report-env) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/cutshaw-report-env)](https://hub.docker.com/r/staphb/cutshaw-report-env) | <ul><li>1.0.0</li></ul> | https://github.com/VADGS/CutShaw |
| [datasets-sars-cov-2](https://github.com/CDCgov/datasets-sars-cov-2) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/datasets-sars-cov-2)](https://hub.docker.com/r/staphb/datasets-sars-cov-2) | <ul><li>0.6.2</li><li>0.6.3</li><li>0.7.2</li></ul> | https://github.com/CDCgov/datasets-sars-cov-2 |
| [dnaapler](https://hub.docker.com/r/staphb/dnaapler) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/dnaapler)](https://hub.docker.com/r/staphb/dnaapler) | <ul><li>[0.1.0](dnaapler/0.1.0/)</li></ul> <ul><li>[0.4.0](dnaapler/0.4.0/)</li><li>[0.5.0](dnaapler/0.5.0/)</li><li>[0.5.1](dnaapler/0.5.1/)</li><li>[0.7.0](dnaapler/0.7.0/)</li><li>[0.8.0](dnaapler/0.8.0/)</li><li>[1.0.1](dnaapler/1.0.1/)</li></ul> | https://github.com/gbouras13/dnaapler |
Expand Down
53 changes: 53 additions & 0 deletions core-snp-filter/0.2.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
FROM ubuntu:jammy as app

ARG CORESNPFILTER_VER="0.2.0"

# 'LABEL' instructions tag the image with metadata that might be important to the user
LABEL base.image="ubuntu:jammy"
LABEL dockerfile.version="1"
LABEL software="Core-SNP-filter"
LABEL software.version="${CORESNPFILTER_VER}"
LABEL description="This is a tool to filter sites (i.e. columns) in a FASTA-format whole-genome pseudo-alignment"
LABEL website="https://github.com/rrwick/Core-SNP-filter"
LABEL license="https://github.com/rrwick/Core-SNP-filter/blob/main/LICENSE"
LABEL maintainer="Erin Young"
LABEL maintainer.email="eriny@utah.gov"

RUN apt-get update && apt-get install -y --no-install-recommends \
wget \
ca-certificates && \
apt-get autoclean && rm -rf /var/lib/apt/lists/*

WORKDIR /usr/local/bin

RUN wget -q https://github.com/rrwick/Core-SNP-filter/releases/download/v${CORESNPFILTER_VER}/coresnpfilter-linux-x86_64-musl-v${CORESNPFILTER_VER}.tar.gz && \
tar -vxf coresnpfilter-linux-x86_64-musl-v${CORESNPFILTER_VER}.tar.gz && \
rm -rf coresnpfilter-linux-x86_64-musl-v${CORESNPFILTER_VER}.tar.gz

ENV LC_ALL=C

CMD [ "coresnpfilter", "--help" ]

# 'WORKDIR' sets working directory
WORKDIR /data

##### ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- #####
##### Step 2. Set up the testing stage. #####
##### The docker image is built to the 'test' stage before merging, but #####
##### the test stage (or any stage after 'app') will be lost. #####
##### ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- #####

# A second FROM insruction creates a new stage
FROM app as test

# set working directory so that all test inputs & outputs are kept in /test
WORKDIR /test

# print help and version info; check dependencies (not all software has these options available)
# Mostly this ensures the tool of choice is in path and is executable
RUN coresnpfilter --help && \
coresnpfilter --version

RUN wget -q https://github.com/rrwick/Core-SNP-filter/raw/refs/heads/main/demo.fasta.gz && \
coresnpfilter -e -c 0.95 demo.fasta.gz > demo_core.fasta && \
head demo_core.fasta
36 changes: 36 additions & 0 deletions core-snp-filter/0.2.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Core-SNP-filter container

Main tool: [Core-SNP-filter](https://github.com/rrwick/Core-SNP-filter)

Code repository: https://github.com/rrwick/Core-SNP-filter

Basic information on how to use this tool:
- executable: coresnpfilter
- help: -h
- version: -V
- description: |

> This is a tool to filter sites (i.e. columns) in a FASTA-format whole-genome pseudo-alignment based on:
> - Whether the site contains variation or not.
> - How conserved the site is, i.e. contains an unambiguous base in a sufficient fraction of the sequences.
Full documentation: https://github.com/rrwick/Core-SNP-filter

## Example Usage

```bash
# Exclude invariant sites:
coresnpfilter -e core.full.aln > filtered.aln

# With a strict core threshold (same as Snippy's core.aln):
coresnpfilter -e -c 1.0 core.full.aln > filtered.aln

# With a slightly more relaxed core threshold:
coresnpfilter -e -c 0.95 core.full.aln > filtered.aln

# Use gzipped files to save disk space:
coresnpfilter -e -c 0.95 core.full.aln.gz | gzip > filtered.aln.gz

# Running without any options will work, but the output will be the same as the input:
coresnpfilter core.full.aln > filtered.aln
```

0 comments on commit 18e30fa

Please sign in to comment.