Skip to content

Commit

Permalink
adding fasten 0.8.1 (#913)
Browse files Browse the repository at this point in the history
  • Loading branch information
erinyoung committed Mar 19, 2024
1 parent c1b020c commit 43e30e3
Show file tree
Hide file tree
Showing 3 changed files with 117 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ To learn more about the docker pull rate limits and the open source software pro
| [emm-typing-tool](https://hub.docker.com/r/staphb/emm-typing-tool) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/emm-typing-tool)](https://hub.docker.com/r/staphb/emm-typing-tool) | <ul><li>0.0.1 (no version)</li></ul> | https://github.com/phe-bioinformatics/emm-typing-tool |
| [EToKi](https://hub.docker.com/r/staphb/etoki) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/etoki)](https://hub.docker.com/r/staphb/etoki) | <ul><li>1.2.1</li></ul> | https://github.com/zheminzhou/EToKi |
| [FastANI](https://hub.docker.com/r/staphb/fastani) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/fastani)](https://hub.docker.com/r/staphb/fastani) | <ul><li>1.1</li><li>1.32</li><li>1.33</li><li>1.33 + RGDv2</li><li>[1.34](fastani/1.34)</li><li>[1.34 + RGDv2](fastani/1.34-RGDV2/)</li></ul> | https://github.com/ParBLiSS/FastANI |
| [fasten](https://hub.docker.com/r/staphb/fasten) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/fasten)](https://hub.docker.com/r/staphb/fasten) | <ul><li>[0.7.2](./fasten/0.7.2)</li></ul> | https://github.com/lskatz/fasten |
| [fasten](https://hub.docker.com/r/staphb/fasten) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/fasten)](https://hub.docker.com/r/staphb/fasten) | <ul><li>[0.7.2](./fasten/0.7.2)</li><li>[0.8.1](./fasten/0.8.1/)</li></ul> | https://github.com/lskatz/fasten |
| [Fastp](https://hub.docker.com/r/staphb/fastp) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/fastp)](https://hub.docker.com/r/staphb/fastp) | <ul><li>0.23.2</li><li>[0.23.4](fastp/0.23.4/)</li></ul> | http://opengene.org/fastp/ <br/> https://github.com/OpenGene/fastp |
| [FastTree](https://hub.docker.com/r/staphb/fasttree) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/fasttree)](https://hub.docker.com/r/staphb/fasttree) | <ul><li>2.1.11</li></ul> | http://www.microbesonline.org/fasttree/ |
| [FastQC](https://hub.docker.com/r/staphb/fastqc) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/fastqc)](https://hub.docker.com/r/staphb/fastqc) | <ul><li>0.11.8</li><li>0.11.9</li><li>0.12.1</li></ul> | https://www.bioinformatics.babraham.ac.uk/projects/fastqc/ <br/> https://github.com/s-andrews/FastQC |
Expand Down
70 changes: 70 additions & 0 deletions fasten/0.8.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Heavily influenced by https://github.com/lskatz/fasten/blob/master/Dockerfile

ARG FASTEN_VER="0.8.1"

FROM rust:1.74 as builder

ARG FASTEN_VER

RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
linux-headers-amd64 \
git \
bc \
libcurl4-openssl-dev \
libseccomp-dev && \
apt-get autoclean && rm -rf /var/lib/apt/lists/*

RUN wget -q https://github.com/lskatz/fasten/archive/refs/tags/v${FASTEN_VER}.tar.gz && \
tar -xzf v${FASTEN_VER}.tar.gz && \
cd /fasten-${FASTEN_VER} && \
cargo build --release

# just running some tests before moving on
RUN cd /fasten-${FASTEN_VER} && \
cargo build && \
for test in tests/fasten*.sh ; do bash $test ; done

FROM ubuntu:jammy as app

ARG FASTEN_VER

# '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="fasten"
LABEL software.version="${FASTEN_VER}"
LABEL description="Interleaved fastq file QC and manipulation"
LABEL website="https://github.com/lskatz/fasten"
LABEL license="https://github.com/lskatz/fasten/blob/master/LICENSE"
LABEL maintainer="Erin Young"
LABEL maintainer.email="[email protected]"

COPY --from=builder /fasten-${FASTEN_VER}/target/release /usr/local/bin

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

ENV PATH="$PATH" LC_ALL=C

# runs --help on each tool while skipping the fasten files that end in .d
CMD for tool in $(ls /usr/local/bin/fasten* | grep -v .d$) ; do $tool --help ; done

WORKDIR /data

FROM app as test

WORKDIR /test

RUN for tool in $(ls /usr/local/bin/fasten* | grep -v .d$) ; do $tool --help ; done

# downloads some TB reads and does some basic QC on them
RUN wget -q ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR166/009/ERR1664619/ERR1664619_1.fastq.gz && \
wget -q ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR166/009/ERR1664619/ERR1664619_2.fastq.gz && \
zcat ERR1664619_1.fastq.gz ERR1664619_2.fastq.gz | fasten_shuffle | fasten_metrics | column -t > fasten_metrics.txt && \
zcat ERR1664619_1.fastq.gz ERR1664619_2.fastq.gz | fasten_shuffle | fasten_clean --paired-end --min-length 2 | gzip -c > cleaned.shuffled.fastq.gz && \
head fasten_metrics.txt && wc -l ERR1664619_1.fastq.gz ERR1664619_2.fastq.gz cleaned.shuffled.fastq.gz
46 changes: 46 additions & 0 deletions fasten/0.8.1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# fasten container

Main tool: [fasten](https://github.com/lskatz/fasten/tree/master)

Code repository: https://github.com/lskatz/fasten

Basic information on how to use this tool:
- executable: fasten* (executables are found in `/usr/local/bin`)
- help: --help
- version: NA
- description: |
> A powerful manipulation suite for interleaved fastq files. Executables can read/write to stdin and stdout, and they are compatible with the interleaved fastq format. This makes it much easier to perform streaming operations using unix pipes.
There are several commands associated with fasten:
|script |Description|
|-------------------|-----------|
|[`fasten_clean`](https://lskatz.github.io/fasten/fasten_clean) | Trims and cleans a fastq file.|
|[`fasten_convert`](https://lskatz.github.io/fasten/fasten_convert) | Converts between different sequence formats like fastq, sam, fasta.|
|[`fasten_straighten`](https://lskatz.github.io/fasten/fasten_straighten)| Convert any fastq file to a standard four-line-per-entry format.|
|[`fasten_metrics`](https://lskatz.github.io/fasten/fasten_metrics) | Prints basic read metrics.|
|[`fasten_pe`](https://lskatz.github.io/fasten/fasten_pe) | Determines paired-endedness based on read IDs.|
|[`fasten_randomize`](https://lskatz.github.io/fasten/fasten_randomize) | Randomizes reads from input |
|[`fasten_combine`](https://lskatz.github.io/fasten/fasten_combine) | Combines identical reads and updates quality scores.|
|[`fasten_kmer`](https://lskatz.github.io/fasten/fasten_kmer) | Kmer counting.|
|[`fasten_normalize`](https://lskatz.github.io/fasten/fasten_normalize) | Normalize read depth by using kmer counting.|
|[`fasten_sample`](https://lskatz.github.io/fasten/fasten_sample) | Downsamples reads.|
|[`fasten_shuffle`](https://lskatz.github.io/fasten/fasten_shuffle) | Shuffles or deshuffles paired end reads.|
|[`fasten_validate`](https://lskatz.github.io/fasten/fasten_validate) | Validates your reads (deprecated in favor of `fasten_inspect` and `fasten_repair`|
|[`fasten_inspect`](https://lskatz.github.io/fasten/fasten_inspect) | adds information to read IDs such as seqlength |
|[`fasten_repair`](https://lskatz.github.io/fasten/fasten_repair) | Repairs corrupted reads |
|[`fasten_quality_filter`](https://lskatz.github.io/fasten/fasten_quality_filter) | Transforms nucleotides to "N" if the quality is low | |
|[`fasten_trim`](https://lskatz.github.io/fasten/fasten_trim) | Blunt-end trims reads | |
|[`fasten_replace`](https://lskatz.github.io/fasten/fasten_replace) | Find and replace using regex | |
|[`fasten_mutate`](https://lskatz.github.io/fasten/fasten_mutate) | introduce random mutations | |
|[`fasten_regex`](https://lskatz.github.io/fasten/fasten_regex) | Filter for reads using regex | |
|[`fasten_progress`](https://lskatz.github.io/fasten/fasten_progress) | Add progress to any place in the pipeline | |
|[`fasten_sort`](https://lskatz.github.io/fasten/fasten_sort) | Sort fastq entries | |

Full documentation: https://github.com/lskatz/fasten

## Example Usage

```bash
cat testdata/R1.fastq testdata/R2.fastq | fasten_shuffle | fasten_metrics > fasten_metrics.txt
zcat testdata/R1.fastq testdata/R2.fastq | fasten_shuffle | fasten_clean --paired-end --min-length 2 | gzip -c > cleaned.shuffled.fastq.gz
```

0 comments on commit 43e30e3

Please sign in to comment.