コード例 #1
0
def main():
    opts = getArgs()
    #
    cp = getConfig()
    MOUSEMINE = cp.get("DEFAULT", "MOUSEMINEURL")
    print('{\n  "metaData": %s,\n  "data": [' %
          json.dumps(buildMetaObject(MOUSEMINE), indent=2))
    #
    n = 0
    for r in sql(REFS_Q):
        obj = getObj(r, opts.which)
        if obj:
            if n > 0: sys.stdout.write(",")
            print(json.dumps(obj, indent=2))
            n += 1
            if opts.doSample and n > 100:
                break
    #
    print(']}')
コード例 #2
0
ファイル: expression.py プロジェクト: mgijax/AGRdatafeed
    if r[1] != 'N/A':
        emapa2uberon[r[1]] = r[0]

# the set of high level EMAPA term IDs
highlevelemapa = set(emapa2uberon.keys())

#-----------------------------------
# mappings from Theiler stages to UBERON stage term IDs
ts2uberon = dict( \
    [('TS%02d'%(i+1),'UBERON:0000068') for i in range(26)] + \
    [('TS27','post embryonic, pre-adult')] + \
    [('TS28', 'UBERON:0000113')])

#-----------------------------------
# load config settings
cp = getConfig()

#-----------------------------------
# MouseMine connection

MOUSEMINE = cp.get("DEFAULT", "MOUSEMINEURL")


#-----------------------------------
def log(msg):
    sys.stderr.write(msg + '\n')


#-----------------------------------
# Returns a mapping from EMAPA id to EMAPA term obj
# Each term has attributes: name, startsAt, endsAt/