本文整理汇总了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())
示例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())
示例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())
示例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())
示例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)
示例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)
示例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)
示例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)
示例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)
示例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)
示例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)
示例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)