Skip to content

Commit

Permalink
Fixed #76
Browse files Browse the repository at this point in the history
  • Loading branch information
khoroshevskyi committed Jan 16, 2025
1 parent c8a2733 commit 4527eda
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions bbconf/modules/bedfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,8 +674,6 @@ def update(
"""
Update bed file to the database.
!! WARNING: this method is in development. Please, void of using it!
:param identifier: bed file identifier
:param stats: bed file results {statistics, plots, files, metadata}
:param metadata: bed file metadata (will be saved in pephub)
Expand Down Expand Up @@ -725,9 +723,18 @@ def update(
_LOGGER.info("upload_pephub set to false. Skipping pephub..")

if upload_qdrant:
self.upload_file_qdrant(
identifier, files.bed_file.path, payload=metadata.model_dump()
)
if classification.genome_alias == "hg38":
_LOGGER.info(f"Uploading bed file to qdrant.. [{identifier}]")
self.upload_file_qdrant(
identifier,
files.bed_file.path,
bed_metadata.model_dump(exclude_none=False),
)
_LOGGER.info(f"File uploaded to qdrant. {identifier}")
else:
_LOGGER.warning(
f"Could not upload to qdrant. Genome: {classification.genome_alias} is not supported."
)

with Session(self._sa_engine) as session:
bed_statement = select(Bed).where(and_(Bed.id == identifier))
Expand Down

0 comments on commit 4527eda

Please sign in to comment.