Skip to content

Commit

Permalink
Fixed #66
Browse files Browse the repository at this point in the history
Fixed #68
  • Loading branch information
khoroshevskyi committed Dec 3, 2024
1 parent 8940fb5 commit 3ad2523
Show file tree
Hide file tree
Showing 3 changed files with 275 additions and 46 deletions.
9 changes: 8 additions & 1 deletion bbconf/db_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ class Bed(Base):
ref_classifier: Mapped["GenomeRefStats"] = relationship(
"GenomeRefStats", back_populates="bed", cascade="all, delete-orphan"
)
processed: Mapped[bool] = mapped_column(
default=False, comment="Whether the bed file was processed"
)


class BedMetadata(Base):
Expand Down Expand Up @@ -255,6 +258,11 @@ class Files(Base):
bedfile: Mapped["Bed"] = relationship("Bed", back_populates="files")
bedset: Mapped["BedSets"] = relationship("BedSets", back_populates="files")

__table_args__ = (
UniqueConstraint("name", "bedfile_id"),
UniqueConstraint("name", "bedset_id"),
)


class BedFileBedSetRelation(Base):
__tablename__ = "bedfile_bedset_relation"
Expand Down Expand Up @@ -350,7 +358,6 @@ class TokenizedBed(Base):

bed: Mapped["Bed"] = relationship("Bed", back_populates="tokenized")
universe: Mapped["Universes"] = relationship(
"Universes",
"Universes",
back_populates="tokenized",
passive_deletes="all",
Expand Down
Loading

0 comments on commit 3ad2523

Please sign in to comment.