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


Python Bio.Wise类代码示例

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


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

示例1: align

def align(pair, match=_SCORE_MATCH, mismatch=_SCORE_MISMATCH, gap=_SCORE_GAP_START, extension=_SCORE_GAP_EXTENSION, **keywds):
    cmdline = _build_dnal_cmdline(match, mismatch, gap, extension)
    temp_file = Wise.align(cmdline, pair, **keywds)
    try:
        return Statistics(temp_file.name, match, mismatch, gap, extension)
    except AttributeError:
        try:
            keywds['dry_run']
            return None
        except KeyError:
            raise
开发者ID:dbmi-pitt,项目名称:DIKB-Evidence-analytics,代码行数:11,代码来源:dnal.py

示例2: align

def align(pair, scores=None, gap_start=None, gap_extension=None, *args, **keywds):

    cmdline = _CMDLINE_PSW[:]
    if scores:
        cmdline.extend((_OPTION_SCORES, scores))
    if gap_start:
        cmdline.extend((_OPTION_GAP_START, str(gap_start)))
    if gap_extension:
        cmdline.extend((_OPTION_GAP_EXTENSION, str(gap_extension)))
    temp_file = Wise.align(cmdline, pair, *args, **keywds)
    return parse(temp_file)
开发者ID:nuin,项目名称:biopython,代码行数:11,代码来源:psw.py

示例3: align

def align(pair, match=_SCORE_MATCH, mismatch=_SCORE_MISMATCH, gap=_SCORE_GAP_START, extension=_SCORE_GAP_EXTENSION, **keywds):
    """Align a pair of DNA files using dnal and calculate the statistics of the alignment."""
    cmdline = _build_dnal_cmdline(match, mismatch, gap, extension)
    temp_file = Wise.align(cmdline, pair, **keywds)
    try:
        return Statistics(temp_file.name, match, mismatch, gap, extension)
    except AttributeError:
        try:
            keywds['dry_run']
            return None
        except KeyError:
            raise
开发者ID:HuttonICS,项目名称:biopython,代码行数:12,代码来源:dnal.py

示例4: test_align

 def test_align(self):
     """Call dnal with optional arguments, and do a trivial check on the output."""
     temp_file = Wise.align(["dnal"], ("Wise/human_114_g01_exons.fna_01", "Wise/human_114_g02_exons.fna_01"), kbyte=100000, force_type="DNA", quiet=True)
     line = temp_file.readline().rstrip()
     if line == "Score 114" :
         #Wise 2.4.1 includes a score line, even in quiet mode, ignore this
         line = temp_file.readline().rstrip()
     if line == "ENSG00000172135   AGGGAAAGCCCCTAAGCTC--CTGATCTATGCTGCATCCAGTTTGCAAAGTGGGGTCCC" :
         #This is what we expect from wise 2.2.0 (and earlier)
         pass
     elif line == "ENSG00000172135   AGGGAAAGCCCCTAAGCTC--CTGATCTATGCTGCATCCAGTTTGCAAAG-TGGGGTCC" :
         #This is what we expect from wise 2.4.1
         pass
     else :
         #Bad!
         self.assert_(False, line)
开发者ID:andyoberlin,项目名称:biopython,代码行数:16,代码来源:test_Wise.py

示例5: test_psw

 def test_psw(self):
     """Call psw, and do a trivial check on its output."""
     Wise.align(["psw"], ("seq1.faa", "seq2.faa"), dry_run=True, kbyte=4)
     self.assert_(sys.stdout.getvalue().startswith("psw -kbyte 4 seq1.faa seq2.faa"))
开发者ID:andyoberlin,项目名称:biopython,代码行数:4,代码来源:test_Wise.py

示例6: test_dnal

 def test_dnal(self):
     """Call dnal, and do a trivial check on its output."""
     Wise.align(["dnal"], ("seq1.fna", "seq2.fna"), kbyte=100000, dry_run=True)
     self.assert_(sys.stdout.getvalue().startswith("dnal -kbyte 100000 seq1.fna seq2.fna"))
开发者ID:andyoberlin,项目名称:biopython,代码行数:4,代码来源:test_Wise.py

示例7: test_psw

 def test_psw(self):
     """Call psw, and do a trivial check on its output."""
     Wise.align(["psw"], ("seq1.faa", "seq2.faa"), dry_run=True, kbyte=4)
     # If test output is redirected to a file, the wrapper adds -quiet
     output = sys.stdout.getvalue().replace(" -quiet ", " ")
     self.assertTrue(output.startswith("psw -kbyte 4 seq1.faa seq2.faa"), output[:200])
开发者ID:HuttonICS,项目名称:biopython,代码行数:6,代码来源:test_Wise.py

示例8: test_dnal

 def test_dnal(self):
     """Call dnal, and do a trivial check on its output."""
     Wise.align(["dnal"], ("seq1.fna", "seq2.fna"), kbyte=100000, dry_run=True)
     # If test output is redirected to a file, the wrapper adds -quiet
     output = sys.stdout.getvalue().replace(" -quiet ", " ")
     self.assertTrue(output.startswith("dnal -kbyte 100000 seq1.fna seq2.fna"), output[:200])
开发者ID:HuttonICS,项目名称:biopython,代码行数:6,代码来源:test_Wise.py


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