コード例 #1
0
ファイル: xenoGI.py プロジェクト: dstoebel/xenoGI
if __name__ == "__main__":

    paramFN = sys.argv[1]
    paramD = parameters.loadParametersD(paramFN)

    ## load data structures we'll use below
    tree, strainStr2NumD, strainNum2StrD = trees.readTree(paramD['treeFN'])

    # an object for gene name conversions
    geneNames = genomes.geneNames(paramD['geneOrderFN'], strainStr2NumD,
                                  strainNum2StrD)

    subtreeL = trees.createSubtreeL(tree)
    subtreeL.sort()
    geneOrderT = genomes.createGeneOrderTs(paramD['geneOrderFN'], geneNames,
                                           subtreeL, strainStr2NumD)

    ## read scores
    scoresO = scores.readScores(paramD['scoresFN'], geneNames)

    ## make gene families
    familyIslandFormationSummaryF = open(
        paramD['familyIslandFormationSummaryFN'], 'w')
    familyL = families.families(
        tree, subtreeL, geneNames, scoresO, paramD['minNormThresh'],
        paramD['minCoreSynThresh'], paramD['minSynThresh'],
        paramD['synAdjustThresh'], paramD['synAdjustExtent'],
        paramD['familyFN'], strainNum2StrD, familyIslandFormationSummaryF)

    ## group gene families into islands
    islands.makeIslands(geneOrderT, geneNames, subtreeL, tree,
コード例 #2
0
ファイル: validation.py プロジェクト: ksl0/xenoGI
    paramFN=sys.argv[1]
    paramD = parameters.loadParametersD(paramFN)
    strainStr = sys.argv[2]
    validationFile = sys.argv[3]
    minGenes = int(sys.argv[4])

    tree,strainStr2NumD,strainNum2StrD = trees.readTree(paramD['treeFN'])

    strainNum = strainStr2NumD[strainStr]

    #node = strainStr2NumD[strainStr]
    
    # load islands and genes
    islandByNodeL=islands.readIslands(paramD['islandOutFN'],tree,strainStr2NumD)

    geneNames = genomes.geneNames(paramD['geneOrderFN'],strainStr2NumD,strainNum2StrD)

    subtreeL=trees.createSubtreeL(tree)
    subtreeL.sort()
    
    geneOrderT=genomes.createGeneOrderTs(paramD['geneOrderFN'],geneNames,subtreeL,strainStr2NumD)

    familyL = families.readFamilies(paramD['familyFN'],tree,geneNames,strainStr2NumD)

    geneInfoD = genomes.readGeneInfoD(paramD['geneInfoFN'])

    totalBases, chromsL, allValRanges = readRanges(validationFile)
    nodesLL,uniqueStrains = nodesPerRange()

    islandsOfInterest()