Skip to content

Commit

Permalink
updated geo bed file uploader
Browse files Browse the repository at this point in the history
  • Loading branch information
khoroshevskyi committed Jan 8, 2025
1 parent 36927d1 commit a52a57f
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bedboss/bbuploader/cli.py
Original file line number Diff line number Diff line change
@@ -55,7 +55,7 @@ def upload_all(
False, help="Standardize pep with BEDMESS. [Default: False]"
),
use_skipper: bool = typer.Option(
True,
False,
help="Use skipper to skip projects if they were processed locally [Default: False]",
),
reinit_skipper: bool = typer.Option(
@@ -122,7 +122,7 @@ def upload_gse(
False, help="Standardize pep with BEDMESS. [Default: False]"
),
use_skipper: bool = typer.Option(
True,
False,
help="Use local skipper to skip projects if they were processed locally [Default: False]",
),
reinit_skipper: bool = typer.Option(
7 changes: 6 additions & 1 deletion bedboss/bbuploader/main.py
Original file line number Diff line number Diff line change
@@ -164,6 +164,7 @@ def upload_all(
f"Processing of '{gse_pep.name}' failed with error: {err}"
)
gse_status.status = STATUS.FAIL
gse_status.error = str(err)
session.commit()
continue

@@ -364,6 +365,7 @@ def upload_gse(
except Exception as e:
_LOGGER.error(f"Processing of '{gse}' failed with error: {e}")
gse_status.status = STATUS.FAIL
gse_status.error = str(e)
session.commit()
exit()

@@ -505,7 +507,7 @@ def _upload_gse(
_LOGGER.info(
f"Skipping: '{required_metadata.sample_name}' - already processed"
)
uploaded_files.append(sample_status.genome)
uploaded_files.append(sample_status.bed_id)
project_status.number_of_processed += 1
continue

@@ -564,9 +566,11 @@ def _upload_gse(
if skipper_obj:
skipper_obj.add_processed(sample_gsm, file_digest)
sample_status.status = STATUS.SUCCESS
sample_status.bed_id = file_digest
project_status.number_of_processed += 1

except BedBossException as exc:
_LOGGER.error(f"Processing of '{sample_gsm}' failed with error: {str(exc)}")
sample_status.status = STATUS.FAIL
sample_status.error = str(exc)
project_status.number_of_failed += 1
@@ -575,6 +579,7 @@ def _upload_gse(
skipper_obj.add_failed(sample_gsm, f"Error: {str(exc)}")

except GenimlBaseError as exc:
_LOGGER.error(f"Processing of '{sample_gsm}' failed with error: {str(exc)}")
sample_status.status = STATUS.FAIL
sample_status.error = str(exc)
project_status.number_of_failed += 1
2 changes: 1 addition & 1 deletion requirements/requirements-all.txt
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ peppy>=0.40.7
yacman>=0.8.4
requests>=2.28.2
piper>=v0.14.3
bbconf>=0.10.0
bbconf>=0.10.1
# bbconf @ git+https://github.com/databio/bbconf.git@partial_processing#egg=bbconf
refgenconf>=0.12.2
pandas>=2.0.0

0 comments on commit a52a57f

Please sign in to comment.