From 4ea8b8a5efc848c99767894cbdbef2f135e3b83c Mon Sep 17 00:00:00 2001 From: Lei Yan Date: Thu, 18 Dec 2014 16:51:47 +0000 Subject: Committer: Lei Yan On branch master --- wqflask/wqflask/docs.py | 1 + wqflask/wqflask/templates/docedit.html | 20 ++++++++++++++++++++ wqflask/wqflask/templates/docs.html | 5 +++++ wqflask/wqflask/templates/testhtmleditor.html | 20 -------------------- wqflask/wqflask/views.py | 7 ++++--- 5 files changed, 30 insertions(+), 23 deletions(-) create mode 100755 wqflask/wqflask/templates/docedit.html delete mode 100755 wqflask/wqflask/templates/testhtmleditor.html (limited to 'wqflask') diff --git a/wqflask/wqflask/docs.py b/wqflask/wqflask/docs.py index 65255987..07b0b81a 100755 --- a/wqflask/wqflask/docs.py +++ b/wqflask/wqflask/docs.py @@ -11,5 +11,6 @@ class Docs(object): WHERE Docs.entry LIKE '%s' """ result = g.db.execute(sql % (entry)).fetchone() + self.entry = entry self.title = result[0] self.content = result[1] diff --git a/wqflask/wqflask/templates/docedit.html b/wqflask/wqflask/templates/docedit.html new file mode 100755 index 00000000..1a9e8ca8 --- /dev/null +++ b/wqflask/wqflask/templates/docedit.html @@ -0,0 +1,20 @@ +{% extends "base.html" %} + +{% block title %}Edit: {{title}}{% endblock %} + +{% block content %} +
+

Edit: {{title}}

+
+ + + +
+
+{% endblock %} diff --git a/wqflask/wqflask/templates/docs.html b/wqflask/wqflask/templates/docs.html index cbaf1e70..08f95721 100755 --- a/wqflask/wqflask/templates/docs.html +++ b/wqflask/wqflask/templates/docs.html @@ -5,6 +5,11 @@ {% block content %}

{{title}}

+
+ + + +
{{content|safe}}
{% endblock %} diff --git a/wqflask/wqflask/templates/testhtmleditor.html b/wqflask/wqflask/templates/testhtmleditor.html deleted file mode 100755 index 1d258d0e..00000000 --- a/wqflask/wqflask/templates/testhtmleditor.html +++ /dev/null @@ -1,20 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Test html editor{% endblock %} - -{% block content %} -
-

Test HTML Editor

-
- - - -
-
-{% endblock %} diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index cdf93147..deb566ba 100755 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -134,9 +134,10 @@ def search_page(): else: return render_template("search_result_page.html", **result) -@app.route("/testhtmleditor") -def testhtmleditor_page(): - return render_template("testhtmleditor.html") +@app.route("/docedit") +def docedit(): + doc = docs.Docs(request.args['entry']) + return render_template("docedit.html", **doc.__dict__) @app.route("/help") def help(): -- cgit v1.2.3 From 723fcb3723d16e4ef476b0fc7471f7a770ed01be Mon Sep 17 00:00:00 2001 From: Lei Yan Date: Fri, 13 Feb 2015 18:18:49 +0000 Subject: Committer: Lei Yan On branch master --- wqflask/wqflask/news.py | 16 ++++++++++++++++ wqflask/wqflask/templates/news.html | 21 +++++++++++++++++++++ wqflask/wqflask/views.py | 13 ++++--------- 3 files changed, 41 insertions(+), 9 deletions(-) create mode 100755 wqflask/wqflask/news.py create mode 100755 wqflask/wqflask/templates/news.html (limited to 'wqflask') diff --git a/wqflask/wqflask/news.py b/wqflask/wqflask/news.py new file mode 100755 index 00000000..62dc1bbb --- /dev/null +++ b/wqflask/wqflask/news.py @@ -0,0 +1,16 @@ +from __future__ import absolute_import, print_function, division +import sys +reload(sys) +sys.setdefaultencoding('utf8') +from flask import g + +class News(object): + + def __init__(self): + sql = """ + SELECT News.id, News.date, News.details + FROM News + order by News.date desc + """ + self.title = "GeneNetwork News" + self.newslist = g.db.execute(sql).fetchall() diff --git a/wqflask/wqflask/templates/news.html b/wqflask/wqflask/templates/news.html new file mode 100755 index 00000000..0a19dcee --- /dev/null +++ b/wqflask/wqflask/templates/news.html @@ -0,0 +1,21 @@ +{% extends "base.html" %} + +{% block title %}{{title}}{% endblock %} + +{% block content %} +
+

{{title}}

+ + + {% for newsitem in newslist %} + + + + + {% endfor %} + +
+ {{newsitem.date}} + {{newsitem.details|safe}}
+
+{% endblock %} diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index deb566ba..7c0f4e14 100755 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -30,6 +30,7 @@ from flask import (render_template, request, make_response, Response, from wqflask import search_results from wqflask import docs +from wqflask import news from base.data_set import DataSet # Used by YAML in marker_regression from base.data_set import create_datasets_list from wqflask.show_trait import show_trait @@ -145,15 +146,9 @@ def help(): return render_template("docs.html", **doc.__dict__) @app.route("/news") -def news(): - #variables = whats_new.whats_new() - with open("/home/sam/gene/wqflask/wqflask/yaml_data/whats_new.yaml") as fh: - contents = fh.read() - yamilized = yaml.safe_load(contents) - news_items = yamilized['news'] - for news_item in news_items: - print("\nnews_item is: %s\n" % (news_item)) - return render_template("whats_new.html", news_items=news_items) +def news_route(): + newsobject = news.News() + return render_template("news.html", **newsobject.__dict__) @app.route("/references") def references(): -- cgit v1.2.3 From 0e21a58cfe7ca1ec6c1d84c43e1d2fd2d0b9104c Mon Sep 17 00:00:00 2001 From: Lei Yan Date: Fri, 13 Feb 2015 19:54:00 +0000 Subject: Committer: Lei Yan On branch master --- wqflask/wqflask/templates/news.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/news.html b/wqflask/wqflask/templates/news.html index 0a19dcee..4f0032b8 100755 --- a/wqflask/wqflask/templates/news.html +++ b/wqflask/wqflask/templates/news.html @@ -5,11 +5,11 @@ {% block content %}

{{title}}

- +
{% for newsitem in newslist %} - -- cgit v1.2.3 From 4cc7ee25f11553b8d0a1386eabfbe99c75fd0e38 Mon Sep 17 00:00:00 2001 From: zsloan Date: Tue, 31 Mar 2015 19:15:47 +0000 Subject: Fixed some aesthetic issues on the main page and removed references to TemplatePage --- wqflask/wqflask/correlation/show_corr_results.py | 1 - .../wqflask/correlation_matrix/show_corr_matrix.py | 1 - wqflask/wqflask/dataSharing/SharingInfoPage.py | 4 +- wqflask/wqflask/show_trait/show_trait.py | 1 - .../wqflask/static/packages/bootstrap/css/docs.css | 13 +++-- wqflask/wqflask/templates/base.html | 15 +++-- wqflask/wqflask/templates/index_page.html | 66 ++++++++-------------- 7 files changed, 39 insertions(+), 62 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py index ade2d242..aa37c29e 100755 --- a/wqflask/wqflask/correlation/show_corr_results.py +++ b/wqflask/wqflask/correlation/show_corr_results.py @@ -45,7 +45,6 @@ from utility.THCell import THCell from utility.TDCell import TDCell from base.trait import GeneralTrait from base import data_set -from base.templatePage import templatePage from utility import webqtlUtil, helper_functions, corr_result_helpers from dbFunction import webqtlDatabaseFunction import utility.webqtlUtil #this is for parallel computing only. diff --git a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py index d734117e..e1df5b24 100755 --- a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py +++ b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py @@ -48,7 +48,6 @@ from utility.THCell import THCell from utility.TDCell import TDCell from base.trait import GeneralTrait from base import data_set -from base.templatePage import templatePage from utility import webqtlUtil, helper_functions, corr_result_helpers from dbFunction import webqtlDatabaseFunction import utility.webqtlUtil #this is for parallel computing only. diff --git a/wqflask/wqflask/dataSharing/SharingInfoPage.py b/wqflask/wqflask/dataSharing/SharingInfoPage.py index 7ad44440..c32eec50 100755 --- a/wqflask/wqflask/dataSharing/SharingInfoPage.py +++ b/wqflask/wqflask/dataSharing/SharingInfoPage.py @@ -32,7 +32,6 @@ import urlparse import flask -from base.templatePage import templatePage from base import webqtlConfig from dbFunction import webqtlDatabaseFunction import SharingBody @@ -42,10 +41,9 @@ import SharingInfo ######################################### # Sharing Info Page ######################################### -class SharingInfoPage(templatePage): +class SharingInfoPage(): def __init__(self, fd): - templatePage.__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 diff --git a/wqflask/wqflask/show_trait/show_trait.py b/wqflask/wqflask/show_trait/show_trait.py index 11fd2644..929f5abb 100755 --- a/wqflask/wqflask/show_trait/show_trait.py +++ b/wqflask/wqflask/show_trait/show_trait.py @@ -19,7 +19,6 @@ from utility import webqtlUtil, Plot, Bunch, helper_functions from base.trait import GeneralTrait from base import data_set from dbFunction import webqtlDatabaseFunction -from base.templatePage import templatePage from basicStatistics import BasicStatisticsFunctions from pprint import pformat as pf diff --git a/wqflask/wqflask/static/packages/bootstrap/css/docs.css b/wqflask/wqflask/static/packages/bootstrap/css/docs.css index b95c44ed..2d6a713c 100755 --- a/wqflask/wqflask/static/packages/bootstrap/css/docs.css +++ b/wqflask/wqflask/static/packages/bootstrap/css/docs.css @@ -25,25 +25,28 @@ h3 code { /* Tweak navbar brand link to be super sleek -------------------------------------------------- */ - +/* body > .navbar { font-size: 12px; font-weight: bold; } +*/ /* Change the docs' brand */ -body > .navbar .brand { - padding-right: 0; - padding-left: 0; + +body > .navbar .navbar-brand { + padding-right: 20px; + padding-left: 20px; margin-left: 20px; float: left; font-weight: bold; - color: #336699; + color: #ffffff; text-shadow: 0 1px 0 rgba(255,255,255,.1), 0 0 30px rgba(255,255,255,.125); -webkit-transition: all .2s linear; -moz-transition: all .2s linear; transition: all .2s linear; } + body > .navbar .brand:hover { text-decoration: none; text-shadow: 0 1px 0 rgba(255,255,255,.1), 0 0 30px rgba(255,255,255,.4); diff --git a/wqflask/wqflask/templates/base.html b/wqflask/wqflask/templates/base.html index 3d4e6d28..462a59a2 100755 --- a/wqflask/wqflask/templates/base.html +++ b/wqflask/wqflask/templates/base.html @@ -73,6 +73,13 @@
  • Search
  • +
  • + Collections + {% if g.user_session.user_ob %} + {{ g.user_session.user_ob.display_num_collections() }} + {% endif %} + +
  • Help
  • @@ -91,14 +98,6 @@
  • Environments
  • -
  • - Collections - {% if g.user_session.user_ob %} - {{ g.user_session.user_ob.display_num_collections() }} - {% endif %} - -
  • -
  • {% if g.user_session.logged_in %} Sign out diff --git a/wqflask/wqflask/templates/index_page.html b/wqflask/wqflask/templates/index_page.html index 538a6799..ba017bfb 100755 --- a/wqflask/wqflask/templates/index_page.html +++ b/wqflask/wqflask/templates/index_page.html @@ -29,19 +29,19 @@
    -
    +
    - +
    -
    +
    @@ -51,7 +51,7 @@
    -
    +
    @@ -60,7 +60,7 @@
    -
    +
    @@ -86,15 +86,15 @@
    - +
    -
    -

    Enter terms, genes, ID numbers in the - Search field
    - Use * or ? wildcards (Cyp*a?, - synap*)
    - Use quotes for terms such as "tyrosine - kinase"

    +
    + +
    +
    + Enter terms, genes, ID numbers in the Search field + Use * or ? wildcards (Cyp*a?, synap*) + Use quotes for terms such as "tyrosine kinase"
    @@ -103,10 +103,6 @@
    - -
    - -
    @@ -159,7 +155,7 @@
    -
    +
    -
  • - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    + {{newsitem.date}} {{newsitem.details|safe}}
    - 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 = '
      \n' - for i in range(len(filelist)): - if i%2==0: - filename = filelist[i] - filesize = filelist[i+1] - htmlfilelist += "
    • " - htmlfilelist += '%s' % (self.GN_AccessionId, filename, filename) - htmlfilelist += '   ' - #r=re.compile(r'(?<=\d)(?=(\d\d\d)+(?!\d))') - #htmlfilelist += '[%s B]' % r.sub(r',',filesize) - if 12 < len(filesize): - filesize=filesize[0:-12] - filesize += ' T' - elif 9 < len(filesize): - filesize=filesize[0:-9] - filesize += ' G' - elif 6 < len(filesize): - filesize=filesize[0:-6] - filesize += ' M' - elif 3 < len(filesize): - filesize=filesize[0:-3] - filesize += ' K' - htmlfilelist += '[%sB]' % filesize - htmlfilelist += "
    • \n" - 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 From 03d43722b043deff164420e07d6c7d5e8c128cd6 Mon Sep 17 00:00:00 2001 From: zsloan Date: Mon, 6 Apr 2015 15:57:11 +0000 Subject: Removed the old news code before pulling over Lei's changes Removed the SharingPage import from views since it doesn't exist anymore --- wqflask/wqflask/views.py | 41 +++++++++++--------------------- wqflask/wqflask/yaml_data/whats_new.yaml | 26 -------------------- 2 files changed, 14 insertions(+), 53 deletions(-) delete mode 100755 wqflask/wqflask/yaml_data/whats_new.yaml (limited to 'wqflask') diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index 7fec0456..b7864041 100755 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -45,8 +45,6 @@ from wqflask.correlation_matrix import show_corr_matrix from wqflask.correlation import corr_scatter_plot from utility import temp_data -from wqflask.dataSharing import SharingInfo, SharingInfoPage - from base import webqtlFormData from utility.benchmark import Bench @@ -100,20 +98,20 @@ def tmp_page(img_path): img_base64 = bytesarray ) -@app.route("/data_sharing") -def data_sharing_page(): - print("In data_sharing") - fd = webqtlFormData.webqtlFormData(request.args) - print("1Have fd") - sharingInfoObject = SharingInfo.SharingInfo(request.args['GN_AccessionId'], None) - info, htmlfilelist = sharingInfoObject.getBody(infoupdate="") - print("type(htmlfilelist):", type(htmlfilelist)) - htmlfilelist = htmlfilelist.encode("utf-8") - #template_vars = SharingInfo.SharingInfo(request.args['GN_AccessionId'], None) - print("1 Made it to rendering") - return render_template("data_sharing.html", - info=info, - htmlfilelist=htmlfilelist) +#@app.route("/data_sharing") +#def data_sharing_page(): +# print("In data_sharing") +# fd = webqtlFormData.webqtlFormData(request.args) +# print("1Have fd") +# sharingInfoObject = SharingInfo.SharingInfo(request.args['GN_AccessionId'], None) +# info, htmlfilelist = sharingInfoObject.getBody(infoupdate="") +# print("type(htmlfilelist):", type(htmlfilelist)) +# htmlfilelist = htmlfilelist.encode("utf-8") +# #template_vars = SharingInfo.SharingInfo(request.args['GN_AccessionId'], None) +# print("1 Made it to rendering") +# return render_template("data_sharing.html", +# info=info, +# htmlfilelist=htmlfilelist) @app.route("/search", methods=('GET',)) @@ -161,17 +159,6 @@ def help(): doc = docs.Docs("help") return render_template("docs.html", **doc.__dict__) -@app.route("/news") -def news(): - #variables = whats_new.whats_new() - with open("/home/sam/gene/wqflask/wqflask/yaml_data/whats_new.yaml") as fh: - contents = fh.read() - yamilized = yaml.safe_load(contents) - news_items = yamilized['news'] - for news_item in news_items: - print("\nnews_item is: %s\n" % (news_item)) - return render_template("whats_new.html", news_items=news_items) - @app.route("/references") def references(): doc = docs.Docs("references") diff --git a/wqflask/wqflask/yaml_data/whats_new.yaml b/wqflask/wqflask/yaml_data/whats_new.yaml deleted file mode 100755 index 8f41a8f2..00000000 --- a/wqflask/wqflask/yaml_data/whats_new.yaml +++ /dev/null @@ -1,26 +0,0 @@ -news: -- - date: 2012-1-20 - title: Mouse SNPs from dbSNP have been added to GeneNetwork - details: - 10 million mouse SNPs from dbSNP (build 128) have been added to Variant Browser. - They could be searched by name (e.g. rs31192936) (Implemented by Xiaodong Zhou and Ning Liu). - -- - date: 2012-1-20 - title: Literature correlation has been update to 2011 version - details: - Dr. Ramin Homayouni and Dr. Lijing Xu kindly provide the 2011 version of mouse gene-gene - literature correlation matrix to GeneNetwork. (Implemented by Xiaodong Zhou). - -- - date: 2012-1-16 - title: Expression data set for EPFL/LISP BXD Muscle Affy Mouse Gene 1.0 ST (Dec11) RMA ** has been entered in GeneNetwork - details: - Laboratory of Integrative and Systems Physiology - (LISP). - This data set is not yet freely available for global analysis. - This data set has not yet been used or described in any publication. - Please contact Johan Auwerx or Evan Williams at evan.williams@epfl.ch - regarding use of these data. (Implemented by J Auwerx, E Williams, LA Rose, - RW Williams and A Centeno). \ No newline at end of file -- cgit v1.2.3 From 4ad55a0ebc1fc77da8e9aa6ec565b2b10c373e9b Mon Sep 17 00:00:00 2001 From: zsloan Date: Mon, 6 Apr 2015 21:30:13 +0000 Subject: Just committing a couple minor bug fixes to get code working after pulling Pjotr's latest changes --- wqflask/wqflask/marker_regression/marker_regression.py | 2 +- wqflask/wqflask/my_pylmm/pyLMM/lmm.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/marker_regression/marker_regression.py b/wqflask/wqflask/marker_regression/marker_regression.py index 3fb9915b..7708356b 100755 --- a/wqflask/wqflask/marker_regression/marker_regression.py +++ b/wqflask/wqflask/marker_regression/marker_regression.py @@ -701,7 +701,7 @@ class MarkerRegression(object): no_val_samples = self.identify_empty_samples() trimmed_genotype_data = self.trim_genotypes(genotype_data, no_val_samples) - genotype_matrix = np.array(trimmed_genotype_data).T + genotype_matrix = np.array(genotype_data).T #print("pheno_vector: ", pf(pheno_vector)) #print("genotype_matrix: ", pf(genotype_matrix)) diff --git a/wqflask/wqflask/my_pylmm/pyLMM/lmm.py b/wqflask/wqflask/my_pylmm/pyLMM/lmm.py index 58ff809b..53689071 100644 --- a/wqflask/wqflask/my_pylmm/pyLMM/lmm.py +++ b/wqflask/wqflask/my_pylmm/pyLMM/lmm.py @@ -43,13 +43,14 @@ Redis = Redis() import sys sys.path.append("/home/zas1024/gene/wqflask/") -sys.path.append("/home/danny/GeneNetwork/wqflask/wqflask/my_pylmm/pyLMM/") -print("sys.path2:", sys.path) has_gn2=True from utility.benchmark import Bench from utility import temp_data + +sys.path.append("/home/zas1024/gene/wqflask/wqflask/my_pylmm/pyLMM/") + from kinship import kinship, kinship_full, kvakve import genotype import phenotype -- cgit v1.2.3 From 6cef9c3b27d92383f89a432f6fa0e9fd16107f66 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Mon, 13 Apr 2015 10:15:59 +0200 Subject: Added examples for convertlmm.py --- wqflask/wqflask/my_pylmm/pyLMM/convertlmm.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/my_pylmm/pyLMM/convertlmm.py b/wqflask/wqflask/my_pylmm/pyLMM/convertlmm.py index 3b6b5d70..4312fed0 100644 --- a/wqflask/wqflask/my_pylmm/pyLMM/convertlmm.py +++ b/wqflask/wqflask/my_pylmm/pyLMM/convertlmm.py @@ -1,5 +1,5 @@ -# This is a converter for common LMM formats, so as to keep complexity -# outside the main routines. +# This is a converter for common LMM formats, so as to keep file +# reader complexity outside the main routines. # Copyright (C) 2015 Pjotr Prins (pjotr.prins@thebird.nl) # @@ -31,6 +31,12 @@ python convertlmm.py [--plink] [--prefix out_basename] [--kinship kfile] [--phen Convert files for runlmm.py processing. Writes to stdout by default. try --help for more information + +Examples: + + python ./my_pylmm/pyLMM/convertlmm.py --plink --pheno data/test_snps.132k.clean.noX.fake.phenos > test.pheno + + python ./my_pylmm/pyLMM/convertlmm.py --plink --pheno data/test_snps.132k.clean.noX.fake.phenos --geno data/test_snps.132k.clean.noX > test.geno """ # if len(args) == 0: -- cgit v1.2.3