Skip to content

Commit

Permalink
additional logging
Browse files Browse the repository at this point in the history
  • Loading branch information
morsecodist committed Jul 12, 2024
1 parent ee513b4 commit e1ab92b
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions lib/idseq_utils/idseq_utils/batch_run_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def _key(self, batch_args: Dict) -> str:
def get(self, batch_args: Dict) -> Optional[str]:
try:
resp = _s3_client.get_object(Bucket=self.bucket, Key=self._key(batch_args))
return resp["Body"].read().decode()
resp["Body"].read().decode()
except ClientError as e:
if e.response["Error"]["Code"] == "NoSuchKey":
return None
Expand Down Expand Up @@ -332,11 +332,15 @@ def run_alignment(
for fn in listdir("chunks"):
if fn.endswith("json"):
os.remove(os.path.join("chunks", fn))
_s3_client.put_object_tagging(
Bucket=bucket,
Key=os.path.join(chunk_prefix, fn),
Tagging={"TagSet": [{"Key": "AlignmentCoordination", "Value": "True"}]},
)
try:
_s3_client.put_object_tagging(
Bucket=bucket,
Key=os.path.join(chunk_prefix, fn),
Tagging={"TagSet": [{"Key": "AlignmentCoordination", "Value": "True"}]},
)
except ClientError as e:
log.error(f"failed to tag '{os.path.join(chunk_prefix, fn)}'")
raise e
if aligner == "diamond":
blastx_join("chunks", result_path, aligner_args, *queries)
else:
Expand Down

0 comments on commit e1ab92b

Please sign in to comment.