File: cmfinder.py

package info (click to toggle)
python-cogent 1.4.1-1.2
  • links: PTS, VCS
  • area: non-free
  • in suites: squeeze
  • size: 13,260 kB
  • ctags: 20,087
  • sloc: python: 116,163; ansic: 732; makefile: 74; sh: 9
file content (25 lines) | stat: -rw-r--r-- 724 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env python

from cogent.util.transform import make_trans
from cogent.struct.rna2d   import wuss_to_vienna, Pairs
from cogent.parse.rfam     import RfamParser

__author__ = "Shandy Wikman"
__copyright__ = "Copyright 2007-2009, The Cogent Project"
__contributors__ = ["Shandy Wikman"]
__license__ = "GPL"
__version__ = "1.4.1"
__maintainer__ = "Shandy Wikman"
__email__ = "ens01svn@cs.umu.se"
__status__ = "Development"

def CMfinderParser(lines):
    """Parser for CMfinder output format

    Parser tested through RfamParser test
    """
    for info, alignment, struct in RfamParser(lines,strict=False):
        struct = wuss_to_vienna(struct)
        pairs = struct.toPairs()
    return [alignment, pairs]