def insertDomain(hitInfo):
    '''
    A helper function to insert information into the *domain* table.
    '''
    # collect info needed to insert into domains table
    domainInfo = [(hitInfo["gi"], hitInfo["domain"], hitInfo["start"], \
                  hitInfo["end"], hitInfo["sequence"], hitInfo["score"])]
    # insert into domains db
    databaseMethods.domainDatabaseInsert(domainInfo, databaseName, domainTable)
예제 #2
0
def insertDomain(hitInfo):
    '''
    A helper function to insert information into the *domain* table.
    '''
    # collect info needed to insert into domains table
    domainInfo = [(hitInfo["gi"], hitInfo["domain"], hitInfo["start"], \
                  hitInfo["end"], hitInfo["sequence"], hitInfo["score"])]
    # insert into domains db
    databaseMethods.domainDatabaseInsert(domainInfo, databaseName, domainTable)
def insertHSP(HSP, hit):
    '''
    Adds HSP to domainTable, helper function for getHSPs
    '''
    # collect info needed to insert into domains table
    # the last element of tuple is sequence, after removing gaps ("_")
    # and capitalizing all letters
    domainInfo = [(hit.id, queryResult.id, HSP.hit_start, HSP.hit_end, \
                   (str(HSP.hit.seq).upper()).replace("-", "")), ]
    # insert into domains db
    databaseMethods.domainDatabaseInsert(domainInfo, databaseName, domainTable)
def insertHSP(HSP, hit):
    '''
    Adds HSP to domainTable, helper function for getHSPs
    '''
    # collect info needed to insert into domains table
    # the last element of tuple is sequence, after removing gaps ("_")
    # and capitalizing all letters
    domainInfo = [(hit.id, queryResult.id, HSP.hit_start, HSP.hit_end, \
                   (str(HSP.hit.seq).upper()).replace("-", "")), ]
    # insert into domains db
    databaseMethods.domainDatabaseInsert(domainInfo, databaseName, domainTable)