当前位置: 首页>>代码示例>>Python>>正文


Python Chromosome.get_experiment方法代码示例

本文整理汇总了Python中pytadbit.Chromosome.get_experiment方法的典型用法代码示例。如果您正苦于以下问题:Python Chromosome.get_experiment方法的具体用法?Python Chromosome.get_experiment怎么用?Python Chromosome.get_experiment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pytadbit.Chromosome的用法示例。


在下文中一共展示了Chromosome.get_experiment方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_04_chromosome_batch

# 需要导入模块: from pytadbit import Chromosome [as 别名]
# 或者: from pytadbit.Chromosome import get_experiment [as 别名]
    def test_04_chromosome_batch(self):
        if ONLY and ONLY != "04":
            return
        if CHKTIME:
            t0 = time()

        test_chr = Chromosome(
            name="Test Chromosome",
            experiment_resolutions=[20000] * 3,
            experiment_hic_data=[
                PATH + "/20Kb/chrT/chrT_A.tsv",
                PATH + "/20Kb/chrT/chrT_D.tsv",
                PATH + "/20Kb/chrT/chrT_C.tsv",
            ],
            experiment_names=["exp1", "exp2", "exp3"],
            silent=True,
        )
        test_chr.find_tad(["exp1", "exp2", "exp3"], batch_mode=True, verbose=False, silent=True)
        tads = test_chr.get_experiment("batch_exp1_exp2_exp3").tads
        found = [tads[t]["end"] for t in tads if tads[t]["score"] > 0]
        # Values obtained with square root normalization.
        # self.assertEqual([3.0, 8.0, 16.0, 21.0, 28.0, 35.0, 43.0,
        #                  49.0, 61.0, 66.0, 75.0, 89.0, 94.0, 99.0], found)
        self.assertEqual([3.0, 14.0, 19.0, 33.0, 43.0, 49.0, 61.0, 66.0, 71.0, 89.0, 94.0, 99.0], found)

        if CHKTIME:
            print "4", time() - t0
开发者ID:MarcoDiS,项目名称:TADbit,代码行数:29,代码来源:test_all.py

示例2: test_04_chromosome_batch

# 需要导入模块: from pytadbit import Chromosome [as 别名]
# 或者: from pytadbit.Chromosome import get_experiment [as 别名]
    def test_04_chromosome_batch(self):
        if ONLY and ONLY != '04':
            return
        if CHKTIME:
            t0 = time()

        test_chr = Chromosome(name='Test Chromosome',
                              experiment_resolutions=[20000]*3,
                              experiment_hic_data=[
                                  PATH + '/20Kb/chrT/chrT_A.tsv',
                                  PATH + '/20Kb/chrT/chrT_D.tsv',
                                  PATH + '/20Kb/chrT/chrT_C.tsv'],
                              experiment_names=['exp1', 'exp2', 'exp3'],
                              silent=True)
        test_chr.find_tad(['exp1', 'exp2', 'exp3'], batch_mode=True,
                          verbose=False, silent=True)
        tads = test_chr.get_experiment('batch_exp1_exp2_exp3').tads
        found = [tads[t]['end'] for t in tads if tads[t]['score'] > 0]
        # Values obtained with square root normalization.
        #self.assertEqual([3.0, 8.0, 16.0, 21.0, 28.0, 35.0, 43.0,
        #                  49.0, 61.0, 66.0, 75.0, 89.0, 94.0, 99.0], found)
        self.assertEqual([3.0, 14.0, 19.0, 33.0, 43.0, 49.0, 61.0, 66.0,
                           71.0, 89.0, 94.0, 99.0], found)
        
        if CHKTIME:
            print '4', time() - t0
开发者ID:kangk1204,项目名称:TADbit,代码行数:28,代码来源:test_all.py

示例3: test_04_chromosome_batch

# 需要导入模块: from pytadbit import Chromosome [as 别名]
# 或者: from pytadbit.Chromosome import get_experiment [as 别名]
 def test_04_chromosome_batch(self):
     test_chr = Chromosome(name='Test Chromosome',
                           experiment_resolutions=[20000]*3,
                           experiment_hic_data=['20Kb/chrT/chrT_A.tsv',
                                                '20Kb/chrT/chrT_D.tsv',
                                                '20Kb/chrT/chrT_C.tsv'],
                           experiment_names=['exp1', 'exp2', 'exp3'])
     test_chr.find_tad(['exp1', 'exp2', 'exp3'], batch_mode=True,
                       verbose=False)
     tads = test_chr.get_experiment('batch_exp1_exp2_exp3').tads
     found = [tads[t]['end'] for t in tads if tads[t]['score'] > 0]
     self.assertEqual([3.0, 8.0, 16.0, 21.0, 28.0, 35.0, 43.0,
                       49.0, 61.0, 66.0, 75.0, 89.0, 99.0], found)
开发者ID:dbau,项目名称:tadbit,代码行数:15,代码来源:test_all.py


注:本文中的pytadbit.Chromosome.get_experiment方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。