|
| 1 | +ARG RELEASE_DATE="2025-09-16" |
| 2 | + |
| 3 | +FROM ubuntu:jammy AS app |
| 4 | + |
| 5 | +# The directory structure is by date as opposed to version. |
| 6 | +# A list of software versions should be found at a location similar to https://ftp.ncbi.nlm.nih.gov/asn1-converters/versions/CURRENT/documentation/VERSIONS |
| 7 | +ARG TABLE2ASN_VER="1.29.324" |
| 8 | +ARG RELEASE_DATE |
| 9 | + |
| 10 | +LABEL base.image="ubuntu:jammy" |
| 11 | +LABEL dockerfile.version="1" |
| 12 | +LABEL software="NCBI's table2asn" |
| 13 | +LABEL software.version="${TABLE2ASN_VER}" |
| 14 | +LABEL description="Converts files of various formats to ASN.1" |
| 15 | +LABEL website="https://www.ncbi.nlm.nih.gov/genbank/table2asn/" |
| 16 | +LABEL license="unknown" |
| 17 | +LABEL maintainer="Sage Wright" |
| 18 | +LABEL maintainer.email= "[email protected]" |
| 19 | + |
| 20 | +RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 21 | + wget \ |
| 22 | + ca-certificates \ |
| 23 | + gzip \ |
| 24 | + libidn12 \ |
| 25 | + libsqlite3-0 && \ |
| 26 | + apt-get autoclean && rm -rf /var/lib/apt/lists/* && \ |
| 27 | + ln -s /usr/lib/x86_64-linux-gnu/libidn.so.12 /usr/lib/x86_64-linux-gnu/libidn.so.11 |
| 28 | + |
| 29 | +WORKDIR /usr/local/bin |
| 30 | + |
| 31 | +ENV STAPHB_TOOLS="agp_validate \ |
| 32 | + asn2all \ |
| 33 | + asn2asn \ |
| 34 | + asn2fasta \ |
| 35 | + asn2flat \ |
| 36 | + asn2fsa \ |
| 37 | + asn2gb \ |
| 38 | + asn2idx \ |
| 39 | + asn2xml \ |
| 40 | + asndisc \ |
| 41 | + asnmacro \ |
| 42 | + asnval \ |
| 43 | + asnvalidate \ |
| 44 | + gap_stats \ |
| 45 | + gene2xml \ |
| 46 | + insdseqget \ |
| 47 | + sbtedit \ |
| 48 | + sqn2agp \ |
| 49 | + srcchk \ |
| 50 | + table2asn " |
| 51 | + |
| 52 | +RUN for tool in ${STAPHB_TOOLS} ; do \ |
| 53 | + echo "Downloading ${tool}" && \ |
| 54 | + wget -q https://ftp.ncbi.nlm.nih.gov/asn1-converters/versions/${RELEASE_DATE}/by_program/${tool}/linux64.${tool}.gz && \ |
| 55 | + gunzip linux64.${tool}.gz && \ |
| 56 | + mv linux64.${tool} ${tool} && \ |
| 57 | + chmod +x ${tool} ; done |
| 58 | + |
| 59 | +ENV LC_ALL=C |
| 60 | + |
| 61 | +CMD ["table2asn", "-help"] |
| 62 | + |
| 63 | +WORKDIR /data |
| 64 | + |
| 65 | +FROM app AS test |
| 66 | + |
| 67 | +ARG RELEASE_DATE |
| 68 | + |
| 69 | +# NOTE: Not all of these tools support the '-help' or '-version flag' |
| 70 | +# This ensures that all tools are in $PATH and executable |
| 71 | +RUN for tool in ${STAPHB_TOOLS} ; do echo "Checking ${tool}" && ${tool} -help && ${tool} -version ; done |
| 72 | + |
| 73 | +WORKDIR /test |
| 74 | + |
| 75 | +RUN wget https://ftp.ncbi.nlm.nih.gov/asn1-converters/versions/${RELEASE_DATE}/documentation/short.fsa && \ |
| 76 | + wget https://ftp.ncbi.nlm.nih.gov/asn1-converters/versions/${RELEASE_DATE}/documentation/SubmissionTemplate.sbt && \ |
| 77 | + table2asn -i short.fsa && \ |
| 78 | + table2asn -t SubmissionTemplate.sbt -i short.fsa -o helicase.sqn |
0 commit comments