Skip to content

Commit

Permalink
Release 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
christiam committed Dec 1, 2023
1 parent f35e19a commit dc06839
Show file tree
Hide file tree
Showing 46 changed files with 729 additions and 1,655 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/build-multi-pex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
python-version: ["3.8"]

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Build PEX file
Expand All @@ -28,7 +28,7 @@ jobs:
- name: Create tarball
run: tar -czvf elastic-blast-no-suffix.tar.gz elastic-blast elastic-blast.md5
- name: Produce downloadable artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: elastic-blast-no-suffix
path: elastic-blast-no-suffix.tar.gz
Expand All @@ -38,16 +38,16 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ["3.8", "3.9", "3.10"]

steps:

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Build PEX file
Expand All @@ -60,7 +60,7 @@ jobs:
- name: Create tarball
run: tar -czvf elastic-blast${{ matrix.python-version }}.tar.gz elastic-blast${{ matrix.python-version }} elastic-blast${{ matrix.python-version }}.md5
- name: Produce downloadable artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: elastic-blast-${{ matrix.python-version }}
path: elastic-blast${{ matrix.python-version }}.tar.gz
Expand All @@ -70,21 +70,21 @@ jobs:
needs: [build-single, build-multiple]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
- name: Display structure of downloaded files
run: ls -lR
- name: Create tarball
run: |
tar axvf elastic-blast-no-suffix/elastic-blast-no-suffix.tar.gz
tar axvf elastic-blast-3.7/elastic-blast3.7.tar.gz
tar axvf elastic-blast-3.8/elastic-blast3.8.tar.gz
tar axvf elastic-blast-3.9/elastic-blast3.9.tar.gz
tar axvf elastic-blast-3.10/elastic-blast3.10.tar.gz
rm -fvr elastic-blast-*.tar.gz
tar -czvf ~/elastic-blast.tar.gz elastic-blast elastic-blast*md5 elastic-blast3.[789]
tar -czvf ~/elastic-blast.tar.gz elastic-blast elastic-blast*md5 elastic-blast3.*
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: elastic-blast
path: ~/elastic-blast.tar.gz
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ submit-and-wait-for-results.sh
aws-docker-login.txt
elb-run-report.csv
aws-credentials
.elb-venv
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cff-version: "1.2.0"
message: "If you use this software, please cite it using these metadata."
title: ElasticBLAST
version: "1.1.0"
date-released: 2023-05-11
version: "1.2.0"
date-released: 2023-11-27
license: "NCBI Public Domain"
repository-code: "https://github.com/ncbi/elastic-blast/"
url: "https://blast.ncbi.nlm.nih.gov/doc/elastic-blast/"
Expand Down
4 changes: 3 additions & 1 deletion bin/blast-tuner.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ def main():
if args.total_query_length:
query_data = SeqData(args.total_query_length,
sp.get_query_mol_type(args.program))

# MT mode is only used to inform selection of ElasticBLAST batch-length, memory,
# and machine type as the best guess. BLAST+ selects MT mode.
mt_mode = get_mt_mode(args.program, args.options, db_metadata, query_data)
options += f' {mt_mode}'

num_cpus = get_num_cpus(cloud_provider = cloud_provider,
program = args.program,
Expand Down
9 changes: 5 additions & 4 deletions bin/elastic-blast
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ from elastic_blast.config import configure
from elastic_blast.elb_config import ElasticBlastConfig
from elastic_blast.constants import ElbCommand
from elastic_blast.constants import ELB_DFLT_LOGLEVEL, ELB_DFLT_LOGFILE
from elastic_blast.constants import CFG_CLOUD_PROVIDER, CFG_CP_GCP_PROJECT
from elastic_blast.constants import CFG_BLAST_RESULTS, CFG_BLAST, ELB_GCS_PREFIX

DESC = r"""This application facilitates running BLAST on large amounts of query sequence data
on the cloud"""
Expand Down Expand Up @@ -75,7 +75,8 @@ def main():
cfg = configure(args)
logging.info(f"ElasticBLAST {args.subcommand} {VERSION}")
logging.info(f'python version: {":".join(sys.version.split())}')
if CFG_CP_GCP_PROJECT in cfg[CFG_CLOUD_PROVIDER]:
if CFG_BLAST_RESULTS in cfg[CFG_BLAST] and \
cfg[CFG_BLAST][CFG_BLAST_RESULTS].startswith(ELB_GCS_PREFIX):
check_prerequisites()
else:
check_auxiliary_versions()
Expand Down Expand Up @@ -113,8 +114,8 @@ def reject_string_with_unicode(content: str) -> None:


def reject_cli_args_with_unicode(args: List[str]) -> None:
for arg in args:
reject_string_with_unicode(arg)
for arg in args:
reject_string_with_unicode(arg)


def file_must_exist(path: str) -> str:
Expand Down
28 changes: 6 additions & 22 deletions docker-blast/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,42 +18,26 @@
#
# Please cite NCBI in any work or product based on this material.

FROM ncbi/blast:latest as blast
FROM ncbi/blast:2.15.0 as blast
ARG version
LABEL Description="NCBI BLAST" Vendor="NCBI/NLM/NIH" Version=${version} [email protected]

FROM google/cloud-sdk:slim
# FROM resets ARGs, thus repeated ARG instruction
ARG version

USER root
WORKDIR /root/

COPY requirements.txt .
RUN python3 -m pip install --no-cache-dir --upgrade pip && \
python3 -m pip install --no-cache-dir -r requirements.txt && \
rm -frv requirements.txt

RUN apt-get -y -m update && \
apt-get install -y libgomp1 libnet-perl libidn11 libxml-simple-perl libjson-perl perl-doc liblmdb-dev time parallel vmtouch cpanminus curl wget libio-socket-ssl-perl libhtml-parser-perl unzip && \
apt-get install -y python3 python3-pip time parallel vmtouch curl wget unzip && \
rm -rf /var/lib/apt/lists/*

RUN mkdir -p /blast/bin /blast/lib
COPY --from=blast /blast/bin /blast/bin
COPY --from=blast /blast/lib /blast/lib
COPY --from=blast /root/edirect /root/edirect
RUN python3 -m pip install --no-cache-dir --upgrade pip && \
python3 -m pip install --no-cache-dir -r requirements.txt && \
rm -frv requirements.txt

COPY splitq_download_db_search /blast/bin/
RUN sed -i -e "s/\$VERSION/$version/" /blast/bin/splitq_download_db_search
COPY fasta-split /blast/bin/


RUN mkdir -p /blast/blastdb /blast/blastdb_custom
RUN sed -i '$ a BLASTDB=/blast/blastdb:/blast/blastdb_custom' /etc/environment
ENV BLASTDB /blast/blastdb:/blast/blastdb_custom
ENV PATH="/root/edirect:/blast/bin:${PATH}"


WORKDIR /blast

CMD ["/bin/bash"]

1 change: 0 additions & 1 deletion docker-blast/Dockerfile-build-from-local-sources
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ RUN apt-get -y -m update && \

RUN mkdir -p /blast/bin /blast/lib
COPY --from=blast /blast/bin /blast/bin
COPY update_blastdb.pl /blast/bin
COPY --from=blast /blast/lib /blast/lib
COPY --from=blast /root/edirect /root/edirect
COPY splitq_download_db_search /blast/bin/
Expand Down
6 changes: 3 additions & 3 deletions docker-blast/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ GCP_IMG?=gcr.io/ncbi-sandbox-blast/${IMG}
AWS_SERVER?=public.ecr.aws/i6v3i0i9
AWS_IMG?=${AWS_SERVER}/elasticblast-elb
AWS_REGION?=us-east-1
VERSION?=1.2.0
VERSION?=1.3.1

ifeq (, $(shell which vmtouch 2>/dev/null))
NOVMTOUCH?=--no-vmtouch
Expand Down Expand Up @@ -95,8 +95,8 @@ aws-check:

.PHONY: clean
clean:
-docker image rm ${IMG}:${VERSION} ${IMG}:latest
${RM} -fr .env
docker image rm ${IMG}:${VERSION} ${IMG}:latest || true
${RM} -r .env

.PHONY: check
check:
Expand Down
2 changes: 1 addition & 1 deletion docker-blast/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ awscli
filelock
boto3
ec2_metadata==2.4.0
requests==2.25.1
requests>=2.31.0
Loading

0 comments on commit dc06839

Please sign in to comment.