Skip to content

Commit

Permalink
Release 0.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
christiam committed Aug 15, 2022
1 parent 480f859 commit cd5f062
Show file tree
Hide file tree
Showing 38 changed files with 1,420 additions and 249 deletions.
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.1.0"
message: "If you use this software, please cite it using these metadata."
title: ElasticBLAST
version: "0.2.6"
date-released: 2022-06-08
version: "0.2.7"
date-released: 2022-08-11
license: "NCBI Public Domain"
repository-code: "https://github.com/ncbi/elastic-blast/"
authors:
Expand Down
22 changes: 22 additions & 0 deletions bin/aws-get-auto-scaling-events.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
# aws-get-auto-scaling-events.sh: Get autoscaling events for ElasticBLAST's
# AWS Batch compute environment
#
# Author: Greg Boratyn ([email protected])
# Created: Fri Aug 12 17:28:20 EDT 2022

# The script assumes that elastic-blast.log file exists
logfile=${1:-elastic-blast.log}
COMP_ENV_NAME=$(grep ComputeEnvName $logfile | tr '/' '\t' | cut -f 2 | tail -n 1)
if [ ! -z "${COMP_ENV_NAME}" ] ; then
AUTO_SCALE_GRP_NAME=$(aws autoscaling describe-auto-scaling-groups --output json | jq -Mr '.AutoScalingGroups[].AutoScalingGroupName' | grep $COMP_ENV_NAME)
if [ $? -eq 0 ] ; then
aws autoscaling describe-scaling-activities --auto-scaling-group-name $AUTO_SCALE_GRP_NAME
else
echo "Failed to find an AWS auto scaling group for the AWS Batch Compute environment $COMP_ENV_NAME"
exit 1
fi
else
echo "Failed to find an AWS Batch Compute environment in $logfile"
exit 1
fi
3 changes: 2 additions & 1 deletion bin/blast-tuner.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def main():
if args.db is not None:
try:
db_metadata = get_db_metadata(args.db, sp.get_db_mol_type(args.program),
db_source)
db_source, gcp_prj=args.gcp_project)
except FileNotFoundError:
raise UserReportError(returncode=BLASTDB_ERROR,
message=f'Metadata for BLAST database "{args.db}" was not found or database molecular type is not the same as required by BLAST program: "{args.program}"')
Expand Down Expand Up @@ -169,6 +169,7 @@ def create_arg_parser():
help='Number of residues or bases in query sequecnes')
optional.add_argument("--db-source", type=str, help="Where NCBI-provided databases are downloaded from, default: AWS", choices=['AWS', 'GCP', 'NCBI'])
optional.add_argument("--region", type=str, help=f'Cloud Service Provider region. Defaults: {ELB_DFLT_AWS_REGION} for AWS; {ELB_DFLT_GCP_REGION} for GCP')
optional.add_argument("--gcp-project", type=str, help=f'GCP project, required if --db-source or --csp-target is GCP')
optional.add_argument("--options", type=str, help='BLAST options', default='')
optional.add_argument("--db-mem-limit-factor", type=float,
help='This number times database bytes-to-cache will produce memory limit for a BLAST search. (default: 0.0: for AWS, 1.1 for GCP)')
Expand Down
1 change: 1 addition & 0 deletions docker-blast/Dockerfile-build-from-local-sources
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ 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
2 changes: 1 addition & 1 deletion 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.1.0
VERSION?=1.1.1

ifeq (, $(shell which vmtouch 2>/dev/null))
NOVMTOUCH?=--no-vmtouch
Expand Down
8 changes: 4 additions & 4 deletions docker-blast/splitq_download_db_search
Original file line number Diff line number Diff line change
Expand Up @@ -249,15 +249,15 @@ def _download_database(args, is_user, db_done):
verbose = ' --verbose --verbose --verbose --verbose --verbose --verbose' if args.verbose else ''
creds = ' --no-sign-request' if args.no_creds else ''
nprocs_to_download_db = min(MAX_PROCS_TO_DOWNLOAD_DB, int(os.cpu_count()/args.num_threads))
p = safe_exec(f"time update_blastdb.pl taxdb --decompress --source ncbi {verbose} --num_threads {nprocs_to_download_db}")
print(p.stdout.decode(), end='')
print(p.stderr.decode(), end='')
if is_user:
p = safe_exec(f"time update_blastdb.pl taxdb --source {args.source}{verbose} --num_threads {nprocs_to_download_db}")
print(p.stdout.decode(), end='')
print(p.stderr.decode(), end='')
p = safe_exec(f"time aws s3 cp --only-show-errors{creds} {os.path.join(args.db_path,'')} . --recursive --exclude * --include {args.db}.* --include taxdb.*")
print(p.stdout.decode(), end='')
print(p.stderr.decode(), end='')
else:
p = safe_exec(f"time update_blastdb.pl {args.db} --source {args.source}{verbose} --num_threads {nprocs_to_download_db}")
p = safe_exec(f"time update_blastdb.pl {args.db} --decompress --source {args.source}{verbose} --num_threads {nprocs_to_download_db}")
print(p.stdout.decode(), end='')
print(p.stderr.decode(), end='')
print('End database download')
Expand Down
Loading

0 comments on commit cd5f062

Please sign in to comment.