Showing
5 changed files
with
89 additions
and
3 deletions
.dockerignore
0 → 100644
1 | +nohup.out | ||
2 | +log_of_the_run.sh | ||
3 | +results/ | ||
4 | +logs/ | ||
5 | +data/ | ||
6 | +esl* | ||
7 | +.vscode/ | ||
8 | +__pycache__/ | ||
9 | +.git/ | ||
10 | +errors.txt | ||
11 | +known_issues.txt | ||
12 | +known_issues_reasons.txt | ||
13 | +kill_rnanet.sh | ||
14 | +Dockerfile | ||
15 | +LICENSE | ||
16 | +README.md | ||
17 | +automate.sh | ||
18 | +build_docker_image.sh | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
Dockerfile
0 → 100644
1 | +FROM alpine:latest | ||
2 | +COPY . /RNANet | ||
3 | +WORKDIR / | ||
4 | +RUN apk update && apk add --no-cache \ | ||
5 | + curl \ | ||
6 | + freetype-dev \ | ||
7 | + gcc g++ \ | ||
8 | + linux-headers \ | ||
9 | + lapack-dev \ | ||
10 | + make \ | ||
11 | + musl-dev \ | ||
12 | + openblas-dev \ | ||
13 | + python3 python3-dev py3-pip py3-six py3-wheel \ | ||
14 | + py3-matplotlib py3-requests py3-scipy py3-setproctitle py3-sqlalchemy py3-tqdm \ | ||
15 | + sqlite \ | ||
16 | + \ | ||
17 | + && python3 -m pip install biopython==1.76 pandas psutil pymysql && \ | ||
18 | + \ | ||
19 | + wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \ | ||
20 | + wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-2.32-r0.apk && \ | ||
21 | + apk add glibc-2.32-r0.apk && \ | ||
22 | + rm glibc-2.32-r0.apk && \ | ||
23 | + \ | ||
24 | + mkdir /3D && mkdir /sequences && \ | ||
25 | + \ | ||
26 | + mv /RNANet/x3dna-dssr /usr/local/bin/x3dna-dssr && chmod +x /usr/local/bin/x3dna-dssr && \ | ||
27 | + \ | ||
28 | + curl -SL http://eddylab.org/infernal/infernal-1.1.3.tar.gz | tar xz && cd infernal-1.1.3 && \ | ||
29 | + ./configure && make -j 16 && make install && cd easel && make install && cd / && \ | ||
30 | + \ | ||
31 | + curl -SL https://github.com/epruesse/SINA/releases/download/v1.7.1/sina-1.7.1-linux.tar.gz | tar xz && mv sina-1.7.1-linux /sina && \ | ||
32 | + ln -s /sina/bin/sina /usr/local/bin/sina && \ | ||
33 | + \ | ||
34 | + rm -rf /infernal-1.1.3 && \ | ||
35 | + \ | ||
36 | + apk del openblas-dev gcc g++ gfortran binutils \ | ||
37 | + curl \ | ||
38 | + linux-headers \ | ||
39 | + make \ | ||
40 | + musl-dev \ | ||
41 | + py3-pip py3-wheel \ | ||
42 | + freetype-dev zlib-dev | ||
43 | +VOLUME ["/3D", "/sequences", "/runDir"] | ||
44 | +WORKDIR /runDir | ||
45 | +ENTRYPOINT ["/RNANet/RNAnet.py", "--3d-folder", "/3D", "--seq-folder", "/sequences" ] | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed. Click to expand it.
build_docker_image.sh
0 → 100755
1 | +#!/bin/bash | ||
2 | + | ||
3 | +# echo "WARNING: The purpose of this file is to document how the docker image was built."; | ||
4 | +# echo "You cannot execute it directly, because of licensing reasons. Please get your own"; | ||
5 | +# echo "DSSR 2.0 executable at http://innovation.columbia.edu/technologies/CU20391"; | ||
6 | +# echo "and place it in this folder."; | ||
7 | +# exit 0; | ||
8 | + | ||
9 | +THISDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
10 | + | ||
11 | +####################################################### Dependencies ############################################################## | ||
12 | + | ||
13 | +# The $THISDIR folder is supposed to contain the x3dna-dssr executable | ||
14 | +cp `which x3dna-dssr` $THISDIR | ||
15 | + | ||
16 | +######################################################## Build Docker image ###################################################### | ||
17 | +# Execute the Dockerfile and build the image | ||
18 | +docker build -t persalteas/rnanet . | ||
19 | + | ||
20 | +############################################################## Cleaning ########################################################## | ||
21 | +rm x3dna-dssr | ||
22 | + | ||
23 | +# to run, use something like: | ||
24 | +# docker run -v /home/persalteas/Data/RNA/3D/:/3D -v /home/persalteas/Data/RNA/sequences/:/sequences -v /home/persalteas/labo/:/runDir persalteas/rnanet [ additional options here ] | ||
25 | +# Without additional options, this runs a standard pass with known issues support, log output, and no statistics. The default resolution threshold is 4.0 Angstroms. | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -329,9 +329,7 @@ def parallel_stats_pairs(f): | ... | @@ -329,9 +329,7 @@ def parallel_stats_pairs(f): |
329 | with sqlite3.connect(runDir + "/results/RNANet.db") as conn: | 329 | with sqlite3.connect(runDir + "/results/RNANet.db") as conn: |
330 | # Get comma separated lists of basepairs per nucleotide | 330 | # Get comma separated lists of basepairs per nucleotide |
331 | interactions = pd.DataFrame( | 331 | interactions = pd.DataFrame( |
332 | - sql_ask_database(conn, | 332 | + sql_ask_database(conn, f"SELECT nt_code as nt1, index_chain, paired, pair_type_LW FROM nucleotide WHERE chain_id='{cid}';"), |
333 | - f"SELECT nt_code as nt1, index_chain, paired, pair_type_LW FROM (SELECT chain_id FROM chain WHERE chain_id='{cid}') NATURAL JOIN nucleotide;", | ||
334 | - warn_every=0), | ||
335 | columns = ["nt1", "index_chain", "paired", "pair_type_LW"] | 333 | columns = ["nt1", "index_chain", "paired", "pair_type_LW"] |
336 | ) | 334 | ) |
337 | # expand the comma-separated lists in real lists | 335 | # expand the comma-separated lists in real lists | ... | ... |
-
Please register or login to post a comment