forked from lars-kolbowski/xiSPEC_ms_parser
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added mssing doc strings, tidy a regex in mzIdParser, rename variable…
… in schema_validate.py
- Loading branch information
1 parent
4ea4f32
commit bd35718
Showing
26 changed files
with
223 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
""" | ||
Base class for all models. | ||
""" | ||
from sqlalchemy.orm import DeclarativeBase | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,54 @@ | ||
"""Writer.py - Abstract class for writing results to a database.""" | ||
from abc import ABC, abstractmethod | ||
|
||
|
||
# Strategy interface | ||
class Writer(ABC): | ||
|
||
""" | ||
Interface for writing results to a database. | ||
""" | ||
def __init__(self, upload_id=None, pxid=None): | ||
self.pxid = pxid | ||
self.upload_id = upload_id | ||
|
||
@abstractmethod | ||
def write_data(self, table, data): | ||
""" | ||
Insert data into table. | ||
:param table: | ||
:param data: | ||
""" | ||
pass | ||
|
||
@abstractmethod | ||
def write_new_upload(self, table, data): | ||
""" | ||
Insert data into upload table and, if postgres, return the id of the new row. | ||
:param table: | ||
:param data: | ||
""" | ||
pass | ||
|
||
@abstractmethod | ||
def write_mzid_info(self, analysis_software_list, spectra_formats, | ||
provider, audits, samples, bib, upload_id): | ||
""" | ||
Update the mzid_info table with the given data. | ||
:param analysis_software_list: | ||
:param spectra_formats: | ||
:param provider: | ||
:param audits: | ||
:param samples: | ||
:param bib: | ||
:param upload_id: | ||
""" | ||
pass | ||
|
||
@abstractmethod | ||
def fill_in_missing_scores(self): | ||
""" | ||
Legacy xiSPEC thing, can be ignored, | ||
just leaving in rather than creating a backwards compatibility issue for xiSPEC | ||
todo - probably remove | ||
""" | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.