From 5fb4245a3d08f7107cf885639fc275a6d73ea82d Mon Sep 17 00:00:00 2001 From: zsloan Date: Mon, 6 Apr 2015 15:46:46 +0000 Subject: Removed dataSharing directory and its files since they aren't being used, but I should note that a couple of them were changed from GN1; I think that there was some attempt to implement this very early into GN2's development, but we'd probably be better off starting from scratch since a number of things have changed since then (such as the way we call queries) Removed the Singapore link from the mirrors section of the index page since it wasn't working --- wqflask/wqflask/dataSharing/SharingBody.py | 290 --------------------- wqflask/wqflask/dataSharing/SharingInfo.py | 146 ----------- wqflask/wqflask/dataSharing/SharingInfoAddPage.py | 47 ---- .../wqflask/dataSharing/SharingInfoDeletePage.py | 55 ---- wqflask/wqflask/dataSharing/SharingInfoEditPage.py | 51 ---- wqflask/wqflask/dataSharing/SharingInfoPage.py | 64 ----- .../wqflask/dataSharing/SharingInfoUpdatePage.py | 109 -------- .../wqflask/dataSharing/SharingListDataSetPage.py | 99 ------- wqflask/wqflask/dataSharing/SharingPage.py | 40 --- wqflask/wqflask/dataSharing/__init__.py | 0 wqflask/wqflask/templates/index_page.html | 1 - 11 files changed, 902 deletions(-) delete mode 100755 wqflask/wqflask/dataSharing/SharingBody.py delete mode 100755 wqflask/wqflask/dataSharing/SharingInfo.py delete mode 100755 wqflask/wqflask/dataSharing/SharingInfoAddPage.py delete mode 100755 wqflask/wqflask/dataSharing/SharingInfoDeletePage.py delete mode 100755 wqflask/wqflask/dataSharing/SharingInfoEditPage.py delete mode 100755 wqflask/wqflask/dataSharing/SharingInfoPage.py delete mode 100755 wqflask/wqflask/dataSharing/SharingInfoUpdatePage.py delete mode 100755 wqflask/wqflask/dataSharing/SharingListDataSetPage.py delete mode 100755 wqflask/wqflask/dataSharing/SharingPage.py delete mode 100755 wqflask/wqflask/dataSharing/__init__.py (limited to 'wqflask') diff --git a/wqflask/wqflask/dataSharing/SharingBody.py b/wqflask/wqflask/dataSharing/SharingBody.py deleted file mode 100755 index 880161f5..00000000 --- a/wqflask/wqflask/dataSharing/SharingBody.py +++ /dev/null @@ -1,290 +0,0 @@ -# Copyright (C) University of Tennessee Health Science Center, Memphis, TN. -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU Affero General Public License -# as published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Affero General Public License for more details. -# -# This program is available from Source Forge: at GeneNetwork Project -# (sourceforge.net/projects/genenetwork/). -# -# Contact Drs. Robert W. Williams and Xiaodong Zhou (2010) -# at rwilliams@uthsc.edu and xzhou15@uthsc.edu -# -# -# -# This module is used by GeneNetwork project (www.genenetwork.org) -# -# Created by GeneNetwork Core Team 2010/08/10 -# -# Last updated by GeneNetwork Core Team 2010/10/20 - -sharing_body_string = """ - - -

Data Set Download

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Species: - - - -
- Group: - - - -
- Type: - - - -
- Database: - - - -
-     -
- - -
- -

GeneNetwork Accession Number

-
- - - - - - - - - - - - -
GN:  E.g. 112
-     -
-
- - -""" - -sharinginfo_body_string = """ -List of DataSets
-

%s -modify this page -%s -

- - - - - -
- - - - - - - - - - - -
GN Accession: GN%s
GEO Series: %s
Title: %s
Organism: %s
Group: %s
Tissue: %s
Dataset Status: %s
Platforms: %s
Normalization: %s
- See Contact Information
-
-
- - - - - - - -
Download datasets and supplementary data files
%s
-
-
-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Summary:
%s

About the cases used to generate this set of data:
%s

About the tissue used to generate this set of data:
%s

About downloading this data set:
%s

About the array platform:
%s

About data values and data processing:
%s

Data source acknowledgment:
%s

Experiment Type:
%s

Overall Design:
%s

Contributor:
%s

Citation:
%s

Submission Date:
%s

Laboratory:
%s

Samples:
%s

-

- -""" - -sharinginfoedit_body_string = """ -

%s

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Principal Investigator

Contact Name:
Emails:
Phone:
URL:
Organization Name:
Department:
Laboratory:
Address:
City:
State:
ZIP:
Country:

Summary

Summary:

Biology

Experiment Design:
About the cases used to
generate this set of data:
About the tissue used to
generate this set of data:

Technique

About downloading this data set:
About the array platform:

Bioinformatics

About data values and
data processing:
Overall Design:

Misc

Contributor:
Citation:
Data source acknowledgment:

Administrator ONLY

GN Accesion Id:
DB Title in GN:
GEO Series:
Status:
Title:
Organism_Id (Taxonomy ID):
Organism:
Submission Date:
Platforms:
Species:
Tissue:
Normalization:
Inbred Set:
Info Page Name:
Samples:
Authorized Users:
Progress:
-""" diff --git a/wqflask/wqflask/dataSharing/SharingInfo.py b/wqflask/wqflask/dataSharing/SharingInfo.py deleted file mode 100755 index 41a75222..00000000 --- a/wqflask/wqflask/dataSharing/SharingInfo.py +++ /dev/null @@ -1,146 +0,0 @@ -# Copyright (C) University of Tennessee Health Science Center, Memphis, TN. -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU Affero General Public License -# as published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Affero General Public License for more details. -# -# This program is available from Source Forge: at GeneNetwork Project -# (sourceforge.net/projects/genenetwork/). -# -# Contact Drs. Robert W. Williams and Xiaodong Zhou (2010) -# at rwilliams@uthsc.edu and xzhou15@uthsc.edu -# -# -# -# This module is used by GeneNetwork project (www.genenetwork.org) -# -# Created by GeneNetwork Core Team 2010/08/10 -# -# Last updated by GeneNetwork Core Team 2010/10/20 - -from __future__ import print_function, division - -from pprint import pformat as pf -from collections import namedtuple - -import requests - -from dbFunction import webqtlDatabaseFunction -import SharingBody - -#import logging -#logging.basicConfig(filename="/tmp/flask_gn_log", level=logging.INFO) -# -#_log = logging.getLogger("search") -#_ch = logging.StreamHandler() -#_log.addHandler(_ch) - - - -######################################### -# Sharing Info -######################################### -class SharingInfo(object): - - def __init__(self, GN_AccessionId, InfoPageName): - print("In SharingInfo") - self.GN_AccessionId = GN_AccessionId - self.InfoPageName = InfoPageName - - def getInfo(self): - cursor = webqtlDatabaseFunction.getCursor() - if (not cursor): - return - - field_names = """Id, GEO_Series, Status, Title, Organism, Experiment_Type, - Summary, Overall_Design, Contributor, Citation, Submission_Date, - Contact_Name, Emails, Phone, URL, Organization_Name, Department, - Laboratory, Street, City, State, ZIP, Country, Platforms, - Samples, Species, Normalization, InbredSet, InfoPageName, - DB_Name, Organism_Id, InfoPageTitle, GN_AccesionId, Tissue, - AuthorizedUsers, About_Cases, About_Tissue, About_Download, - About_Array_Platform, About_Data_Values_Processing, - Data_Source_Acknowledge, Progreso """ - - # We can use string interpolation here cause we own the string - sql = """select %s from InfoFiles where """ % (field_names) - if self.GN_AccessionId: - sql += "GN_AccesionId = %s" - cursor.execute(sql, self.GN_AccessionId) - elif self.InfoPageName: - sql += "InfoPageName = %s" - cursor.execute(sql, self.InfoPageName) - else: - raise Exception('No correct parameter found') - info = cursor.fetchone() - - info = todict(field_names, info) - - # fetch datasets file list - filelist = [] - if info["GN_AccesionId"]: - url = "http://atlas.uthsc.edu/scandatasets.php?GN_AccesionId=%s" % ( - info["GN_AccesionId"]) - try: - response = requests.get(url) - except Exception as why: - log.exception("Problem conneting to:", url) - if response: - data = response.text - filelist = data.split() - - return info, filelist - - - def getBody(self, infoupdate=""): - info, filelist = self.getInfo() - if filelist: - htmlfilelist = '" - else: - htmlfilelist = "Data sets are not available or are not public yet." - - return info, htmlfilelist - #return SharingBody.sharinginfo_body_string % (info[31], info[32], infoupdate, info[32], info[1], info[3], info[30], info[4], info[27], info[33], info[2], info[23], info[26], info[11], info[15], info[16], info[18], info[19], info[20], info[21], info[22], info[13], info[12], info[14], info[14], htmlfilelist, info[6], info[35], info[36], info[37], info[38], info[39], info[40], info[5], info[7], info[8], info[9], info[10], info[17], info[24]) - - -def todict(fields, values): - """Converts sql results into a user friendly dictionary""" - new_dict = {} - fields = fields.split(",") - for counter, field in enumerate(fields): - field = field.strip() - value = values[counter] - if isinstance(value, str): - value = unicode(value, "utf-8") - new_dict[field] = value - return new_dict diff --git a/wqflask/wqflask/dataSharing/SharingInfoAddPage.py b/wqflask/wqflask/dataSharing/SharingInfoAddPage.py deleted file mode 100755 index 452fb474..00000000 --- a/wqflask/wqflask/dataSharing/SharingInfoAddPage.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (C) University of Tennessee Health Science Center, Memphis, TN. -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU Affero General Public License -# as published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Affero General Public License for more details. -# -# This program is available from Source Forge: at GeneNetwork Project -# (sourceforge.net/projects/genenetwork/). -# -# Contact Drs. Robert W. Williams and Xiaodong Zhou (2010) -# at rwilliams@uthsc.edu and xzhou15@uthsc.edu -# -# -# -# This module is used by GeneNetwork project (www.genenetwork.org) -# -# Created by GeneNetwork Core Team 2010/08/10 -# -# Last updated by GeneNetwork Core Team 2010/10/20 - -from base.templatePage import templatePage -from base import webqtlConfig -import SharingBody -import SharingInfo - - -######################################### -# Sharing Info Edit Page -######################################### -class SharingInfoAddPage(templatePage): - - def __init__(self, fd=None): - templatePage.__init__(self, fd) - if webqtlConfig.USERDICT[self.privilege] >= webqtlConfig.USERDICT['admin']: - pass - else: - heading = "Adding Info" - detail = ["You don't have the permission to add new dataset"] - self.error(heading=heading,detail=detail,error="Error") - return - self.dict['body'] = SharingBody.sharinginfoedit_body_string % ("Add new dataset", "-1", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "") diff --git a/wqflask/wqflask/dataSharing/SharingInfoDeletePage.py b/wqflask/wqflask/dataSharing/SharingInfoDeletePage.py deleted file mode 100755 index a9c785c6..00000000 --- a/wqflask/wqflask/dataSharing/SharingInfoDeletePage.py +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (C) University of Tennessee Health Science Center, Memphis, TN. -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU Affero General Public License -# as published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Affero General Public License for more details. -# -# This program is available from Source Forge: at GeneNetwork Project -# (sourceforge.net/projects/genenetwork/). -# -# Contact Drs. Robert W. Williams and Xiaodong Zhou (2010) -# at rwilliams@uthsc.edu and xzhou15@uthsc.edu -# -# -# -# This module is used by GeneNetwork project (www.genenetwork.org) -# -# Created by GeneNetwork Core Team 2010/08/10 -# -# Last updated by GeneNetwork Core Team 2010/10/20 - -from base.templatePage import templatePage -from base import webqtlConfig -from dbFunction import webqtlDatabaseFunction -import SharingBody -import SharingInfo - - -######################################### -# Sharing Info Delete Page -######################################### -class SharingInfoDeletePage(templatePage): - - def __init__(self, fd=None): - templatePage.__init__(self, fd) - if webqtlConfig.USERDICT[self.privilege] >= webqtlConfig.USERDICT['admin']: - pass - else: - heading = "Deleting Info" - detail = ["You don't have the permission to delete this dataset"] - self.error(heading=heading,detail=detail,error="Error") - return - cursor = webqtlDatabaseFunction.getCursor() - if (not cursor): - return - GN_AccessionId = fd.formdata.getvalue('GN_AccessionId') - sql = "delete from InfoFiles where GN_AccesionId=%s" - cursor.execute(sql, GN_AccessionId) - re = cursor.fetchone() - self.dict['body'] = "Delete dataset info record (GN_AccesionId=%s) successfully." % GN_AccessionId diff --git a/wqflask/wqflask/dataSharing/SharingInfoEditPage.py b/wqflask/wqflask/dataSharing/SharingInfoEditPage.py deleted file mode 100755 index c5f4ed22..00000000 --- a/wqflask/wqflask/dataSharing/SharingInfoEditPage.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (C) University of Tennessee Health Science Center, Memphis, TN. -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU Affero General Public License -# as published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Affero General Public License for more details. -# -# This program is available from Source Forge: at GeneNetwork Project -# (sourceforge.net/projects/genenetwork/). -# -# Contact Drs. Robert W. Williams and Xiaodong Zhou (2010) -# at rwilliams@uthsc.edu and xzhou15@uthsc.edu -# -# -# -# This module is used by GeneNetwork project (www.genenetwork.org) -# -# Created by GeneNetwork Core Team 2010/08/10 -# -# Last updated by GeneNetwork Core Team 2010/10/20 - -from base.templatePage import templatePage -from base import webqtlConfig -import SharingBody -import SharingInfo - - -######################################### -# Sharing Info Edit Page -######################################### -class SharingInfoEditPage(templatePage): - - def __init__(self, fd=None): - templatePage.__init__(self, fd) - if webqtlConfig.USERDICT[self.privilege] >= webqtlConfig.USERDICT['admin']: - pass - else: - heading = "Editing Info" - detail = ["You don't have the permission to edit this dataset"] - self.error(heading=heading,detail=detail,error="Error") - return - GN_AccessionId = fd.formdata.getvalue('GN_AccessionId') - InfoPageName = fd.formdata.getvalue('InfoPageName') - sharingInfoObject = SharingInfo.SharingInfo(GN_AccessionId, InfoPageName) - info, filelist = sharingInfoObject.getInfo() - self.dict['body'] = SharingBody.sharinginfoedit_body_string % (info[31], info[0], info[11], info[12], info[13], info[14], info[15], info[16], info[17], info[18], info[19], info[20], info[21], info[22], info[6], info[5], info[35], info[36], info[37], info[38], info[39], info[7], info[8], info[9], info[40], info[32], info[31], info[1], info[2], info[3], info[30], info[4], info[10], info[23], info[25], info[33], info[26], info[27], info[28], info[24], info[34], info[41]) diff --git a/wqflask/wqflask/dataSharing/SharingInfoPage.py b/wqflask/wqflask/dataSharing/SharingInfoPage.py deleted file mode 100755 index c32eec50..00000000 --- a/wqflask/wqflask/dataSharing/SharingInfoPage.py +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright (C) University of Tennessee Health Science Center, Memphis, TN. -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU Affero General Public License -# as published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Affero General Public License for more details. -# -# This program is available from Source Forge: at GeneNetwork Project -# (sourceforge.net/projects/genenetwork/). -# -# Contact Drs. Robert W. Williams and Xiaodong Zhou (2010) -# at rwilliams@uthsc.edu and xzhou15@uthsc.edu -# -# -# -# This module is used by GeneNetwork project (www.genenetwork.org) -# -# Created by GeneNetwork Core Team 2010/08/10 -# -# Last updated by GeneNetwork Core Team 2010/10/20 - -from __future__ import print_function, division - -from pprint import pformat as pf - -import urlparse - -import flask - -from base import webqtlConfig -from dbFunction import webqtlDatabaseFunction -import SharingBody -import SharingInfo - - -######################################### -# Sharing Info Page -######################################### -class SharingInfoPage(): - - def __init__(self, fd): - self.redirect_url = None # Set if you want a redirect - print("fd is:", pf(fd.__dict__)) - # Todo: Need a [0] in line below????d - GN_AccessionId = fd.get('GN_AccessionId') # Used under search datasharing - InfoPageName = fd.get('database') # Might need to add a [0] - cursor = webqtlDatabaseFunction.getCursor() - if InfoPageName and not GN_AccessionId: - sql = "select GN_AccesionId from InfoFiles where InfoPageName = %s" - cursor.execute(sql, InfoPageName) - GN_AccessionId = cursor.fetchone() - self.redirect_url = urlparse.urljoin(webqtlConfig.ROOT_URL, "/data_sharing?GN_AccessionId=%s" % GN_AccessionId) - #self.redirect_url = flask.url_for('data_sharing', GN_AccessionId=GN_AccessionId[0]) - print("set self.redirect_url") - #print("before redirect") - #return flask.redirect(url) - #print("after redirect") - else: - CauseError diff --git a/wqflask/wqflask/dataSharing/SharingInfoUpdatePage.py b/wqflask/wqflask/dataSharing/SharingInfoUpdatePage.py deleted file mode 100755 index 181f2eed..00000000 --- a/wqflask/wqflask/dataSharing/SharingInfoUpdatePage.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright (C) University of Tennessee Health Science Center, Memphis, TN. -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU Affero General Public License -# as published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Affero General Public License for more details. -# -# This program is available from Source Forge: at GeneNetwork Project -# (sourceforge.net/projects/genenetwork/). -# -# Contact Drs. Robert W. Williams and Xiaodong Zhou (2010) -# at rwilliams@uthsc.edu and xzhou15@uthsc.edu -# -# -# -# This module is used by GeneNetwork project (www.genenetwork.org) -# -# Created by GeneNetwork Core Team 2010/08/10 -# -# Last updated by GeneNetwork Core Team 2010/10/20 - -import MySQLdb - -from base.templatePage import templatePage -from base import webqtlConfig -from dbFunction import webqtlDatabaseFunction -import SharingBody -import SharingInfo - -######################################### -# Sharing Info Update Page -######################################### -class SharingInfoUpdatePage(templatePage): - - def __init__(self, fd=None): - templatePage.__init__(self, fd) - if webqtlConfig.USERDICT[self.privilege] >= webqtlConfig.USERDICT['admin']: - pass - else: - heading = "Editing Info" - detail = ["You don't have the permission to modify this file"] - self.error(heading=heading,detail=detail,error="Error") - return - cursor = webqtlDatabaseFunction.getCursor() - if (not cursor): - return - Id=fd.formdata.getvalue('Id') - GN_AccesionId=fd.formdata.getvalue('GN_AccesionId') - GEO_Series=fd.formdata.getvalue('GEO_Series') - Status=fd.formdata.getvalue('Status') - Title=fd.formdata.getvalue('Title') - Organism_Id=fd.formdata.getvalue('Organism_Id') - Organism=fd.formdata.getvalue('Organism') - Experiment_Type =fd.formdata.getvalue('Experiment_Type') - Summary=fd.formdata.getvalue('Summary') - Overall_Design=fd.formdata.getvalue('Overall_Design') - Contributor=fd.formdata.getvalue('Contributor') - Citation=fd.formdata.getvalue('Citation') - Submission_Date=fd.formdata.getvalue('Submission_Date') - Contact_Name=fd.formdata.getvalue('Contact_Name') - Emails=fd.formdata.getvalue('Emails') - Phone=fd.formdata.getvalue('Phone') - URL=fd.formdata.getvalue('URL') - Organization_Name=fd.formdata.getvalue('Organization_Name') - Department=fd.formdata.getvalue('Department') - Laboratory=fd.formdata.getvalue('Laboratory') - Street=fd.formdata.getvalue('Street') - City=fd.formdata.getvalue('City') - State=fd.formdata.getvalue('State') - ZIP=fd.formdata.getvalue('ZIP') - Country=fd.formdata.getvalue('Country') - Platforms=fd.formdata.getvalue('Platforms') - Samples=fd.formdata.getvalue('Samples') - Species=fd.formdata.getvalue('Species') - Tissue=fd.formdata.getvalue('Tissue') - Normalization=fd.formdata.getvalue('Normalization') - InbredSet=fd.formdata.getvalue('InbredSet') - InfoPageName=fd.formdata.getvalue('InfoPageName') - InfoPageTitle=fd.formdata.getvalue('InfoPageTitle') - About_Cases=fd.formdata.getvalue('About_Cases') - About_Tissue=fd.formdata.getvalue('About_Tissue') - About_Download=fd.formdata.getvalue('About_Download') - About_Array_Platform=fd.formdata.getvalue('About_Array_Platform') - About_Data_Values_Processing=fd.formdata.getvalue('About_Data_Values_Processing') - Data_Source_Acknowledge=fd.formdata.getvalue('Data_Source_Acknowledge') - AuthorizedUsers=fd.formdata.getvalue('AuthorizedUsers') - Progress=fd.formdata.getvalue('Progress') - if Id=='-1': - sharingInfoObject = SharingInfo.SharingInfo(GN_AccesionId, InfoPageName) - info, filelist = sharingInfoObject.getInfo() - if info: - heading = "Editing Info" - detail = ["The new dataset info record is duplicate."] - self.error(heading=heading, detail=detail, error="Error") - return - sql = """INSERT INTO InfoFiles SET GN_AccesionId=%s, GEO_Series=%s, Status=%s, Title=%s, Organism_Id=%s, Organism=%s, Experiment_Type=%s, Summary=%s, Overall_Design=%s, Contributor=%s, Citation=%s, Submission_Date=%s, Contact_Name=%s, Emails=%s, Phone=%s, URL=%s, Organization_Name=%s, Department=%s, Laboratory=%s, Street=%s, City=%s, State=%s, ZIP=%s, Country=%s, Platforms=%s, Samples=%s, Species=%s, Tissue=%s, Normalization=%s, InbredSet=%s, InfoPageName=%s, InfoPageTitle=%s, About_Cases=%s, About_Tissue=%s, About_Download=%s, About_Array_Platform=%s, About_Data_Values_Processing=%s, Data_Source_Acknowledge=%s, AuthorizedUsers=%s, Progreso=%s""" - cursor.execute(sql, tuple([GN_AccesionId, GEO_Series, Status, Title, Organism_Id, Organism, Experiment_Type, Summary, Overall_Design, Contributor, Citation, Submission_Date, Contact_Name, Emails, Phone, URL, Organization_Name, Department, Laboratory, Street, City, State, ZIP, Country, Platforms, Samples, Species, Tissue, Normalization, InbredSet, InfoPageName, InfoPageTitle, About_Cases, About_Tissue, About_Download, About_Array_Platform, About_Data_Values_Processing, Data_Source_Acknowledge, AuthorizedUsers, Progress])) - infoupdate="This record has been succesfully added." - else: - sql = """UPDATE InfoFiles SET GN_AccesionId=%s, GEO_Series=%s, Status=%s, Title=%s, Organism_Id=%s, Organism=%s, Experiment_Type=%s, Summary=%s, Overall_Design=%s, Contributor=%s, Citation=%s, Submission_Date=%s, Contact_Name=%s, Emails=%s, Phone=%s, URL=%s, Organization_Name=%s, Department=%s, Laboratory=%s, Street=%s, City=%s, State=%s, ZIP=%s, Country=%s, Platforms=%s, Samples=%s, Species=%s, Tissue=%s, Normalization=%s, InbredSet=%s, InfoPageName=%s, InfoPageTitle=%s, About_Cases=%s, About_Tissue=%s, About_Download=%s, About_Array_Platform=%s, About_Data_Values_Processing=%s, Data_Source_Acknowledge=%s, AuthorizedUsers=%s, Progreso=%s WHERE Id=%s""" - cursor.execute(sql, tuple([GN_AccesionId, GEO_Series, Status, Title, Organism_Id, Organism, Experiment_Type, Summary, Overall_Design, Contributor, Citation, Submission_Date, Contact_Name, Emails, Phone, URL, Organization_Name, Department, Laboratory, Street, City, State, ZIP, Country, Platforms, Samples, Species, Tissue, Normalization, InbredSet, InfoPageName, InfoPageTitle, About_Cases, About_Tissue, About_Download, About_Array_Platform, About_Data_Values_Processing, Data_Source_Acknowledge, AuthorizedUsers, Progress, Id])) - infoupdate="This record has been succesfully updated." - sharingInfoObject = SharingInfo.SharingInfo(GN_AccesionId, InfoPageName) - self.dict['body'] = sharingInfoObject.getBody(infoupdate=infoupdate) diff --git a/wqflask/wqflask/dataSharing/SharingListDataSetPage.py b/wqflask/wqflask/dataSharing/SharingListDataSetPage.py deleted file mode 100755 index 8685ac65..00000000 --- a/wqflask/wqflask/dataSharing/SharingListDataSetPage.py +++ /dev/null @@ -1,99 +0,0 @@ -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU Affero General Public License -# as published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Affero General Public License for more details. -# -# This program is available from Source Forge: at GeneNetwork Project -# (sourceforge.net/projects/genenetwork/). -# -# Contact Drs. Robert W. Williams and Xiaodong Zhou (2010) -# at rwilliams@uthsc.edu and xzhou15@uthsc.edu -# -# -# -# This module is used by GeneNetwork project (www.genenetwork.org) -# -# Created by GeneNetwork Core Team 2010/08/10 -# -# Last updated by GeneNetwork Core Team 2010/10/20 - -from htmlgen import HTMLgen2 as HT -from base import webqtlConfig - -from base.templatePage import templatePage - - -######################################### -# Sharing List DataSet Page -######################################### -class SharingListDataSetPage(templatePage): - - def __init__(self, fd=None): - templatePage.__init__(self, fd) - - if not self.openMysql(): - return - - if webqtlConfig.USERDICT[self.privilege] >= webqtlConfig.USERDICT['admin']: - pass - else: - heading = "Editing Info" - detail = ["You don't have the permission to list the datasets"] - self.error(heading=heading,detail=detail,error="Error") - return - - - TD_LR = HT.TD(height=200,width="100%",bgColor='#eeeeee') - - query = """select GN_AccesionId, InfoPageTitle, Progreso from InfoFiles order by GN_AccesionId""" - self.cursor.execute(query) - result = self.cursor.fetchall() - - heading = HT.Paragraph('Dataset Table', Class="title") - - newrecord = HT.Href(text="New Record", url="/webqtl/main.py?FormID=sharinginfoadd") - - info = "Click the accession id to view the dataset info. Click the dataset name to edit the dataset info." - - datasetTable = HT.TableLite(border=0, cellpadding=0, cellspacing=0, Class="collap", width="100%") - - tableHeaderRow = HT.TR() - tableHeaderRow.append(HT.TD("Accession Id", Class='fs14 fwb ffl b1 cw cbrb', align="center")) - tableHeaderRow.append(HT.TD("Dataset name", Class='fs14 fwb ffl b1 cw cbrb', align="center")) - tableHeaderRow.append(HT.TD("Progress", Class='fs14 fwb ffl b1 cw cbrb', align="center")) - tableHeaderRow.append(HT.TD("Operation", Class='fs14 fwb ffl b1 cw cbrb', align="center")) - datasetTable.append(tableHeaderRow) - - for one_row in result: - Accession_Id, InfoPage_title, Progress = one_row - datasetRow = HT.TR() - datasetRow.append(HT.TD(HT.Href(text="GN%s" % Accession_Id, url="/webqtl/main.py?FormID=sharinginfo&GN_AccessionId=%s" % Accession_Id, Class='fs12 fwn'), Class="fs12 fwn b1 c222")) - datasetRow.append(HT.TD(HT.Href(text="%s" % InfoPage_title, url="/webqtl/main.py?FormID=sharinginfo&GN_AccessionId=%s" % Accession_Id, Class='fs12 fwn'), Class="fs12 fwn b1 c222")) - datasetRow.append(HT.TD("%s" % Progress, Class='fs12 fwn ffl b1 c222')) - operation_edit = HT.Href(text="Edit", url="/webqtl/main.py?FormID=sharinginfoedit&GN_AccessionId=%s" % Accession_Id) - operation_delete = HT.Href(text="Delete", onClick="deleteRecord(%s); return false;" % Accession_Id) - operation = HT.TD(Class="fs12 fwn b1 c222", align="center") - operation.append(operation_edit) - operation.append("    ") - operation.append(operation_delete) - datasetRow.append(operation) - datasetTable.append(datasetRow) - - TD_LR.append(heading, HT.P(), newrecord, HT.P(), info, HT.P(), datasetTable) - - js1 = """ """ - self.dict['js1'] = js1 - self.dict['body'] = str(TD_LR) diff --git a/wqflask/wqflask/dataSharing/SharingPage.py b/wqflask/wqflask/dataSharing/SharingPage.py deleted file mode 100755 index b244a6bd..00000000 --- a/wqflask/wqflask/dataSharing/SharingPage.py +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (C) University of Tennessee Health Science Center, Memphis, TN. -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU Affero General Public License -# as published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Affero General Public License for more details. -# -# This program is available from Source Forge: at GeneNetwork Project -# (sourceforge.net/projects/genenetwork/). -# -# Contact Drs. Robert W. Williams and Xiaodong Zhou (2010) -# at rwilliams@uthsc.edu and xzhou15@uthsc.edu -# -# -# -# This module is used by GeneNetwork project (www.genenetwork.org) -# -# Created by GeneNetwork Core Team 2010/08/10 -# -# Last updated by GeneNetwork Core Team 2010/10/20 - -from base.templatePage import templatePage -import SharingBody - -######################################### -# SharingPage -######################################### - -class SharingPage(templatePage): - - def __init__(self, fd): - templatePage.__init__(self, fd) - self.dict['title'] = 'GeneNetwork Data Sharing Zone' - self.dict['body'] = SharingBody.sharing_body_string - self.dict['js2'] = 'onload="javascript:initialDatasetSelection();"' diff --git a/wqflask/wqflask/dataSharing/__init__.py b/wqflask/wqflask/dataSharing/__init__.py deleted file mode 100755 index e69de29b..00000000 diff --git a/wqflask/wqflask/templates/index_page.html b/wqflask/wqflask/templates/index_page.html index ba017bfb..5e0a92e3 100755 --- a/wqflask/wqflask/templates/index_page.html +++ b/wqflask/wqflask/templates/index_page.html @@ -211,7 +211,6 @@
  • California at UCLA
  • Germany at the HZI
  • Memphis at the U of M
  • -
  • Singapore at the NUS
  • Switzerland at the EPFL
  • -- cgit v1.2.3