Package install :: Package MoSTBioDat :: Package DataBase :: Package ImportData :: Package Data2DB :: Module InserTables :: Class InserTables
[hide private]
[frames] | no frames]

Class InserTables

source code

object --+
         |
        InserTables

Instance Methods [hide private]
 
__init__(self)
Methods for inserting data from shelve dictionary into database tables INPUT: OUTPUT: class object
source code
 
UserChemComp(self, logdebug=False, tabcolvaldict={}, lowercasetablenames=True, **kwarg)
User Chemical Compound table import INPUT: logdebug - log debug in log file tabcolvaldict - dict, table column value dictionary lowercasetablenames - boolean, lower case table names MySQL engine settings, default True OUTPUT: ID - id table value
source code
 
getChemComponIdIsoSmiZINCode(self, logdebug=False, tabcolvaldict={}, lowercasetablenames=True, **kwarg)
User Chemical Compound table import INPUT: logdebug - log debug in log file tabcolvaldict - dict, table column value dictionary lowercasetablenames - boolean, lower case table names MySQL engine settings, default True OUTPUT: IDict - ChemComp table dictionary {Id: {tabcolname:tabcolvalue,..
source code
 
getChemCompIdIsoSmi(self, logdebug=False, lowercasetablenames=True, **kwarg)
get Id and Isomeric SMILE from Chemical Compound table import INPUT: baseImport - flag to avoid data importing logdebug - log debug in log file anyflag - boolean, all imported values must be validated correctly, default False lowercasetablenames - boolean, lower case table names MySQL engine settings, default True OUTPUT: ID - id table value
source code
 
ChemComp(self, dictobj=None, baseImport=False, logdebug=False, lowercasetablenames=True, **kwarg)
Chemical Compound table import INPUT: baseImport - flag to avoid data importing dictobj - shelve dictionary object logdebug - log debug in log file anyflag - boolean, all imported values must be validated correctly, default False lowercasetablenames - boolean, lower case table names MySQL engine settings, default True OUTPUT: ID - id table value
source code
 
UserProtStat(self, logdebug=False, tabcolvaldict={}, lowercasetablenames=True, **kwarg)
Protomer/Tautomer State table import INPUT: logdebug - log debug in log file tabcolvaldict - dict, table column/value dictionary lowercasetablenames - boolean, lower case table names MySQL engine settings, default True **kwarg - ID, IDlist, IDict - foreign key value iso - boolean, isomeric SMILE code, default True addH - boolean, add hydrogens, default True
source code
 
getProtStat(self, logdebug=False, tabcolvaldict={}, lowercasetablenames=True, **kwarg)
Check if specified SMILE code exists in ProtStat table...
source code
 
getProtStatonIdFk(self, logdebug=False, tabcolvaldict={}, lowercasetablenames=True, **kwarg)
get isomeric SMILE/Id dictionary for specified foreign key...
source code
 
ProtStat(self, dictobj=None, logdebug=False, lowercasetablenames=True, **kwarg)
Protomer/Tautomer State table import INPUT: dictobj - shelve dictionary object logdebug - log debug in log file lowercasetablenames - boolean, lower case table names MySQL engine settings, default True **kwarg - ID, IDlist, IDict - foreign key value OUTPUT: ID - id table value
source code
 
UserConnTab(self, smi, logdebug=False, lowercasetablenames=True, **kwarg)
Connection Table import ...
source code
 
ConnTab(self, dictobj=None, logdebug=False, lowercasetablenames=True, **kwarg)
Connection Table import INPUT: dictobj - shelve dictionary object logdebug - log debug in log file lowercasetablenames - boolean, lower case table names MySQL engine settings, default True **kwarg - ID, IDlist, IDict - foreign key value OUTPUT: ID - id table value
source code
 
getConnTabonIdFk(self, logdebug=False, tabcolvaldict={}, lowercasetablenames=True, **kwarg)
get connection table list for specified foreign key INPUT: logdebug - log debug in log file tabcolvaldict - dict, table column/value dictionary lowercasetablenames - boolean, lower case table names MySQL engine settings, default True **kwarg - ID, IDlist, IDict - foreign key value OUTPUT: IDict - dictionary, id: atom list
source code
 
UserAtoms(self, smi, logdebug=False, lowercasetablenames=True, **kwarg)
Atoms table import ...
source code
 
getAtomsonIdFk(self, logdebug=False, tabcolvaldict={}, lowercasetablenames=True, **kwarg)
get Id/atoms dictionary for specified foreign key INPUT: logdebug - log debug in log file tabcolvaldict - dict, table column/value dictionary lowercasetablenames - boolean, lower case table names MySQL engine settings, default True **kwarg - ID, IDlist, IDict - foreign key value OUTPUT: IDict - dictionary, id: atom list
source code
 
getConfStatonIdFk(self, logdebug=False, tabcolvaldict={}, lowercasetablenames=True, **kwarg)
get conformation list for specified foreign key INPUT: logdebug - log debug in log file tabcolvaldict - dict, table column/value dictionary lowercasetablenames - boolean, lower case table names MySQL engine settings, default True **kwarg - ID, IDlist, IDict - foreign key value OUTPUT: IDict - dictionary, id: atom list
source code
 
Atoms(self, dictobj=None, logdebug=False, lowercasetablenames=True, **kwarg)
Atoms table import INPUT: dictobj - shelve dictionary object logdebug - log debug in log file lowercasetablenames - boolean, lower case table names MySQL engine settings, default True **kwarg - ID, IDlist, IDict - foreign key value OUTPUT: ID - id table value
source code
 
ConfStat(self, dictobj=None, logdebug=False, lowercasetablenames=True, **kwarg)
Conformation State table import INPUT: dictobj - shelve dictionary object logdebug - log debug in log file lowercasetablenames - boolean, lower case table names MySQL engine settings, default True **kwarg - ID, IDlist, IDict - foreign key value OUTPUT: ID - id table value
source code
 
getAtomStatonIdFk(self, logdebug=False, tabcolvaldict={}, lowercasetablenames=True, **kwarg)
get atoms coordinate list for specified foreign key INPUT: logdebug - log debug in log file tabcolvaldict - dict, table column/value dictionary lowercasetablenames - boolean, lower case table names MySQL engine settings, default True **kwarg - ID, IDlist, IDict - foreign key value OUTPUT: IDict - dictionary, id: atom list
source code
 
AtomStat(self, dictobj=None, logdebug=False, lowercasetablenames=True, **kwarg)
Atom State table import INPUT: dictobj - shelve dictionary object logdebug - log debug in log file lowercasetablenames - boolean, lower case table names MySQL engine settings, default True **kwarg - ID, IDlist, IDict - foreign key value OUTPUT: ID - id table value
source code
 
getElemTab(self, lowercasetablenames=True)
get table of elements INPUT: OUTPUT: ID - id dictionary value
source code
 
ElemTab(self, logdebug=False, lowercasetablenames=True, **dictobj)
Elements Table import INPUT: dictobj - shelve dictionary object logdebug - log debug in log file lowercasetablenames - boolean, lower case table names MySQL engine settings, default True **dictobj - elements dictionary OUTPUT: ID - id table value
source code
 
getPropDef(self, lowercasetablenames=True)
get property definition INPUT: class object OUTPUT: ID - id table dictionary
source code
 
UserPropDef(self, logdebug=False, lowercasetablenames=True, tabcolvaldict={})
Property Definition table import INPUT: dictobj - shelve dictionary object logdebug - log debug in log file lowercasetablenames - boolean, lower case table names MySQL engine settings, default True **dictobj - property definition dictionary OUTPUT: ID - id table value
source code
 
PropDef(self, logdebug=False, lowercasetablenames=True, **dictobj)
Property Definition table import INPUT: logdebug - log debug in log file lowercasetablenames - boolean, lower case table names MySQL engine settings, default True **dictobj - property definition dictionary OUTPUT: ID - id table value
source code
 
UserProp2Tab(self, tablename=None, tabcol=None, smi=None, propval={}, logdebug=False, lowercasetablenames=True, **kwarg)
Property Table Import INPUT: tablename - tablename, str tabcol - table column, list of strings smi - str, smile string propval - dict, property value dictionary logdebug - logging flag to log debug info, default=True lowercasetablenames - boolean, lower case table names MySQL engine settings, default True **kwarg - IDcheck, ID, IDlist, IDict - foreign key value
source code
 
getProponIdFk(self, tablename=None, tabcol=None, tabcolvaldict=None, logdebug=False, lowercasetablenames=True, idflag=False, **kwarg)
get specified property from property table ...
source code
 
Prop2Tab(self, tablename=None, tabcol=None, mapdict=None, dictobj=None, logdebug=False, lowercasetablenames=True, **kwarg)
Property Table Import ...
source code
 
insertrecord(self, tablename, inskey, insval, logdebug)
insert record into specified table INPUT: tablename - str, table name inskey - list, record name list insval - list, record value list OUTPUT: IDlist - last inserted Id list
source code
 
validrecord(self, tablename, tabcol, indict, logdebug=False)
validate record INPUT: tablename - str, table name tabcol - list, column list indict - dict, input dictionary OUTPUT: inrow - dict, validated input dictionary
source code
 
ligvalidrecord(self, dictobj, tablename, tabcol, mapdict, ID=None, IDlist=None, IDict=None, logdebug=False)
validate record INPUT: dictobj - dictionary object tablename - str, table name tabcol - list, column list mapdict - dict, input dictionary ID - int, ID number IDlist - list, ID list IDict - dict, ID dictionary logdebug - boolean, debug logging, default False OUTPUT: inrow - dict, validated input dictionary
source code
 
uservalidrecord(self, tablename, tabcol, tabcolvaldict, ID=None, logdebug=False)
validate record INPUT: tablename - str, table name tabcol - list, column list tabcolvaldict - dict, input dictionary ID - int, ID number IDlist - list, ID list IDict - dict, ID dictionary logdebug - boolean, debug logging, default False OUTPUT: inrow - dict, validated input dictionary
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Methods for inserting data from shelve dictionary into database tables INPUT: OUTPUT: class object

Overrides: object.__init__

getChemComponIdIsoSmiZINCode(self, logdebug=False, tabcolvaldict={}, lowercasetablenames=True, **kwarg)

source code 

User Chemical Compound table import INPUT: logdebug - log debug in log file tabcolvaldict - dict, table column value dictionary lowercasetablenames - boolean, lower case table names MySQL engine settings, default True OUTPUT: IDict - ChemComp table dictionary {Id: {tabcolname:tabcolvalue,..}}

UserProtStat(self, logdebug=False, tabcolvaldict={}, lowercasetablenames=True, **kwarg)

source code 

Protomer/Tautomer State table import 
INPUT: 
logdebug - log debug in log file
tabcolvaldict - dict, table column/value dictionary
lowercasetablenames - boolean, lower case table names MySQL engine settings, default True
**kwarg - 
         ID, IDlist, IDict - foreign key value
         iso - boolean, isomeric SMILE code, default True
         addH - boolean, add hydrogens, default True
         
OUTPUT:
ID - id table value

getProtStat(self, logdebug=False, tabcolvaldict={}, lowercasetablenames=True, **kwarg)

source code 

Check if specified SMILE code exists in ProtStat table
INPUT: 
logdebug - log debug in log file
tabcolvaldict - dict, table column/value dictionary
lowercasetablenames - boolean, lower case table names MySQL engine settings, default True
**kwarg - 
         iso - boolean, isomeric SMILE code, default True
OUTPUT:
ID - ChemComp foreign key table value

getProtStatonIdFk(self, logdebug=False, tabcolvaldict={}, lowercasetablenames=True, **kwarg)

source code 

get isomeric SMILE/Id dictionary for specified foreign key
INPUT: 
logdebug - log debug in log file
tabcolvaldict - dict, table column/value dictionary
lowercasetablenames - boolean, lower case table names MySQL engine settings, default True
**kwarg - 
         iso - boolean, isomeric SMILE code, default True
OUTPUT:
IDict - dictionary, smile: id

UserConnTab(self, smi, logdebug=False, lowercasetablenames=True, **kwarg)

source code 

Connection Table import 
INPUT: 
smi - str, smile string
logdebug - log debug in log file
**kwarg - 
         ID, IDlist, IDict - foreign key value
         iso - boolean, isomeric SMILE code, default True
         addH - boolean, add hydrogens, default True
OUTPUT:
ID - id table value

UserAtoms(self, smi, logdebug=False, lowercasetablenames=True, **kwarg)

source code 

Atoms table import 
INPUT: 
logdebug - log debug in log file
**kwarg -
         ID, IDlist, IDict - foreign key value
         iso - boolean, isomeric SMILE code, default True
         addH - boolean, add hydrogens, default True
OUTPUT:
ID - id table value

UserProp2Tab(self, tablename=None, tabcol=None, smi=None, propval={}, logdebug=False, lowercasetablenames=True, **kwarg)

source code 

Property Table Import INPUT: tablename - tablename, str tabcol - table column, list of strings smi - str, smile string propval - dict, property value dictionary logdebug - logging flag to log debug info, default=True lowercasetablenames - boolean, lower case table names MySQL engine settings, default True **kwarg - IDcheck, ID, IDlist, IDict - foreign key value

  • anyflag - boolean, some specified in mapdict attributes are True

OUTPUT: ID - id table value

getProponIdFk(self, tablename=None, tabcol=None, tabcolvaldict=None, logdebug=False, lowercasetablenames=True, idflag=False, **kwarg)

source code 

get specified property from property table 
INPUT: 
tablename - tablename, str
tabcol - table column, list of strings
tabcolvaldict - dict, table column/value dictionary
logdebug - logging flag to log debug info, default=True
lowercasetablenames - boolean, lower case table names MySQL engine settings, default True
idflag - boolean, if true output dictionary format {id:[property_value,property_name]}
                     false {propertyname_tablename_id: property_value}, default false
**kwarg - IDcheck, ID, IDlist, IDict - foreign key value
        - anyflag - boolean, some specified in mapdict attributes are True
OUTPUT:
IDict - dict, tag dictionary {tagnema_tablename_id:value}

Prop2Tab(self, tablename=None, tabcol=None, mapdict=None, dictobj=None, logdebug=False, lowercasetablenames=True, **kwarg)

source code 

Property Table Import 
INPUT: 
tablename - tablename, str
tabcol - table column, list of strings
mapdict - mapping dictionary, list of strings
logdebug - logging flag to log debug info, default=True
dictobj - sheleve dictionary object
lowercasetablenames - boolean, lower case table names MySQL engine settings, default True
**kwarg - ID, IDlist, IDict - foreign key value
          IDCheck - boolean, check if specified ID is long or integer, default False
        - anyflag - boolean, some specified in mapdict attributes are True
OUTPUT:
ID - id table value