forked from StaPH-B/docker-builds
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
98 lines (82 loc) · 2.64 KB
/
Dockerfile
File metadata and controls
98 lines (82 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
ARG RELEASE_DATE="2023-10-05"
FROM ubuntu:jammy as app
# version doesn't show appear anywhere on ftp; only can be determined via command-line
# this docker image was built 2022-12-13 and this was the current version
ARG TABLE2ASN_VER="1.28.943"
ARG RELEASE_DATE
LABEL base.image="ubuntu:focal"
LABEL dockerfile.version="1"
LABEL software="NCBI's table2asn"
LABEL software.version="${TABLE2ASN_VER}"
LABEL description="Converts files of various formats to ASN.1"
LABEL website="https://www.ncbi.nlm.nih.gov/genbank/table2asn/"
LABEL license="unknown"
LABEL maintainer="Sage Wright"
LABEL maintainer.email="sage.wright@theiagen.com"
RUN apt-get update && apt-get install -y --no-install-recommends \
wget \
ca-certificates \
gzip \
libidn12 && \
apt-get autoclean && rm -rf /var/lib/apt/lists/* && \
ln -s /usr/lib/x86_64-linux-gnu/libidn.so.12 /usr/lib/x86_64-linux-gnu/libidn.so.11
WORKDIR /usr/local/bin
ENV STAPHB_TOOLS="agp_validate \
asn2all \
asn2asn \
asn2fasta \
asn2flat \
asn2fsa \
asn2gb \
asn2idx \
asn2xml \
asndisc \
asnmacro \
asnval \
asnvalidate \
fastaedit_public \
gap_stats \
gene2xml \
insdseqget \
sqn2agp \
srcchk \
table2asn "
RUN for tool in ${STAPHB_TOOLS} ; do \
echo "Downloading ${tool}" && \
wget -q https://ftp.ncbi.nlm.nih.gov/asn1-converters/versions/${RELEASE_DATE}/by_program/${tool}/linux64.${tool}.gz && \
gunzip linux64.${tool}.gz && \
mv linux64.${tool} ${tool} && \
chmod +x ${tool} ; done
ENV LC_ALL=C
CMD table2asn -help
WORKDIR /data
FROM app as test
ARG RELEASE_DATE
# NOTE: Not all of these tools support the '-help' or '-version flag'
# This ensures that all tools are in $PATH and executable
RUN for tool in ${STAPHB_TOOLS} ; do echo "Checking ${tool}" && ${tool} -help && ${tool} -version ; done
WORKDIR /test
ARG FILES="GFF3Guidance.docx \
README \
SubmissionTemplate.sbt \
VERSIONS \
asn2gb_readme.txt \
euk_NoLocusTagsORmRNAs.gff \
euk_NoLocusTagsORmRNAs.sqn \
euk_withLocusTag_and_mRNAs.gff \
euk_withLocusTag_and_mRNAs.sqn \
euk_withLocusTags_butNOmRNAs.gff \
euk_withLocusTags_butNOmRNAs.sqn \
fastaedit_public_readme.txt \
gene2xml_readme.txt \
prok_NoLocusTags.gff \
prok_NoLocusTags.sqn \
prok_withLocusTags.gff \
prok_withLocusTags.sqn \
short.fsa \
table2asn_readme.txt \
tbl2asn_readme.txt"
RUN for file in ${FILES}; do wget -q https://ftp.ncbi.nlm.nih.gov/asn1-converters/versions/${RELEASE_DATE}/documentation/${file}; done && \
fastaedit_public -in short.fsa -trim_ambig_bases -out_seq_file trimmed.fasta -out trimmed.xml && \
table2asn -i short.fsa && \
table2asn -t SubmissionTemplate.sbt -i short.fsa -o helicase.sqn