Skip to content

Commit

Permalink
Merge pull request #893 from Kincekara/ska2
Browse files Browse the repository at this point in the history
adds ska2
  • Loading branch information
erinyoung authored Mar 4, 2024
2 parents dee8fcb + e9fd9fb commit f9c56b4
Show file tree
Hide file tree
Showing 4 changed files with 72 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 @@ -146,6 +146,7 @@ The licenses of the open-source software that is contained in these Docker image
| Shovill | GNU GPLv3 | https://github.com/tseemann/shovill/blob/master/LICENSE |
| SISTR | Apache 2.0 | https://github.com/phac-nml/sistr_cmd/blob/master/LICENSE |
| SKA | MIT | https://github.com/simonrharris/SKA/blob/master/LICENSE |
| SKA2 | Apache 2.0 | https://github.com/bacpop/ska.rust/blob/master/LICENSE |
| skani | MIT | https://github.com/bluenote-1577/skani/blob/main/LICENSE |
| SKESA | Public Domain | https://github.com/ncbi/SKESA/blob/master/LICENSE |
| Smalt | GNU GPLv3 | https://www.sanger.ac.uk/tool/smalt-0/ |
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ To learn more about the docker pull rate limits and the open source software pro
| [Shovill-se](https://hub.docker.com/r/staphb/shovill-se/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/shovill-se)](https://hub.docker.com/r/staphb/shovill-se) | <ul><li>1.1.0</li></ul> | https://github.com/rpetit3/shovill/tree/v1.1.0se |
| [SISTR](https://hub.docker.com/r/staphb/sistr/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/sistr)](https://hub.docker.com/r/staphb/sistr) | <ul><li>1.0.2</li><li>1.1.1</li></ul> | https://github.com/phac-nml/sistr_cmd |
| [SKA](https://hub.docker.com/r/staphb/ska/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/ska)](https://hub.docker.com/r/staphb/ska) | <ul><li>1.0</li></ul> | https://github.com/simonrharris/SKA |
| [SKA2](https://hub.docker.com/r/staphb/ska2/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/ska2)](https://hub.docker.com/r/staphb/ska2) | <ul><li>[0.3.6](./ska2/0.3.6/)</li></ul> | https://github.com/bacpop/ska.rust |
| [skani](https://github.com/bluenote-1577/skani) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/skani)](https://hub.docker.com/r/staphb/skani) | <ul><li>[0.2.0](./skani/0.2.0)</li><li>[0.2.1](./skani/0.2.1)</li></ul> | https://github.com/bluenote-1577/skani |
| [SKESA](https://hub.docker.com/r/staphb/skesa) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/skesa)](https://hub.docker.com/r/staphb/skesa) | <ul><li>2.3.0</li><li>2.4.0 (`gfa_connector` & `kmercounter` included)</li></ul> | https://github.com/ncbi/SKESA |
| [Smalt](https://hub.docker.com/r/staphb/smalt) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/smalt)](https://hub.docker.com/r/staphb/smalt) | <ul><li>0.7.6</li></ul> | https://www.sanger.ac.uk/tool/smalt-0/ |
Expand Down
46 changes: 46 additions & 0 deletions ska2/0.3.6/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
FROM ubuntu:jammy as app

ARG SKA2_VER="0.3.6"

LABEL base.image="ubuntu:jammy"
LABEL dockerfile.version="1"
LABEL software="SKA2"
LABEL software.version="${SKA2_VER}"
LABEL description="A reimplementation of the SKA package in the rust language"
LABEL website="https://github.com/bacpop/ska.rust"
LABEL license="https://github.com/bacpop/ska.rust/blob/master/LICENSE"
LABEL maintainer="Kutluhan Incekara"
LABEL maintainer.email="[email protected]"

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

RUN wget --no-check-certificate https://github.com/bacpop/ska.rust/releases/download/v${SKA2_VER}/ska-v${SKA2_VER}-ubuntu-latest-stable.tar.gz &&\
tar -C /usr/local/bin -xvf ska-v${SKA2_VER}-ubuntu-latest-stable.tar.gz ska &&\
rm ska-v${SKA2_VER}-ubuntu-latest-stable.tar.gz

ENV LC_ALL=C

CMD [ "ska", "-h" ]

WORKDIR /data

## Test ##
FROM app as test

# force bash to avoid shell errors
SHELL ["/bin/bash", "-c"]

# adapted from tutorial https://www.bacpop.org/guides/building_trees_with_ska/
RUN wget --no-check-certificate https://zenodo.org/record/8172518/files/building_trees_with_ska.tar &&\
tar -xvf building_trees_with_ska.tar assemblies/LA002.fa.gz assemblies/LA022.fa.gz assemblies/LA023.fa.gz assemblies/LA026.fa.gz &&\
paste <(ls assemblies | sed 's/[.].*$//g') <(ls -d assemblies/*) > laos_ska_input.tsv

RUN ska build -f laos_ska_input.tsv -k 31 -o laos_ska_index --threads 4 &&\
ska align --min-freq 1 --filter no-filter laos_ska_index.skf -o laos_ska_alignment.aln --threads 4 &&\
head -c 1000 laos_ska_alignment.aln &&\
grep ">" laos_ska_alignment.aln



24 changes: 24 additions & 0 deletions ska2/0.3.6/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# SKA2 container

Main tool: [SKA2](https://github.com/bacpop/ska.rust)

Code repository: https://github.com/bacpop/ska.rust

Basic information on how to use this tool:
- executable: ska
- help: -h, --help
- version: -V, --version
- description: SKA2 is a reimplementation of the SKA package in the rust language. Split k-mer analysis (version 2) uses exact matching of split k-mer sequences to align closely related sequences, typically small haploid genomes such as bacteria and viruses.

Full documentation: https://docs.rs/ska/latest/ska/

## Example Usage

```bash
# Build from two input FASTA files with a k-mer size of 31
ska build -o seqs -k 31 assemblies/seq1.fa assemblies/seq2.fa
# align
ska align --min-freq 1 --filter no-filter -o seqs seqs.skf
# map
ska map ref.fa seqs.skf -o ref_mapped.aln
```

0 comments on commit f9c56b4

Please sign in to comment.