-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
117 additions
and
1 deletion.
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
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 |
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,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 | ||
``` |