Skip to content

Commit

Permalink
updated to exclude the two bridge files that do not load correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinm2 committed Nov 9, 2023
1 parent 4050047 commit ca6c470
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM openjdk:11-jdk

MAINTAINER BiGCaT

ENV PORT 8080
#ENV PORT 8080

RUN apt-get update
RUN apt-get install jq -y
Expand All @@ -18,7 +18,8 @@ RUN /setup.sh
COPY startup.sh /opt/bridgedb/bridgedb/
RUN chmod +x /opt/bridgedb/bridgedb/startup.sh

EXPOSE 8183 8080
EXPOSE 8183
#8080

ENTRYPOINT /opt/bridgedb/bridgedb/startup.sh -f /opt/bridgedb-databases/gdb.config
CMD ["-D", "FOREGROUND"]
11 changes: 11 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,28 @@ cat gene.json.config >> gdb.config
cat corona.json.config >> gdb.config
cat other.json.config >> gdb.config

grep -v "Ec_Derby_Ensembl_91.bridge" gdb.config > tmpfile && mv tmpfile gdb.config
grep -v "Mx_Derby_Ensembl_85.bridge" gdb.config > tmpfile && mv tmpfile gdb.config

jq -r '.mappingFiles | .[] | select(.tested) | select(.tested|.[]|test(.|"WS")) | "\(.file)=\(.downloadURL)"' gene.json >> files.txt
jq -r '.mappingFiles | .[] | select(.tested) | select(.tested|.[]|test(.|"WS")) | "\(.file)=\(.downloadURL)"' corona.json >> files.txt
jq -r '.mappingFiles | .[] | select(.tested) | select(.tested|.[]|test(.|"WS")) | "\(.file)=\(.downloadURL)"' other.json >> files.txt

grep -v "Ec_Derby_Ensembl_91.bridge" files.txt > tmpfile && mv tmpfile files.txt
grep -v "Mx_Derby_Ensembl_85.bridge" files.txt > tmpfile && mv tmpfile files.txt


for FILE in $(cat files.txt)
do
readarray -d = -t splitFILE<<< "$FILE"
echo ${splitFILE[0]}
wget -nc -O ${splitFILE[0]} ${splitFILE[1]}
done

#Remove files that do not work
rm Ec_Derby_Ensembl_91.bridge
rm Mx_Derby_Ensembl_85.bridge

sed -i -e 's/\t/\t\/opt\/bridgedb-databases\//g' gdb.config
cp gdb.config /opt/bridgedb/bridgedb/

Expand Down

0 comments on commit ca6c470

Please sign in to comment.