Skip to content

Commit

Permalink
add upload_pephub cli argument
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldcampbelljr committed Feb 1, 2024
1 parent b35cb9d commit 99698bd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions bedboss/bedboss.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ def insert_pep(
no_db_commit: bool = False,
force_overwrite: bool = False,
upload_s3: bool = False,
upload_pephub: bool = False,
pm: pypiper.PipelineManager = None,
*args,
**kwargs,
Expand All @@ -244,6 +245,7 @@ def insert_pep(
:param bool no_db_commit: whether the JSON commit to the database should be skipped
:param bool force_overwrite: whether to overwrite the existing record
:param bool upload_s3: whether to upload to s3
:param bool upload_pephub: whether to push bedfiles and metadata to pephub (default: False)
:param pypiper.PipelineManager pm: pypiper object
:return: None
"""
Expand Down Expand Up @@ -295,6 +297,7 @@ def insert_pep(
force_overwrite=force_overwrite,
skip_qdrant=skip_qdrant,
upload_s3=upload_s3,
upload_pephub=upload_pephub,
pm=pm,
)
pep.samples[i].record_identifier = bed_id
Expand Down
1 change: 0 additions & 1 deletion bedboss/bedstat/bedstat.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def load_to_pephub(
"""

if is_registry_path(pep_registry_path):

parsed_pep_list = parse_registry_path(pep_registry_path)

# Combine data into a dict for sending to pephub
Expand Down
10 changes: 10 additions & 0 deletions bedboss/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ def build_argparser() -> ArgumentParser:
action="store_true",
help="whether to skip qdrant indexing",
)
sub_all.add_argument(
"--upload-pephub",
action="store_true",
help="upload to pephub",
)

# all-pep
sub_all_pep.add_argument(
Expand Down Expand Up @@ -245,6 +250,11 @@ def build_argparser() -> ArgumentParser:
"Before uploading you have to set up all necessury env vars: "
"AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_ENDPOINT_URL. [Default: False]",
)
sub_all_pep.add_argument(
"--upload-pephub",
action="store_true",
help="upload to pephub",
)

# bed_qc
sub_qc.add_argument(
Expand Down

0 comments on commit 99698bd

Please sign in to comment.