示例#1
0
文件: xenoGI.py 项目: dstoebel/xenoGI
import sys
import parameters, genbank, trees, genomes, scores, families, islands

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)
示例#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()