Skip to content

Commit

Permalink
added annotation of bedfile in bedset_bedfiles function
Browse files Browse the repository at this point in the history
  • Loading branch information
khoroshevskyi committed Oct 31, 2024
1 parent 95471ce commit c3d2fa9
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions bbconf/modules/bedsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from bbconf.const import PKG_NAME
from bbconf.db_utils import Bed, BedFileBedSetRelation, BedSets, BedStats, Files
from bbconf.exceptions import BedSetExistsError, BedSetNotFoundError
from bbconf.models.bed_models import BedStatsModel
from bbconf.models.bed_models import BedStatsModel, StandardMeta
from bbconf.models.bedset_models import (
BedMetadataBasic,
BedSetBedFiles,
Expand Down Expand Up @@ -447,7 +447,16 @@ def get_bedset_bedfiles(self, identifier: str) -> BedSetBedFiles:
with Session(self._db_engine.engine) as session:
bedfiles_list = session.scalars(statement)
results = [
BedMetadataBasic(**bedfile_obj.__dict__)
BedMetadataBasic(
**bedfile_obj.__dict__,
annotation=StandardMeta(
**(
bedfile_obj.annotations.__dict__
if bedfile_obj.annotations
else {}
)
),
)
for bedfile_obj in bedfiles_list
]

Expand Down

0 comments on commit c3d2fa9

Please sign in to comment.