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

« back to all changes in this revision

Viewing changes to cogent/parse/gcg.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
 
3
 
import logging
4
 
LOG = logging.getLogger('cogent.input')
5
 
 
6
3
__author__ = "Matthew Wakefield"
7
4
__copyright__ = "Copyright 2007-2009, The Cogent Project"
8
5
__credits__ = ["Matthew Wakefield", "Peter Maxwell", "Gavin Huttley"]
9
6
__license__ = "GPL"
10
 
__version__ = "1.4.1"
 
7
__version__ = "1.5.0"
11
8
__maintainer__ = "Matthew Wakefield"
12
9
__email__ = "matthew.wakefield@anu.edu.au"
13
10
__status__ = "Production"
14
11
 
 
12
import warnings
 
13
 
15
14
def MsfParser(f):
16
15
    """Read sequences from a msf format file"""
17
16
    alignmentdict = {}
42
41
            sequences[line[0]] = ''.join(line[1:])
43
42
    #consistency check
44
43
    if len(sequences) != len(seqinfo):
45
 
        LOG.warning("Number of loaded seqs[%s] not same as "\
 
44
        warnings.warn("Number of loaded seqs[%s] not same as "\
46
45
            "expected[%s]." % (len(sequences), len(seqinfo)))
47
46
    for name in sequences:
48
47
        if len(sequences[name]) != seqinfo[name]:
49
 
            LOG.warning("Length of loaded seqs [%s] is [%s] not "\
 
48
            warnings.warn("Length of loaded seqs [%s] is [%s] not "\
50
49
            "[%s] as expected." % (name,len(sequences[name]),seqinfo[name]))
51
50
    
52
51
    #yield sequences