Package install :: Package MoSTBioDat :: Package DataBase :: Package Query :: Package UserQuery :: Module UserQuery :: Class UserQuery
[hide private]
[frames] | no frames]

Class UserQuery

source code

object --+
         |
        UserQuery

predefined user MySQL query

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
getDictQuery(self, number=None)
get dictionary query item INPUT: class object number - int - number of query OUTPUT: sql query
source code
 
insertDictQuery(self, number, query='')
insert query into dictionary INPUT: class object number - int - query number query - str - SQL query, default ''
source code
 
showDictQuery(self, number='all')
show dictionary query INPUT: class object number - int - number of query, default = 'all'
source code
 
addLimit(self, query, limit=None)
add limit INPUT: class object query - SQL query limit - int - query limit, default=None OUTPUT: sql query
source code
 
createTable(self, table, column, columndata)
create table INPUT: class object table - str - table name column - str - column name columndata - str - column data OUTPUT: sql query
source code
 
delTable(self, table)
delete table INPUT: class object table - str - table name to delete OUTPUT: sql query
source code
 
showTable(self, database=None)
show table INPUT: class object database - str - database name, default=None OUTPUT: sql query
source code
 
updateTable(self, table, field1, data1, field2, data2)
update table INPUT: class object table - str - table name field1 - str - table field data1 - str - table data field2 - str - table field data2 0 str - table data OUTPUT: sql query
source code
 
descTable(self, table)
describe table INPUT: class object table - str - table name
source code
 
addColumn(self, table, column)
add column INPUT: class object table - str - table name column - str - column name OUTPUT: sql query
source code
 
delColumn(self, table, column)
delete column INPUT: class object table - str - table name column - str - table column OUTPUT: sql query
source code
 
showColumn(self, table)
show column INPUT: class object table - str- table name OUTPUT: sql query
source code
 
insertRecord(self, table, columnlist, valuelist)
insert record into table INPUT: class object table - str - table name columnlist - list - column list valuelist - list - value list OUTPUT: sql query
source code
 
delRecord(self, table, field, data)
delete record INPUT: class object table - str -table name field - str - field name data - str - data OUTPUT: sql query
source code
 
select(self, table, columnlist, where=None, order=None, having=None)
select INPUT: class object table - str - table name columnlist - list - columnlist where - str - add where, default=None order - str - add order, default=None having - str - add having, default=None OUTPUT: sql query
source code
 
join(self, table1, tablelist, columnlist, columnjoinlist, where=None, order=None, having=None, limit=None)
join two tables table1 - str - table name tablelist - list - table list columnlist - list - column list columnjoinlist - list - column join list (order is important) where - str - sql where order - str - sql order having - str - sql having
source code
 
removEnd(self, query)
remove ending ';' from query INPUT: query - str, mysql query syntax OUTPUT" query without ending character
source code
 
getPropValId(self, propname)
get property definition Id INPUT: propname - str, property name OUTPUT: query, str, example 1 in dictionary
source code
 
getPropValIdin(self, propname=())
get property definition Id INPUT: propname - str, property name OUTPUT: query, str, example 2 in dictionary
source code
 
getIsoSmiId(self, isosmi)
get Id for specified isomeric SMILE INPUT: isosmi- str, isomeric SMILE OUTPUT: query, str, example 3 in dictionary
source code
 
getPropValonIsoSmi1(self, isosmi, proptabname, propname)
get property value for specified isomeric SMILE VALID for ONE table INPUT isosmi - str, isomeric SMILE proptabname- str, property tablename propname - str, property name OUTPUT" query, example 4 in dictionary query
source code
 
getPropValonIsoSmi2(self, isosmi, proptabname1, propname1, proptabname2, propname2)
get property value for specified isomeric SMILE VALID for TWO tables INPUT isosmi - str, isomeric SMILE proptabname1- str, property tablename propname1 - str, property name proptabname2- str, property tablename propname2 - str, property name OUTPUT: query, example 5 in dictionary query
source code
 
getIsoSmionPropValrange(self, proptabname, propname, range=[])
get isomeric SMILE and property value if property is in specified range INPUT: proptabname- str, property tablename propname - str, property name range - list, value range OUTPUT: query, example 6 in dictionary query
source code
 
getIdPropNamePropVal(self, isosmi, proptabname, propname=())
get substance Id, property name, property value INPUT: isosmi - str, isomeric SMILE proptabname -str, property tablename propname- tuple, property name tuple OUTPUT: query, example 7 in dictionary query
source code
 
getIsoSmionPropValrangeand(self, proptabname1, propname1, proptabname2, propname2, condition, value, range=[])
get isomeric SMILE and property value if property in specified range and specified condition (<,>,=) INPUT: proptabname1 - str, property table name proptabname2 - str, property table name propname1 -str, property name propname1 - str, property name condition - str, myql condition >,<,= itd.
source code
 
getIsoSmiPropValNumConflike(self, proptabname1, propname1, proptabname2, propname2, like)
get isomeric SMILE, property value, number of conformers if property like '%' INPUT: proptabname1 - str, property table name proptabname2 - str, property table name propname1 -str, property name propname1 - str, property name like - str, mysql like expression OUTPUT: query, example 9 in dictionary query
source code
 
getConfIdonIsoSmi(self, isosmi)
get conformer Id for specified isomeric SMILE INPUT: isosmi- str, isomeric SMILE OUTPUT: query, example 10 in dictionary query
source code
 
getXYZonIsoSmi(self, isosmi)
get X,Y,Z coordinates for specified isomeric SMILE INPUT: isosmi - str, isomeric SMILE OUTPUT: query, example 11 in dictionary query
source code
 
getXYZQonIsoSmi(self, isosmi, chargedef)
get X,Y,Z,charge for specified isomeric SMILE INPUT: isosmi - str, isomeric SMILE chargedef - str, charge definition OUTPUT: query, example 12 ind dictionary query
source code
 
getXYZQAtSymAtSeqNumonIsoSmi(self, isosmi, chargedef)
get X,Y,Z,charge, atom symbol, sequence number for specified isomeric SMILE INPUT: isosmi - str, isomeric SMILE chargedef - str, charge definition OUTPUT: query, example 13 ind dictionary query
source code
 
getXYZQonConfId(self, confId, chargedef)
get X,Y,Z, and charge for specified conformation Id INPUT: confId - integer, conformation Id number chargedf - str, charge definition OUTPUT: query, example 14 ind dictionary query
source code
 
getIdPropValcondition(self, proptabname, propname, condition, value)
get Id and property value for specified condition INPUT: proptabname- str, property table name propname- str, property name condition - str, mysql condition ">""<" value - condition value OUTPUT: query, example 14 ind dictionary query
source code
 
getIdPropVal4condition(self, proptabname1, propname1, condition1, value1, proptabname2, propname2, condition2, value2, proptabname3, propname3, condition3, value3, proptabname4, propname4, condition4, value4)
get Id and propery value for specified condition, 4 tables INPUT: proptabname1- str, property table name propname1- str, property name condition1 - str, mysql condition ">""<" value1 - condition value proptabname2- str, property table name propname2- str, property name condition2 - str, mysql condition ">""<" value2 - condition value proptabname3- str, property table name propname3- str, property name condition3 - str, mysql condition ">""<" value3 - condition value proptabname4- str, property table name propname4- str, property name condition4 - str, mysql condition ">""<" value4 - condition value OUTPUT: query, example 15 ind dictionary query
source code
 
getPropValonId(self, subId, proptabname, propname)
get property value for specified compound Id INPUT: subId - int, substance Id proptabname - str, property table name propname - str, property name OUTPUT: query, example 17 ind dictionary query
source code
 
getPropVal2onId(self, subId, proptabname1, propname1, proptabname2, propname2)
get property value for specified compound Id TWO table example INPUT: subId - int, substance Id proptabname1 - str, property table name propname1 - str, property name proptabname2 - str, property table name propname2 - str, property name OUTPUT: query, example 18 ind dictionary query
source code
 
getConfNumonId(self, subId)
get number of conformers for specified substance Id INPUT: subId- int, substance Id OUTPUT: query, example 19 ind dictionary query
source code
 
getIsoSmiconTautNum(self, proptabname, propname, condition, value)
get isomeric SMILE for specified tautomer condition INPUT: proptabname - str, property table name propname - str, property name condition - str, number of tautome, mysql condition '>,<,=' value - int, condition value OUTPUT: query, example 20 ind dictionary query
source code
 
getIsoSmionConfNum(self, proptabname, propname, condition, value)
get isomeric SMILE for specified conformer condition INPUT: proptabname - str, property table name propname - str, property name condition - str, number of tautomer, mysql condition '>,<,=' value - int, condition value OUTPUT: query, example 21 ind dictionary query
source code
 
getIsoSmionConfNumPropVal(self, proptabname, propname, propcondition, propfunction, cutoff, confcondition, confvalue)
get isomeric SMILE for specified number of conformers and property value condition INPUT: proptabname - str, property table name propname -str, property name propcondition -str, property condition, ">,<" propfunction - str, property function "MAX, MIN" cutoff - str, property cutoff condition "+1, -2" confcondition - str, conformation number condition, ">,<" confvalue -int, conformation condition value OUTPUT: query, example 22 ind dictionary query
source code
 
getIsoSmionAtomPropValcondition(self, proptabname, propname)
get isomeric SMILE for atoms which do NOT have specified property condition INPUT: proptabname - str, property table name propname - str, property name OUTPUT: query, example 23 ind dictionary query
source code
 
getIsoSmiQonPropValcondition(self, proptabname, propname, atomsymbol, range=[])
get isomeric SMILE for atom with specified range property value INPUT: proptabname - str, property table name propname- str, property name atomsymbol - str, atom symbol range - list, property range OUTPUT: query, example 24 ind dictionary query
source code
 
getIsoSmionAtomNum(self, atomsymbol, condition, value)
get isomeric SMILE for specified number of atom INPUT: atomsymbol - str, atom symbol condition - str, condition "> <" value - value OUTPUT query, example 25 ind dictionary query
source code
 
getIsoSmionPropValisempty(self, proptabname, propname)
get isomeric SMILE if property value is empty INPUT: proptabname - str, property table name propname - str, property name OUTPUT: query, example 26 ind dictionary query
source code
 
getIsoSmionPropValexist(self, proptabname, propname)
get isomeric SMILE if propery value exists INPUT: proptabname - str, property table name propname - str, property name OUTPUT: query, example 27 ind dictionary query
source code
 
getMaxId(self, tabname)
get maximal Id value INPUT: tabname - str, table name OUTPUT" query
source code
 
setLastId(self, tabname, value)
set last inserted Id INPUT: tabname -str, table name value - int, last Id value
source code
 
getMaxId2(self, tabname, colname)
get maximal Id value INPUT: tabname - str, table name OUTPUT" query
source code
 
getXYZQAtNumAtSeqNumonConfId(self, confId, chargedef)
get X,Y,Z,charge, atom number, sequence number for specified conformer Id INPUT: confid - str, conformation id chargedef - str, charge definition OUTPUT: query, example 35 ind dictionary query
source code
 
getIdXYZConfId(self, confId)
get Id,X,Y,Z, AtomsIdFk for specified conformer Id INPUT: confid - str, conformation id OUTPUT: query, example 36 ind dictionary query
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  queryDict = {}
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

getIsoSmionPropValrangeand(self, proptabname1, propname1, proptabname2, propname2, condition, value, range=[])

source code 

get isomeric SMILE and property value if property in specified range and specified condition (<,>,=) INPUT: proptabname1 - str, property table name proptabname2 - str, property table name propname1 -str, property name propname1 - str, property name condition - str, myql condition >,<,= itd. value - condition value range - value range OUTPUT query, example 8 in dictionary query