示例#1
0
def interAssay():
    import queryDevice
    import mkDict
    import queries
    import writePairs
    import os
    import addProperties
    import readIds
    import string
    import yaml
    # Read config file.
    paramFile = open('gla.yaml')
    params = yaml.safe_load(paramFile)
    species = params['species']
    # Get information for all relevant activities from ChEMBL.
    for spec in species:
        specName =  string.replace(spec, ' ','_')
        dictFile =  "data/inter_compDict_%s_%s.pkl" % (specName, params['release'])
        results = "data/interAssay_%s_%s.tab" % (specName, params['release'])
        query = queries.activities(spec)
        acts = queryDevice.queryDevice(query, params) 
        mkDict.activities(acts, dictFile)
        writePairs.interAssaySampled(results, dictFile)
        addProperties.addMolweight("molregno", results, params)
        addProperties.addTargetClass("L1","accession", results, params)
        addProperties.addSeq100(results)
示例#2
0
def orthologs():
    import queryDevice
    import mkDict
    import queries
    import writePairs
    import os
    import align
    import addProperties  
    import mkHomologTable
    import readIds
    import yaml
    # Read config file.
    paramFile = open('gla.yaml')
    params = yaml.safe_load(paramFile)
    needlepath = params['needlepath']
    vsCompara = params['vsCompara'] 
    release = params['release']
    comparaOrthologs = "data/orthologs_%s.txt"% params['vsCompara']
    comparaHumanIds = "data/humanIds_%s.txt"% params['vsCompara']
    comparaRatIds = "data/ratIds_%s.txt"% params['vsCompara']
    # Assign output filenames.
    dictFile = "data/ortho_compDict_%s.pkl"% params['release']
    results = "data/orthologs_%s_%s.tab"%(params['release'], params['vsCompara'])
    orthoTab = "data/orthologTable_%s.txt" % params['vsCompara']
    # Create output files.
    humanLkp = readIds.readIds(comparaHumanIds)
    ratLkp = readIds.readIds(comparaRatIds)
    mkHomologTable.homologTable(comparaOrthologs, orthoTab, humanLkp, ratLkp) 
    query = queries.paralogs(orthoTab)
    acts= queryDevice.queryDevice(query, params)
    mkDict.activities(acts, dictFile)
    writePairs.homologMedian(params['homologyTypeOrthologs'], orthoTab, dictFile, results)
    # Annotate output files.
    align.pfam_a(results, params)
    align.bSite(results, params)
    addProperties.addMolweight('molregno', results, params)
    addProperties.addTargetClass("L1","accession1", results, params)
    addProperties.addPrefName("accession1", results, params)
    addProperties.addPrefName("accession2", results, params)