-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding core-snp-filter version 0.2.0 (#1125)
* adding core-snp-filter version 0.2.0 * used variable for version
- Loading branch information
Showing
4 changed files
with
91 additions
and
0 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
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 |
---|---|---|
@@ -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 |
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 |
---|---|---|
@@ -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 | ||
``` |