當前位置: 首頁>>代碼示例>>Python>>正文


Python GeminiPlugin.add_case方法代碼示例

本文整理匯總了Python中puzzle.plugins.GeminiPlugin.add_case方法的典型用法代碼示例。如果您正苦於以下問題:Python GeminiPlugin.add_case方法的具體用法?Python GeminiPlugin.add_case怎麽用?Python GeminiPlugin.add_case使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在puzzle.plugins.GeminiPlugin的用法示例。


在下文中一共展示了GeminiPlugin.add_case方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_no_filters_sv

# 需要導入模塊: from puzzle.plugins import GeminiPlugin [as 別名]
# 或者: from puzzle.plugins.GeminiPlugin import add_case [as 別名]
    def test_no_filters_sv(self, gemini_sv_case_obj):
        plugin = GeminiPlugin()
        plugin.add_case(gemini_sv_case_obj)

        filters = {}
        result = plugin.variants('hapmap', filters=filters, count=1000)
        variants = result.variants
        nr_of_variants = result.nr_of_variants
        
        assert nr_of_variants == 513
開發者ID:J35P312,項目名稱:puzzle,代碼行數:12,代碼來源:test_gemini_variant_mixin.py

示例2: test_filters_no_filters

# 需要導入模塊: from puzzle.plugins import GeminiPlugin [as 別名]
# 或者: from puzzle.plugins.GeminiPlugin import add_case [as 別名]
    def test_filters_no_filters(self, gemini_case_obj):
        plugin = GeminiPlugin()
        plugin.add_case(gemini_case_obj)

        filters = {}
        result = plugin.variants('643594', filters=filters, count=1000)
        variants = result.variants
        nr_of_variants = result.nr_of_variants

        assert nr_of_variants == 14
開發者ID:J35P312,項目名稱:puzzle,代碼行數:12,代碼來源:test_gemini_variant_mixin.py

示例3: test_get_all_variants

# 需要導入模塊: from puzzle.plugins import GeminiPlugin [as 別名]
# 或者: from puzzle.plugins.GeminiPlugin import add_case [as 別名]
def test_get_all_variants(gemini_case_obj):
    """Test to get some variants from the gemini adapter"""
    plugin = GeminiPlugin()
    plugin.add_case(gemini_case_obj)

    filters = {}
    result = plugin.variants('643594', filters=filters, count=1000)
    variants = result.variants
    nr_of_variants = result.nr_of_variants

    assert nr_of_variants == 14
開發者ID:J35P312,項目名稱:puzzle,代碼行數:13,代碼來源:test_gemini_variant_mixin.py

示例4: test_filters_impact_severities_medium

# 需要導入模塊: from puzzle.plugins import GeminiPlugin [as 別名]
# 或者: from puzzle.plugins.GeminiPlugin import add_case [as 別名]
    def test_filters_impact_severities_medium(self, gemini_case_obj):
        plugin = GeminiPlugin()
        plugin.add_case(gemini_case_obj)

        filters = {'impact_severities':['MEDIUM']}
        result = plugin.variants('643594', filters=filters, count=1000)
        variants = result.variants
        nr_of_variants = result.nr_of_variants
        
        for variant_obj in variants:
            assert variant_obj.impact_severity == 'MEDIUM'
        assert nr_of_variants == 10
開發者ID:J35P312,項目名稱:puzzle,代碼行數:14,代碼來源:test_gemini_variant_mixin.py

示例5: test_filters_sv_len

# 需要導入模塊: from puzzle.plugins import GeminiPlugin [as 別名]
# 或者: from puzzle.plugins.GeminiPlugin import add_case [as 別名]
    def test_filters_sv_len(self, gemini_sv_case_obj):
        plugin = GeminiPlugin()
        plugin.add_case(gemini_sv_case_obj)

        filters = {'sv_len':'800'}
        result = plugin.variants('hapmap', filters=filters, count=1000)
        variants = result.variants
        nr_of_variants = result.nr_of_variants
        
        for variant_obj in variants:
            assert variant_obj.sv_len >= 800
        
        assert nr_of_variants == 176
開發者ID:J35P312,項目名稱:puzzle,代碼行數:15,代碼來源:test_gemini_variant_mixin.py

示例6: test_variant

# 需要導入模塊: from puzzle.plugins import GeminiPlugin [as 別名]
# 或者: from puzzle.plugins.GeminiPlugin import add_case [as 別名]
def test_variant(gemini_case_obj):
    """Test to get one variant"""
    plugin = GeminiPlugin()
    plugin.add_case(gemini_case_obj)

    variant = plugin.variant(
        case_id='643594',
        variant_id=4
    )

    assert variant['CHROM'] == '6'
    assert variant['POS'] == '32487163'
    assert type(variant['genes']) == type([])
開發者ID:J35P312,項目名稱:puzzle,代碼行數:15,代碼來源:test_gemini_variant_mixin.py

示例7: test_filters_gene_ids

# 需要導入模塊: from puzzle.plugins import GeminiPlugin [as 別名]
# 或者: from puzzle.plugins.GeminiPlugin import add_case [as 別名]
    def test_filters_gene_ids(self, gemini_case_obj):
        plugin = GeminiPlugin()
        plugin.add_case(gemini_case_obj)

        filters = {'gene_ids':['HLA-DRB5']}
        result = plugin.variants('643594', filters=filters, count=1000)
        variants = result.variants
        nr_of_variants = result.nr_of_variants
        
        for variant_obj in variants:
            assert 'HLA-DRB5' in variant_obj.gene_symbols
        
        assert nr_of_variants == 5
開發者ID:J35P312,項目名稱:puzzle,代碼行數:15,代碼來源:test_gemini_variant_mixin.py

示例8: test_filters_cadd

# 需要導入模塊: from puzzle.plugins import GeminiPlugin [as 別名]
# 或者: from puzzle.plugins.GeminiPlugin import add_case [as 別名]
    def test_filters_cadd(self, gemini_case_obj):
        plugin = GeminiPlugin()
        plugin.add_case(gemini_case_obj)

        filters = {'cadd':'20'}
        result = plugin.variants('643594', filters=filters, count=1000)
        variants = result.variants
        nr_of_variants = result.nr_of_variants
        
        for variant_obj in variants:
            assert variant_obj.cadd_score > 20
        
        assert nr_of_variants == 4
開發者ID:J35P312,項目名稱:puzzle,代碼行數:15,代碼來源:test_gemini_variant_mixin.py

示例9: test_filters_frequency

# 需要導入模塊: from puzzle.plugins import GeminiPlugin [as 別名]
# 或者: from puzzle.plugins.GeminiPlugin import add_case [as 別名]
    def test_filters_frequency(self, gemini_case_obj):
        plugin = GeminiPlugin()
        plugin.add_case(gemini_case_obj)

        filters = {'frequency':'0.01'}
        result = plugin.variants('643594', filters=filters, count=1000)
        variants = result.variants
        nr_of_variants = result.nr_of_variants
        
        for variant_obj in variants:
            assert variant_obj.max_freq < 0.01
        
        assert nr_of_variants == 13
開發者ID:J35P312,項目名稱:puzzle,代碼行數:15,代碼來源:test_gemini_variant_mixin.py

示例10: test_filters_consequence

# 需要導入模塊: from puzzle.plugins import GeminiPlugin [as 別名]
# 或者: from puzzle.plugins.GeminiPlugin import add_case [as 別名]
    def test_filters_consequence(self, gemini_case_obj):
        plugin = GeminiPlugin()
        plugin.add_case(gemini_case_obj)

        filters = {'consequence':['stop_gained']}
        result = plugin.variants('643594', filters=filters, count=1000)
        variants = result.variants
        nr_of_variants = result.nr_of_variants
        
        for variant_obj in variants:
            assert 'stop_gained' in variant_obj.consequences
        
        assert nr_of_variants == 2
開發者ID:J35P312,項目名稱:puzzle,代碼行數:15,代碼來源:test_gemini_variant_mixin.py

示例11: test_filters_range

# 需要導入模塊: from puzzle.plugins import GeminiPlugin [as 別名]
# 或者: from puzzle.plugins.GeminiPlugin import add_case [as 別名]
    def test_filters_range(self, gemini_case_obj):
        plugin = GeminiPlugin()
        plugin.add_case(gemini_case_obj)

        start = 92498060
        end = 92498100

        filters = {'range': {'chromosome': 'chr1', 'start': start, 'end':end}}
        result = plugin.variants('643594', filters=filters, count=1000)
        variants = result.variants
        nr_of_variants = result.nr_of_variants
        
        for variant_obj in variants:
            assert variant_obj.start >= start
            assert variant_obj.stop <= end
        
        assert nr_of_variants == 1
開發者ID:J35P312,項目名稱:puzzle,代碼行數:19,代碼來源:test_gemini_variant_mixin.py

示例12: test_add_transcripts

# 需要導入模塊: from puzzle.plugins import GeminiPlugin [as 別名]
# 或者: from puzzle.plugins.GeminiPlugin import add_case [as 別名]
    def test_add_transcripts(self, gemini_case_obj, variant):
        adapter = GeminiPlugin()
        adapter.add_case(gemini_case_obj)
        adapter.db = gemini_case_obj.variant_source
    
        gemini_variant = {'variant_id': 1}
        adapter._add_transcripts(variant, gemini_variant)
        
        transcripts = variant.transcripts
        
        assert len(transcripts) == 2

        first_transcript = transcripts[0]

        assert first_transcript.transcript_id == 'ENST00000370383'
        assert first_transcript.hgnc_symbol == 'EPHX4'
        assert first_transcript.consequence == 'missense_variant'
        assert first_transcript.ensembl_id == None
        assert first_transcript.biotype == 'protein_coding'
        assert first_transcript.sift == 'deleterious'
        assert first_transcript.polyphen == 'probably_damaging'
開發者ID:J35P312,項目名稱:puzzle,代碼行數:23,代碼來源:test_gemini_variant_extras.py

示例13: test_get_individuals

# 需要導入模塊: from puzzle.plugins import GeminiPlugin [as 別名]
# 或者: from puzzle.plugins.GeminiPlugin import add_case [as 別名]
def test_get_individuals(gemini_case_obj):
    adapter = GeminiPlugin()
    adapter.add_case(gemini_case_obj)
    
    ind_ids = [ind.ind_id for ind in adapter.individual_objs]
    assert set(ind_ids) == set(['NA12877', 'NA12878', 'NA12882'])
開發者ID:J35P312,項目名稱:puzzle,代碼行數:8,代碼來源:test_gemini_case_mixin.py

示例14: test_case_no_id

# 需要導入模塊: from puzzle.plugins import GeminiPlugin [as 別名]
# 或者: from puzzle.plugins.GeminiPlugin import add_case [as 別名]
def test_case_no_id(gemini_case_obj):
    adapter = GeminiPlugin()
    adapter.add_case(gemini_case_obj)

    case_id = '643594'
    assert adapter.case().case_id == case_id
開發者ID:J35P312,項目名稱:puzzle,代碼行數:8,代碼來源:test_gemini_case_mixin.py

示例15: test_get_individuals_one_ind

# 需要導入模塊: from puzzle.plugins import GeminiPlugin [as 別名]
# 或者: from puzzle.plugins.GeminiPlugin import add_case [as 別名]
def test_get_individuals_one_ind(gemini_case_obj):
    adapter = GeminiPlugin()
    adapter.add_case(gemini_case_obj)

    ind_ids = [ind.ind_id for ind in adapter.individuals('NA12877')]
    assert set(ind_ids) == set(['NA12877'])
開發者ID:J35P312,項目名稱:puzzle,代碼行數:8,代碼來源:test_gemini_case_mixin.py


注:本文中的puzzle.plugins.GeminiPlugin.add_case方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。