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

« back to all changes in this revision

Viewing changes to tests/benchmark.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:
11
11
__copyright__ = "Copyright 2007-2009, The Cogent Project"
12
12
__credits__ = ["Peter Maxwell", "Gavin Huttley"]
13
13
__license__ = "GPL"
14
 
__version__ = "1.4.1"
 
14
__version__ = "1.5.0"
15
15
__maintainer__ = "Gavin Huttley"
16
16
__email__ = "gavin.huttley@anu.edu.au"
17
17
__status__ = "Production"
40
40
 
41
41
def measure_evals_per_sec(pc, aln):
42
42
    pc.setAlignment(aln)
43
 
    lf = pc.real_par_controller.makeCalculator()
44
 
    return lf.measureEvalsPerSecond(time_limit=2.0, wall=False)
45
 
 
46
 
def profile(pc, aln):
47
 
    pc.makeCalculator(aln)
48
 
    p = hotshot.Profile('cogent.profile')
49
 
    lf.measureEvalsPerSecond(time_limit=1.0, wall=False)
 
43
    return pc.measureEvalsPerSecond(time_limit=2.0, wall=False)
50
44
 
51
45
def makePC(modelClass, parameterisation, length, taxa, tree, opt_mprobs, **kw):
52
46
    modelClass = eval(modelClass)
57
51
        predicates = {}
58
52
        par_rules = []
59
53
    subMod = modelClass(equal_motif_probs=True, optimise_motif_probs=opt_mprobs,
60
 
            predicates=predicates, recode_gaps=True)
 
54
            predicates=predicates, recode_gaps=True, mprob_model="conditional")
61
55
    (pc, aln) = brca_test(subMod, taxa, tree, length, par_rules, **kw)
62
56
    return (pc, aln)
63
57
 
152
146
 
153
147
parallel.inefficiency_forgiven = True
154
148
 
155
 
if parallel.getCommunicator().rank > 0:
 
149
if parallel.getCommunicator().Get_rank() > 0:
156
150
    #benchmarks(test)
157
151
    quiet(benchmarks, test)
158
152
else: