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


Python Output.getMessagesWithErrorCode方法代码示例

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


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

示例1: TestConverter

# 需要导入模块: from mutalyzer.output import Output [as 别名]
# 或者: from mutalyzer.output.Output import getMessagesWithErrorCode [as 别名]

#.........这里部分代码省略.........
        assert 'NM_001007553.1:c.3863delA' not in coding
        assert 'NM_001007553.1:c.*953delA' in coding
        assert 'NM_001130523.1:c.*953delA' in coding

    def test_S_Venkata_Suresh_Kumar_more(self):
        """
        Another test for correct mapping information on genes where CDS start
        or stop is exactly on the border of an exon.

        Bug reported March 21, 2012 by S Venkata Suresh Kumar.
        """
        converter = self._converter('hg19')
        coding = converter.chrom2c('NC_000001.10:g.160012314_160012329del16', 'list')
        assert 'NM_002241.4:c.-27250-7_-27242del16' not in coding
        assert 'NM_002241.4:c.1-7_9del16' in coding

    def test_range_order_forward_correct(self):
        """
        Just a normal position converter call, both directions.  See Trac #95.
        """
        converter = self._converter('hg19')
        genomic = converter.c2chrom('NM_003002.2:c.-1_274del')
        assert genomic == 'NC_000011.9:g.111957631_111959695del'
        coding = converter.chrom2c(genomic, 'list')
        assert 'NM_003002.2:c.-1_274del' in coding

    def test_range_order_forward_incorrect_c2chrom(self):
        """
        Incorrect order of a range on the forward strand. See Trac #95.
        """
        converter = self._converter('hg19')
        genomic = converter.c2chrom('NM_003002.2:c.274_-1del')
        assert genomic == None
        erange = self.output.getMessagesWithErrorCode('ERANGE')
        assert len(erange) == 1

    def test_range_order_reverse_correct(self):
        """
        Just a normal position converter call on the reverse strand, both
        directions. See Trac #95.
        """
        converter = self._converter('hg19')
        genomic = converter.c2chrom('NM_001162505.1:c.-1_40del')
        assert genomic == 'NC_000020.10:g.48770135_48770175del'
        coding = converter.chrom2c(genomic, 'list')
        assert 'NM_001162505.1:c.-1_40del' in coding

    def test_range_order_reverse_incorrect_c2chrom(self):
        """
        Incorrect order of a range on the reverse strand. See Trac #95.
        """
        converter = self._converter('hg19')
        genomic = converter.c2chrom('NM_001162505.1:c.40_-1del')
        assert genomic == None
        erange = self.output.getMessagesWithErrorCode('ERANGE')
        assert len(erange) == 1

    def test_range_order_incorrect_chrom2c(self):
        """
        Incorrect order of a chromosomal range. See Trac #95.
        """
        converter = self._converter('hg19')
        coding = converter.chrom2c('NC_000011.9:g.111959695_111957631del', 'list')
        assert coding == None
        erange = self.output.getMessagesWithErrorCode('ERANGE')
        assert len(erange) == 1
开发者ID:cchng,项目名称:mutalyzer,代码行数:70,代码来源:test_mapping.py


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