aboutsummaryrefslogtreecommitdiff
path: root/web/webqtl/textUI/cmdHelp.py
diff options
context:
space:
mode:
authorzsloan2015-03-27 20:28:51 +0000
committerzsloan2015-03-27 20:28:51 +0000
commitd0911a04958a04042da02a334ccc528dae79cc17 (patch)
tree3c48e2e937c1dbeaf00a5697c87ed251afa5c8f1 /web/webqtl/textUI/cmdHelp.py
parenta840ad18e1fe3db98a359a159e9b9b72367a2839 (diff)
downloadgenenetwork2-d0911a04958a04042da02a334ccc528dae79cc17.tar.gz
Removed everything from 'web' directory except genofiles and renamed the directory to 'genotype_files'
Diffstat (limited to 'web/webqtl/textUI/cmdHelp.py')
-rwxr-xr-xweb/webqtl/textUI/cmdHelp.py105
1 files changed, 0 insertions, 105 deletions
diff --git a/web/webqtl/textUI/cmdHelp.py b/web/webqtl/textUI/cmdHelp.py
deleted file mode 100755
index 754ff5b5..00000000
--- a/web/webqtl/textUI/cmdHelp.py
+++ /dev/null
@@ -1,105 +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 string
-
-from base import webqtlConfig
-from base.admin import ADMIN_tissue_alias
-from cmdClass import cmdClass
-
-#########################################
-# Help Class
-#########################################
-
-#XZ, 03/23/2009: There are several issues need attention.
-#1. Some probeset datasets are not added into DBList.
-#2. Do NOT show confidential datasets.
-#3. Get rid of ADMIN_tissue_alias. We should use info from database instead.
-
-class cmdHelp(cmdClass):
- def __init__(self,fd=None):
-
- cmdClass.__init__(self,fd)
-
- if not webqtlConfig.TEXTUI:
- self.contents.append("Please send your request to http://robot.genenetwork.org")
- return
-
-
- machineParse = self.data.getvalue('parse')
- topic = self.data.getvalue('topic')
- if topic:
- topic = topic.lower()
- if topic == 'tissue':
- self.contents.append("%s%s| %s" %("Tissue", ' '*(50-len("Tissue")), "Tissue Abbreviations"))
- self.contents.append("%s%s| %s" %("", ' '*50, "(Separated by space, case insensitive)"))
- self.contents.append("%s|%s" %('_'*50, '_'*40))
-
- keys = ADMIN_tissue_alias.keys()
- keys.sort()
- for key in keys:
- self.contents.append("%s%s| %s" % (key , ' '*(50-len(key)), string.join(ADMIN_tissue_alias[key], " ")))
- self.contents.append("%s|%s" %('_'*50, '_'*40))
- else:
- pass
- else:
- self.contents = ["#Use database code table below to access data", "#For machine parse friendly output please use",
- "#http://www.genenetwork.org%s%s?cmd=help&parse=machine" % (webqtlConfig.CGIDIR, webqtlConfig.SCRIPTFILE)]
- self.cursor.execute("""(SELECT DBType.Name, DBList.FreezeId, DBList.Code, ProbeSetFreeze.CreateTime as Time
- from ProbeSetFreeze, DBType, DBList WHERE DBType.Id = DBList.DBTypeId and
- DBType.Name = 'ProbeSet' and DBList.FreezeId = ProbeSetFreeze.Id and
- ProbeSetFreeze.public > %d order by ProbeSetFreeze.CreateTime ,DBList.Name, DBList.Id)
- UNION
- (SELECT DBType.Name, DBList.FreezeId, DBList.Code, PublishFreeze.CreateTime as Time
- from PublishFreeze, DBType, DBList WHERE DBType.Id = DBList.DBTypeId and
- DBType.Name = 'Publish' and DBList.FreezeId = PublishFreeze.Id order by
- PublishFreeze.CreateTime ,DBList.Name, DBList.Id)
- UNION
- (SELECT DBType.Name, DBList.FreezeId, DBList.Code, GenoFreeze.CreateTime
- from GenoFreeze, DBType, DBList WHERE DBType.Id = DBList.DBTypeId and
- DBType.Name = 'Geno' and DBList.FreezeId = GenoFreeze.Id order by
- GenoFreeze.CreateTime ,DBList.Name, DBList.Id)""" % webqtlConfig.PUBLICTHRESH)
- dbs = self.cursor.fetchall()
- if machineParse =="machine":
- pass
- else:
- self.contents.append("\n")
- self.contents.append("%s%s| %s" %("Database_Name", ' '*(50-len("Database_Name")), "Database_Access_Code_Name"))
- self.contents.append("%s|%s" %('_'*50, '_'*40))
- for dbInfo in dbs:
- self.cursor.execute('SELECT FullName from %sFreeze WHERE Id = %d and public > %d' % (dbInfo[0], dbInfo[1],webqtlConfig.PUBLICTHRESH))
- results = self.cursor.fetchall()
- if not results:
- pass
- else:
- if machineParse =="machine":
- self.contents.append(results[0][0]+ ',' +dbInfo[2])
- else:
- self.contents.append("%s%s| %s" %(results[0][0], ' '*(50-len(results[0][0])), dbInfo[2]))
- self.contents.append("%s|%s" %('_'*50, '_'*40))
-
-
-