From 811c21fa0f02173c55218d6322512944cc71369d Mon Sep 17 00:00:00 2001 From: sureshhewa Date: Fri, 8 Dec 2023 07:45:55 +0000 Subject: [PATCH] rename fix --- .env | 2 +- xi_web_api/models/detailedview.py | 32 ----------------------------- xi_web_api/models/proteindetails.py | 17 --------------- xi_web_api/models/summary.py | 10 --------- xiview_server/app.py | 4 ++-- 5 files changed, 3 insertions(+), 62 deletions(-) delete mode 100644 xi_web_api/models/detailedview.py delete mode 100644 xi_web_api/models/proteindetails.py delete mode 100644 xi_web_api/models/summary.py diff --git a/.env b/.env index d81ef52..6785c51 100644 --- a/.env +++ b/.env @@ -1,3 +1,3 @@ PYTHONHASHSEED=0 -FLASK_APP="xiview_server/pride_loader.py" +FLASK_APP="xiview_server/app.py" XI2XIVIEWLOADER_SETTINGS=config \ No newline at end of file diff --git a/xi_web_api/models/detailedview.py b/xi_web_api/models/detailedview.py deleted file mode 100644 index 7fb8309..0000000 --- a/xi_web_api/models/detailedview.py +++ /dev/null @@ -1,32 +0,0 @@ -from xi_web_api.models.proteindetails import ProteinDetails - - -class DetailedView: - - def __init__(self, accession, title, description, pubmed_id, protein_details): - self.accession = accession - self.title = title - self.description = description - self.pubmed_id = pubmed_id - self.protein_details = protein_details - - def add_protein_details(self, protein_details): - if isinstance(protein_details, ProteinDetails): - self.protein_details.append(protein_details) - else: - print("Invalid protein_details object. Please provide a protein_details instance.") - - def remove_protein_details(self, protein_details): - if protein_details in self.protein_details: - self.protein_details.remove(protein_details) - else: - print("Protein details not found in the Detailed View.") - - # def to_dict(self): - # return { - # 'accession': self.accession, - # 'title': self.title, - # 'description': self.description, - # 'pubmed_id': self.pubmed_id, - # 'protein_details': self.protein_details - # } \ No newline at end of file diff --git a/xi_web_api/models/proteindetails.py b/xi_web_api/models/proteindetails.py deleted file mode 100644 index 9d1e856..0000000 --- a/xi_web_api/models/proteindetails.py +++ /dev/null @@ -1,17 +0,0 @@ -class ProteinDetails: - - def __init__(self, proteins, peptides, spectra, cross_linking, pdb): - self.proteins = proteins - self.peptides = peptides - self.spectra = spectra - self.cross_linking = cross_linking - self.pdb = pdb - - # def to_dict(self): - # return { - # 'proteins': self.self.proteins, - # 'peptides': self.self.peptides, - # 'spectra': self.self.spectra, - # 'cross_linking': self.self.cross_linking, - # 'pdb': self.self.pdb - # } diff --git a/xi_web_api/models/summary.py b/xi_web_api/models/summary.py deleted file mode 100644 index b03bd61..0000000 --- a/xi_web_api/models/summary.py +++ /dev/null @@ -1,10 +0,0 @@ -class Summary: - - def __init__(self): - self.accession = "" - self.title = "" - self.pubmed_id = "" - self.proteins = 0 - self.peptides = 0 - self.spectra = 0 - self.aggregated_view = "" diff --git a/xiview_server/app.py b/xiview_server/app.py index da08bbd..00d1aee 100644 --- a/xiview_server/app.py +++ b/xiview_server/app.py @@ -27,8 +27,8 @@ def create_app(): # add CORS header CORS(app) - from xi2annotator import bp as xi2_bp - app.register_blueprint(xi2_bp) + # from xi2annotator import bp as xi2_bp + # app.register_blueprint(xi2_bp) @app.route('/network.html', methods=['GET']) def network():