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

« back to all changes in this revision

Viewing changes to tests/test_parse/test_structure.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
#!/usr/bin/env python
 
2
"""Unit tests for the pdb parser.
 
3
"""
 
4
from cogent.util.unit_test import TestCase, main
 
5
from cogent.core.entity import Structure
 
6
from cogent.parse.structure import FromFilenameStructureParser, FromFileStructureParser
 
7
 
 
8
__author__ = "Marcin Knight"
 
9
__copyright__ = "Copyright 2007-2009, The Cogent Project"
 
10
__credits__ = ["Marcin Cieslik"]
 
11
__license__ = "GPL"
 
12
__version__ = "1.5.0"
 
13
__maintainer__ = "Marcin Cieslik"
 
14
__email__ = "mpc4p@virginia.edu"
 
15
__status__ = "Production"
 
16
 
 
17
 
 
18
class structuresTests(TestCase):
 
19
    """Tests of cogent.parse.structure UI functions."""
 
20
    
 
21
    def test_FromFilenameStructureParser(self):
 
22
        structure = FromFilenameStructureParser('data/1LJO.pdb', 'pdb')
 
23
        self.assertRaises(TypeError, FromFilenameStructureParser, open('data/1LJO.pdb'), 'pdb')
 
24
        assert isinstance(structure, Structure)
 
25
    
 
26
    def test_FromFileStructureParser(self):
 
27
        structure = FromFileStructureParser(open('data/1LJO.pdb'), 'pdb')
 
28
        assert isinstance(structure, Structure)
 
29
        self.assertRaises(TypeError, FromFileStructureParser, 'data/1LJO.pdb', 'pdb')
 
30
        assert isinstance(structure, Structure)         
 
31
    
 
32
    
 
33
if __name__ == '__main__':
 
34
    main()