~ubuntu-branches/ubuntu/natty/python-cogent/natty

« back to all changes in this revision

Viewing changes to cogent/evolve/likelihood_tree.py

  • Committer: Bazaar Package Importer
  • Author(s): Steffen Moeller
  • Date: 2010-12-04 22:30:35 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101204223035-j11kinhcrrdgg2p2
Tags: 1.5-1
* Bumped standard to 3.9.1, no changes required.
* New upstream version.
  - major additions to Cookbook
  - added AlleleFreqs attribute to ensembl Variation objects.
  - added getGeneByStableId method to genome objects.
  - added Introns attribute to Transcript objects and an Intron class.
  - added Mann-Whitney test and a Monte-Carlo version
  - exploratory and confirmatory period estimation techniques (suitable for
    symbolic and continuous data)
  - Information theoretic measures (AIC and BIC) added
  - drawing of trees with collapsed nodes
  - progress display indicator support for terminal and GUI apps
  - added parser for illumina HiSeq2000 and GAiix sequence files as 
    cogent.parse.illumina_sequence.MinimalIlluminaSequenceParser.
  - added parser to FASTQ files, one of the output options for illumina's
    workflow, also added cookbook demo.
  - added functionality for parsing of SFF files without the Roche tools in
    cogent.parse.binary_sff
  - thousand fold performance improvement to nmds
  - >10-fold performance improvements to some Table operations

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 
10
10
numpy.seterr(all='ignore')
11
11
 
12
 
import logging
13
 
 
14
12
numerictypes = numpy.core.numerictypes.sctype2char
15
 
LOG = logging.getLogger('cogent')
16
13
 
17
14
__author__ = "Peter Maxwell"
18
15
__copyright__ = "Copyright 2007-2009, The Cogent Project"
19
16
__credits__ = ["Peter Maxwell", "Rob Knight"]
20
17
__license__ = "GPL"
21
 
__version__ = "1.4.1"
 
18
__version__ = "1.5.0"
22
19
__maintainer__ = "Peter Maxwell"
23
20
__email__ = "pm67nz@gmail.com"
24
21
__status__ = "Production"
25
22
 
26
23
try:
27
24
    pyrex = importVersionedModule('_likelihood_tree', globals(), 
28
 
            (2, 1), LOG, "pure Python/NumPy likelihood tree")
 
25
            (2, 1), "pure Python/NumPy likelihood tree")
29
26
except ExpectedImportError:
30
27
    pyrex = None
31
28
        
56
53
                        u = len(c.uniq)-1 # gap
57
54
                    else:
58
55
                        u = c.index[col]
59
 
                        if not ( 0 <= u < len(c.uniq)-1):
60
 
                            print len(c.uniq)
61
 
                            print c.uniq[-1]
62
 
                            print align_index
63
 
                            raise RuntimeError
 
56
                        assert 0 <= u < len(c.uniq)-1, (
 
57
                                u, len(c.uniq), c.uniq[-1], align_index)
64
58
                    a.append(u)
65
59
                assignments.append(a)
66
60
        (uniq, counts, self.index) = _indexed(zip(*assignments))