Louis BECQUEY

Dockerization

nohup.out
log_of_the_run.sh
results/
logs/
data/
esl*
.vscode/
__pycache__/
.git/
errors.txt
known_issues.txt
known_issues_reasons.txt
kill_rnanet.sh
Dockerfile
LICENSE
README.md
automate.sh
build_docker_image.sh
\ No newline at end of file
FROM alpine:latest
COPY . /RNANet
WORKDIR /
RUN apk update && apk add --no-cache \
curl \
freetype-dev \
gcc g++ \
linux-headers \
lapack-dev \
make \
musl-dev \
openblas-dev \
python3 python3-dev py3-pip py3-six py3-wheel \
py3-matplotlib py3-requests py3-scipy py3-setproctitle py3-sqlalchemy py3-tqdm \
sqlite \
\
&& python3 -m pip install biopython==1.76 pandas psutil pymysql && \
\
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-2.32-r0.apk && \
apk add glibc-2.32-r0.apk && \
rm glibc-2.32-r0.apk && \
\
mkdir /3D && mkdir /sequences && \
\
mv /RNANet/x3dna-dssr /usr/local/bin/x3dna-dssr && chmod +x /usr/local/bin/x3dna-dssr && \
\
curl -SL http://eddylab.org/infernal/infernal-1.1.3.tar.gz | tar xz && cd infernal-1.1.3 && \
./configure && make -j 16 && make install && cd easel && make install && cd / && \
\
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 && \
ln -s /sina/bin/sina /usr/local/bin/sina && \
\
rm -rf /infernal-1.1.3 && \
\
apk del openblas-dev gcc g++ gfortran binutils \
curl \
linux-headers \
make \
musl-dev \
py3-pip py3-wheel \
freetype-dev zlib-dev
VOLUME ["/3D", "/sequences", "/runDir"]
WORKDIR /runDir
ENTRYPOINT ["/RNANet/RNAnet.py", "--3d-folder", "/3D", "--seq-folder", "/sequences" ]
\ No newline at end of file
This diff is collapsed. Click to expand it.
#!/bin/bash
# echo "WARNING: The purpose of this file is to document how the docker image was built.";
# echo "You cannot execute it directly, because of licensing reasons. Please get your own";
# echo "DSSR 2.0 executable at http://innovation.columbia.edu/technologies/CU20391";
# echo "and place it in this folder.";
# exit 0;
THISDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
####################################################### Dependencies ##############################################################
# The $THISDIR folder is supposed to contain the x3dna-dssr executable
cp `which x3dna-dssr` $THISDIR
######################################################## Build Docker image ######################################################
# Execute the Dockerfile and build the image
docker build -t persalteas/rnanet .
############################################################## Cleaning ##########################################################
rm x3dna-dssr
# to run, use something like:
# 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 ]
# 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
......@@ -329,9 +329,7 @@ def parallel_stats_pairs(f):
with sqlite3.connect(runDir + "/results/RNANet.db") as conn:
# Get comma separated lists of basepairs per nucleotide
interactions = pd.DataFrame(
sql_ask_database(conn,
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;",
warn_every=0),
sql_ask_database(conn, f"SELECT nt_code as nt1, index_chain, paired, pair_type_LW FROM nucleotide WHERE chain_id='{cid}';"),
columns = ["nt1", "index_chain", "paired", "pair_type_LW"]
)
# expand the comma-separated lists in real lists
......