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


Python adamContext.ADAMContext类代码示例

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


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

示例1: test_aggregatedCoverage

    def test_aggregatedCoverage(self):
        testFile = self.resourceFile("small.sam")
        ac = ADAMContext(self.ss)

        reads = ac.loadAlignments(testFile)
        coverage = reads.toCoverage()
        collapsed = coverage.aggregatedCoverage(10)
        self.assertEquals(collapsed.toDF().count(), 166)
开发者ID:karenfeng,项目名称:adam,代码行数:8,代码来源:coverageRdd_test.py

示例2: test_collapse

    def test_collapse(self):
        testFile = self.resourceFile("sorted.sam")
        ac = ADAMContext(self.ss)

        reads = ac.loadAlignments(testFile)
        coverage = reads.toCoverage()
        collapsed = coverage.collapse()
        self.assertEquals(collapsed.toDF().count(), coverage.toDF().count())
开发者ID:karenfeng,项目名称:adam,代码行数:8,代码来源:coverageRdd_test.py

示例3: test_flatten

    def test_flatten(self):
        testFile = self.resourceFile("small.sam")
        ac = ADAMContext(self.ss)

        reads = ac.loadAlignments(testFile)
        coverage = reads.toCoverage()
        flattened = coverage.flatten()
        self.assertEquals(flattened.toDF().count(), 1500)
开发者ID:karenfeng,项目名称:adam,代码行数:8,代码来源:coverageRdd_test.py

示例4: test_to_fragments

    def test_to_fragments(self):

        readsPath = self.resourceFile("unsorted.sam")
        ac = ADAMContext(self.ss)

        reads = ac.loadAlignments(readsPath)

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

示例5: test_count_kmers

    def test_count_kmers(self):

        testFile = self.resourceFile("small.sam")
        ac = ADAMContext(self.ss)

        reads = ac.loadAlignments(testFile)
        kmers = reads.countKmers(6)

        self.assertEqual(kmers.count(), 1040)
开发者ID:bigdatagenomics,项目名称:adam,代码行数:9,代码来源:alignmentRecordDataset_test.py

示例6: test_load_coverage

    def test_load_coverage(self):


        testFile = self.resourceFile("sample_coverage.bed")
        ac = ADAMContext(self.ss)

        coverage = ac.loadCoverage(testFile)

        self.assertEqual(coverage.toDF().count(), 3)
开发者ID:bigdatagenomics,项目名称:adam,代码行数:9,代码来源:adamContext_test.py

示例7: test_load_interval_list

    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,代码行数:9,代码来源:adamContext_test.py

示例8: test_load_bed

    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,代码行数:9,代码来源:adamContext_test.py

示例9: test_load_gtf

    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,代码行数:9,代码来源:adamContext_test.py

示例10: test_load_alignments

    def test_load_alignments(self):
        
        testFile = self.resourceFile("small.sam")
        ac = ADAMContext(self.ss)
        
        reads = ac.loadAlignments(testFile)

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

示例11: test_transform

    def test_transform(self):
        testFile = self.resourceFile("random.vcf")
        ac = ADAMContext(self.ss)

        genotypes = ac.loadGenotypes(testFile)

        transformedGenotypes = genotypes.transform(lambda x: x.filter(x.contigName == '1'))

        self.assertEquals(transformedGenotypes.toDF().count(), 9)
开发者ID:karenfeng,项目名称:adam,代码行数:9,代码来源:genotypeRdd_test.py

示例12: test_load_narrowPeak

    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,代码行数:10,代码来源:adamContext_test.py

示例13: test_load_contig_fragments

    def test_load_contig_fragments(self):


        testFile = self.resourceFile("HLA_DQB1_05_01_01_02.fa")
        ac = ADAMContext(self.ss)
        
        reads = ac.loadContigFragments(testFile)

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

示例14: test_toFeatures

    def test_toFeatures(self):
        testFile = self.resourceFile("sorted.sam")
        ac = ADAMContext(self.ss)

        reads = ac.loadAlignments(testFile)
        coverage = reads.toCoverage()
        features = coverage.toFeatures()

        assert(isinstance(features, FeatureRDD))
        self.assertEquals(features.toDF().count(), coverage.toDF().count())
开发者ID:karenfeng,项目名称:adam,代码行数:10,代码来源:coverageRdd_test.py

示例15: test_transform

    def test_transform(self):

        readsPath = self.resourceFile("unsorted.sam")
        ac = ADAMContext(self.ss)

        reads = ac.loadAlignments(readsPath)

        transformedReads = reads.transform(lambda x: x.filter(x.referenceName == "1"))

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


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