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

« back to all changes in this revision

Viewing changes to cogent/parse/phylip.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:
1
1
#!/usr/bin/env python
2
2
from cogent.parse.record import RecordError
3
3
from cogent.core.alignment import Alignment
4
 
import logging
5
 
LOG = logging.getLogger('cogent.input')
6
4
 
7
5
__author__ = "Micah Hamady"
8
6
__copyright__ = "Copyright 2007-2009, The Cogent Project"
9
7
__credits__ = ["Micah Hamady", "Peter Maxwell", "Gavin Huttley",
10
8
                    "Rob Knight"]
11
9
__license__ = "GPL"
12
 
__version__ = "1.4.1"
 
10
__version__ = "1.5.0"
13
11
__maintainer__ = "Micah Hamady"
14
12
__email__ = "hamady@colorado.edu"
15
13
__status__ = "Prototype"
106
104
            join_seq = ''.join(seq_parts)
107
105
 
108
106
            if len(join_seq) != seq_len:
109
 
                LOG.warning("Length of seq '%s' is %s not %s" % \
110
 
                    (interleaved_id_map[curr_id_ix], len(join_seq), seq_len))
111
 
                raise RecordError, "Sequence length is not the same as header"\
112
 
                "specification. Found %d, Expected %d" % (len(join_seq), seq_len)
 
107
                raise RecordError(
 
108
                    "Length of sequence '%s' is not the same as in header "
 
109
                    "Found %d, Expected %d" % (
 
110
                    interleaved_id_map[curr_id_ix], len(join_seq), seq_len))
113
111
 
114
112
            yield interleaved_id_map[curr_id_ix], join_seq
115
113
    #return last seq if not interleaved