Skip to content

Commit

Permalink
validation function
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-combe committed Sep 23, 2024
1 parent be492b5 commit bb37025
Show file tree
Hide file tree
Showing 7 changed files with 3,990 additions and 139 deletions.
1 change: 0 additions & 1 deletion models/match.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class Match(Base):
id: Mapped[str] = mapped_column(Text, primary_key=True, nullable=False)
upload_id: Mapped[int] = mapped_column(Integer, ForeignKey("upload.id"), index=True, primary_key=True,
nullable=False)
id: Mapped[str] = mapped_column(Text, primary_key=True, nullable=False)
spectrum_id: Mapped[str] = mapped_column(Text, nullable=True)
spectra_data_id: Mapped[int] = mapped_column(Integer, nullable=True) # nullable for csv data
multiple_spectra_identification_id: Mapped[str] = mapped_column(Integer, nullable=True)
Expand Down
6 changes: 6 additions & 0 deletions parser/MzIdParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,12 @@ def iterfind_when(source, target_name, condition_name, stack_predicate, **kwargs
tag.clear()


class SqliteMzIdParser(MzIdParser):

def write_new_upload(self):
"""Overrides base class function - not needed for xiSPEC."""
self.writer.upload_id = 1

class XiSpecMzIdParser(MzIdParser):

def write_new_upload(self):
Expand Down
2 changes: 1 addition & 1 deletion parser/database/create_db_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def drop_db(connection_str):
def create_schema(connection_str):
engine = create_engine(connection_str) # , echo=True)
Base.metadata.create_all(engine)
logging.info(Base.metadata.tables)
# logging.info(Base.metadata.tables)
engine.dispose()


Expand Down
Loading

0 comments on commit bb37025

Please sign in to comment.