GPhase_LOOC.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:GPhase 作者: kshitijtayal 项目源码 文件源码
def main(haplotypeMatrix):

        #dictAccuracy = {}   # {0 : [no. of snp , correctly identified]}\n",
        manager = Manager()
        dictAccuracy = manager.dict()   # synchronize dictionary for multiprocessing

        nprocs = []   # saves the process



        for item in list_split(haplotypeMatrix.shape[0],arg2): 
            print 'range of haplotype given to each thread: ' ,item

        for item in list_split(haplotypeMatrix.shape[0],arg2):                      #Specify number of thread
            n = multiprocessing.Process(target=Computation, args=(item,haplotypeMatrix,dictAccuracy ))   # multiprocessing 
            nprocs.append(n)
            n.start()

        for i in nprocs:   
             i.join()        # waiting for all the process to finish

        #print dictAccuracy

        print 'Switch Accuracy is : ', SwitchAccuracy(dictAccuracy)
        print 'Accuracy is : ', NewAccuracy(dictAccuracy)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号