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


Python ADAMContext.loadFeatures方法代码示例

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


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

示例1: test_round_trip_interval_list

# 需要导入模块: from bdgenomics.adam.adamContext import ADAMContext [as 别名]
# 或者: from bdgenomics.adam.adamContext.ADAMContext import loadFeatures [as 别名]
    def test_round_trip_interval_list(self):

        testFile = self.resourceFile("SeqCap_EZ_Exome_v3.hg19.interval_list")
        ac = ADAMContext(self.ss)
        
        features = ac.loadFeatures(testFile)
        tmpPath = self.tmpFile() + ".interval_list"
        features.save(tmpPath,
                      asSingleFile=True)

        savedFeatures = ac.loadFeatures(testFile)

        self.assertEqual(features._jvmRdd.jrdd().count(),
                          savedFeatures._jvmRdd.jrdd().count())
开发者ID:bigdatagenomics,项目名称:adam,代码行数:16,代码来源:featureDataset_test.py

示例2: test_round_trip_bed

# 需要导入模块: from bdgenomics.adam.adamContext import ADAMContext [as 别名]
# 或者: from bdgenomics.adam.adamContext.ADAMContext import loadFeatures [as 别名]
    def test_round_trip_bed(self):

        testFile = self.resourceFile("gencode.v7.annotation.trunc10.bed")
        ac = ADAMContext(self.ss)
        
        features = ac.loadFeatures(testFile)
        tmpPath = self.tmpFile() + ".bed"
        features.save(tmpPath,
                      asSingleFile=True)

        savedFeatures = ac.loadFeatures(testFile)

        self.assertEqual(features._jvmRdd.jrdd().count(),
                          savedFeatures._jvmRdd.jrdd().count())
开发者ID:bigdatagenomics,项目名称:adam,代码行数:16,代码来源:featureDataset_test.py

示例3: test_round_trip_narrowPeak

# 需要导入模块: from bdgenomics.adam.adamContext import ADAMContext [as 别名]
# 或者: from bdgenomics.adam.adamContext.ADAMContext import loadFeatures [as 别名]
    def test_round_trip_narrowPeak(self):

        testFile = self.resourceFile("wgEncodeOpenChromDnaseGm19238Pk.trunc10.narrowPeak")
        ac = ADAMContext(self.ss)
        
        features = ac.loadFeatures(testFile)
        tmpPath = self.tmpFile() + ".narrowPeak"
        features.save(tmpPath,
                      asSingleFile=True)

        savedFeatures = ac.loadFeatures(testFile)

        self.assertEqual(features._jvmRdd.jrdd().count(),
                          savedFeatures._jvmRdd.jrdd().count())
开发者ID:bigdatagenomics,项目名称:adam,代码行数:16,代码来源:featureDataset_test.py

示例4: test_round_trip_gtf

# 需要导入模块: from bdgenomics.adam.adamContext import ADAMContext [as 别名]
# 或者: from bdgenomics.adam.adamContext.ADAMContext import loadFeatures [as 别名]
    def test_round_trip_gtf(self):

        testFile = self.resourceFile("Homo_sapiens.GRCh37.75.trun20.gtf")
        ac = ADAMContext(self.ss)
        
        features = ac.loadFeatures(testFile)
        tmpPath = self.tmpFile() + ".gtf"
        features.save(tmpPath,
                      asSingleFile=True)

        savedFeatures = ac.loadFeatures(testFile)

        self.assertEqual(features._jvmRdd.jrdd().count(),
                          savedFeatures._jvmRdd.jrdd().count())
开发者ID:bigdatagenomics,项目名称:adam,代码行数:16,代码来源:featureDataset_test.py

示例5: test_load_interval_list

# 需要导入模块: from bdgenomics.adam.adamContext import ADAMContext [as 别名]
# 或者: from bdgenomics.adam.adamContext.ADAMContext import loadFeatures [as 别名]
    def test_load_interval_list(self):

        testFile = self.resourceFile("SeqCap_EZ_Exome_v3.hg19.interval_list")
        ac = ADAMContext(self.ss)
        
        reads = ac.loadFeatures(testFile)

        self.assertEqual(reads.toDF().count(), 369)
        self.assertEqual(reads._jvmRdd.jrdd().count(), 369)
开发者ID:bigdatagenomics,项目名称:adam,代码行数:11,代码来源:adamContext_test.py

示例6: test_load_bed

# 需要导入模块: from bdgenomics.adam.adamContext import ADAMContext [as 别名]
# 或者: from bdgenomics.adam.adamContext.ADAMContext import loadFeatures [as 别名]
    def test_load_bed(self):

        testFile = self.resourceFile("gencode.v7.annotation.trunc10.bed")
        ac = ADAMContext(self.ss)
        
        reads = ac.loadFeatures(testFile)

        self.assertEqual(reads.toDF().count(), 10)
        self.assertEqual(reads._jvmRdd.jrdd().count(), 10)
开发者ID:bigdatagenomics,项目名称:adam,代码行数:11,代码来源:adamContext_test.py

示例7: test_load_gtf

# 需要导入模块: from bdgenomics.adam.adamContext import ADAMContext [as 别名]
# 或者: from bdgenomics.adam.adamContext.ADAMContext import loadFeatures [as 别名]
    def test_load_gtf(self):

        testFile = self.resourceFile("Homo_sapiens.GRCh37.75.trun20.gtf")
        ac = ADAMContext(self.ss)
        
        reads = ac.loadFeatures(testFile)

        self.assertEqual(reads.toDF().count(), 15)
        self.assertEqual(reads._jvmRdd.jrdd().count(), 15)
开发者ID:bigdatagenomics,项目名称:adam,代码行数:11,代码来源:adamContext_test.py

示例8: test_transform

# 需要导入模块: from bdgenomics.adam.adamContext import ADAMContext [as 别名]
# 或者: from bdgenomics.adam.adamContext.ADAMContext import loadFeatures [as 别名]
    def test_transform(self):

        featurePath = self.resourceFile("gencode.v7.annotation.trunc10.bed")
        ac = ADAMContext(self.ss)

        features = ac.loadFeatures(featurePath)

        transformedFeatures = features.transform(lambda x: x.filter(x.start < 12613))

        self.assertEqual(transformedFeatures.toDF().count(), 6)
开发者ID:bigdatagenomics,项目名称:adam,代码行数:12,代码来源:featureDataset_test.py

示例9: test_load_narrowPeak

# 需要导入模块: from bdgenomics.adam.adamContext import ADAMContext [as 别名]
# 或者: from bdgenomics.adam.adamContext.ADAMContext import loadFeatures [as 别名]
    def test_load_narrowPeak(self):

        
        testFile = self.resourceFile("wgEncodeOpenChromDnaseGm19238Pk.trunc10.narrowPeak")
        ac = ADAMContext(self.ss)
        
        reads = ac.loadFeatures(testFile)

        self.assertEqual(reads.toDF().count(), 10)
        self.assertEqual(reads._jvmRdd.jrdd().count(), 10)
开发者ID:bigdatagenomics,项目名称:adam,代码行数:12,代码来源:adamContext_test.py

示例10: test_shuffle_right_outer_join_groupBy_left

# 需要导入模块: from bdgenomics.adam.adamContext import ADAMContext [as 别名]
# 或者: from bdgenomics.adam.adamContext.ADAMContext import loadFeatures [as 别名]
    def test_shuffle_right_outer_join_groupBy_left(self):

        readsPath = self.resourceFile("small.1.sam")
        targetsPath = self.resourceFile("small.1.bed")

        ac = ADAMContext(self.ss)

        reads = ac.loadAlignments(readsPath)
        targets = ac.loadFeatures(targetsPath)

        jRdd = reads.rightOuterShuffleRegionJoinAndGroupByLeft(targets)

        self.assertEqual(jRdd.toDF().count(), 21)
开发者ID:bigdatagenomics,项目名称:adam,代码行数:15,代码来源:alignmentRecordDataset_test.py

示例11: test_shuffle_inner_join

# 需要导入模块: from bdgenomics.adam.adamContext import ADAMContext [as 别名]
# 或者: from bdgenomics.adam.adamContext.ADAMContext import loadFeatures [as 别名]
    def test_shuffle_inner_join(self):

        readsPath = self.resourceFile("small.1.sam")
        targetsPath = self.resourceFile("small.1.bed")

        ac = ADAMContext(self.ss)

        reads = ac.loadAlignments(readsPath)
        targets = ac.loadFeatures(targetsPath)

        jRdd = reads.shuffleRegionJoin(targets)

        self.assertEqual(jRdd.toDF().count(), 5)
开发者ID:bigdatagenomics,项目名称:adam,代码行数:15,代码来源:alignmentRecordDataset_test.py

示例12: test_broadcast_right_outer_join

# 需要导入模块: from bdgenomics.adam.adamContext import ADAMContext [as 别名]
# 或者: from bdgenomics.adam.adamContext.ADAMContext import loadFeatures [as 别名]
    def test_broadcast_right_outer_join(self):

        readsPath = self.resourceFile("small.1.sam")
        targetsPath = self.resourceFile("small.1.bed")

        ac = ADAMContext(self.ss)

        reads = ac.loadAlignments(readsPath)
        targets = ac.loadFeatures(targetsPath)

        jRdd = reads.rightOuterBroadcastRegionJoin(targets)

        self.assertEqual(jRdd.toDF().count(), 6)
开发者ID:bigdatagenomics,项目名称:adam,代码行数:15,代码来源:alignmentRecordDataset_test.py


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