-
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 ontime version 0.3.1 * Updated base and added apt-get wget * Redid test for file extension
- Loading branch information
Showing
3 changed files
with
99 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,72 @@ | ||
ARG ONTIME_VER="0.3.1" | ||
ARG TARGET="x86_64-unknown-linux-musl" | ||
|
||
FROM rust:1.76 AS builder | ||
|
||
ARG ONTIME_VER | ||
ARG TARGET | ||
|
||
RUN apt update \ | ||
&& apt install -y musl-tools | ||
|
||
RUN wget -q https://github.com/mbhall88/ontime/archive/refs/tags/${ONTIME_VER}.tar.gz && \ | ||
tar zxf ${ONTIME_VER}.tar.gz && \ | ||
rm ${ONTIME_VER}.tar.gz && \ | ||
ls / && \ | ||
cd /ontime-${ONTIME_VER} && \ | ||
rustup target add "${TARGET}" && \ | ||
cargo build --release --target "${TARGET}" && \ | ||
strip target/${TARGET}/release/ontime | ||
|
||
FROM ubuntu:jammy as app | ||
|
||
ARG ONTIME_VER | ||
ARG TARGET | ||
|
||
# '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="ontime" | ||
LABEL software.version="${ONTIME_VER}" | ||
LABEL description="Filters nanopore reads by time" | ||
LABEL website="https://github.com/mbhall88/ontime" | ||
LABEL license="https://github.com/mbhall88/ontime/blob/main/LICENSE" | ||
LABEL maintainer="Erin Young" | ||
LABEL maintainer.email="[email protected]" | ||
|
||
COPY --from=builder /ontime-${ONTIME_VER}/target/${TARGET}/release/ontime /bin/ | ||
|
||
# for playing nice with workflow managers | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
procps && \ | ||
apt-get autoclean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
ENV PATH="$PATH" \ | ||
LC_ALL=C | ||
|
||
# 'CMD' instructions set a default command when the container is run. This is typically 'tool --help.' | ||
CMD ontime --help | ||
|
||
# 'WORKDIR' sets working directory | ||
WORKDIR /data | ||
|
||
# A second FROM insruction creates a new stage | ||
# The test stage must be downstream from 'app' | ||
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 ontime --help && \ | ||
ontime --version | ||
|
||
# testing with files uploaded with prior version | ||
RUN apt-get update && apt-get install -y wget | ||
|
||
RUN wget -q https://github.com/StaPH-B/docker-builds/raw/master/ontime/0.2.3/tests/test.fastq.gz && \ | ||
ontime --to 1h test.fastq.gz -o ontime.test.fastq.gz && \ | ||
ls -alh test.fastq.gz ontime.test.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,26 @@ | ||
# ontime container | ||
|
||
Main tool: [ONTime](https://github.com/mbhall88/ontime/tree/main) | ||
|
||
Code repository: https://github.com/mbhall88/ontime | ||
|
||
Basic information on how to use this tool: | ||
- executable: ontime | ||
- help: --help | ||
- version: --version | ||
- description: Extracts nanopore reads based on when in the run reads were generated. | ||
|
||
Full documentation: https://github.com/mbhall88/ontime/tree/main | ||
|
||
WARNING : the nanopore fastq file MUST still have the time stamp on the reads in the fastq fime, so this tool is **NOT** expected to run on reads downloaded from public repositories. | ||
|
||
## Example Usage | ||
|
||
```bash | ||
# reads from the first five hours | ||
ontime --to 5h in.fq | ||
# reads after the first 24 hours | ||
ontime --from 24h in.fq | ||
# Check what the earliest and latest start times in the fastq are | ||
ontime --show in.fq | ||
``` |