本文整理汇总了Python中bdgenomics.adam.adamContext.ADAMContext.loadVariants方法的典型用法代码示例。如果您正苦于以下问题:Python ADAMContext.loadVariants方法的具体用法?Python ADAMContext.loadVariants怎么用?Python ADAMContext.loadVariants使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bdgenomics.adam.adamContext.ADAMContext
的用法示例。
在下文中一共展示了ADAMContext.loadVariants方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_vcf_round_trip
# 需要导入模块: from bdgenomics.adam.adamContext import ADAMContext [as 别名]
# 或者: from bdgenomics.adam.adamContext.ADAMContext import loadVariants [as 别名]
def test_vcf_round_trip(self):
testFile = self.resourceFile("small.vcf")
ac = ADAMContext(self.ss)
variants = ac.loadVariants(testFile)
tmpPath = self.tmpFile() + ".vcf"
variants.toVariantContexts().saveAsVcf(tmpPath)
savedVariants = ac.loadVariants(testFile)
self.assertEqual(variants._jvmRdd.jrdd().count(),
savedVariants._jvmRdd.jrdd().count())
示例2: test_transform
# 需要导入模块: from bdgenomics.adam.adamContext import ADAMContext [as 别名]
# 或者: from bdgenomics.adam.adamContext.ADAMContext import loadVariants [as 别名]
def test_transform(self):
variantPath = self.resourceFile("small.vcf")
ac = ADAMContext(self.ss)
variants = ac.loadVariants(variantPath)
transformedVariants = variants.transform(lambda x: x.filter(x.start < 19190))
self.assertEqual(transformedVariants.toDF().count(), 3)
示例3: test_load_variants
# 需要导入模块: from bdgenomics.adam.adamContext import ADAMContext [as 别名]
# 或者: from bdgenomics.adam.adamContext.ADAMContext import loadVariants [as 别名]
def test_load_variants(self):
testFile = self.resourceFile("small.vcf")
ac = ADAMContext(self.ss)
reads = ac.loadVariants(testFile)
self.assertEqual(reads.toDF().count(), 6)
self.assertEqual(reads._jvmRdd.jrdd().count(), 6)
示例4: test_realignIndels_known_indels
# 需要导入模块: from bdgenomics.adam.adamContext import ADAMContext [as 别名]
# 或者: from bdgenomics.adam.adamContext.ADAMContext import loadVariants [as 别名]
def test_realignIndels_known_indels(self):
readsPath = self.resourceFile("small.1.sam")
variantsPath = self.resourceFile("small.vcf")
ac = ADAMContext(self.ss)
reads = ac.loadAlignments(readsPath)
knownIndels = ac.loadVariants(variantsPath)
realigned = reads.realignIndelsFromKnownIndels(knownIndels)
self.assertEqual(realigned.toDF().count(), 20)