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

« back to all changes in this revision

Viewing changes to tests/test_db/test_ensembl/test_database.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:
8
8
__copyright__ = "Copyright 2007-2009, The Cogent Project"
9
9
__credits__ = ["Gavin Huttley", "hua Ying"]
10
10
__license__ = "GPL"
11
 
__version__ = "1.4.1"
 
11
__version__ = "1.5.0"
12
12
__maintainer__ = "Gavin Huttley"
13
13
__email__ = "Gavin.Huttley@anu.edu.au"
14
14
__status__ = "alpha"
15
15
 
16
 
Release = 56
 
16
Release = 58
17
17
 
18
18
if 'ENSEMBL_ACCOUNT' in os.environ:
19
19
    username, password = os.environ['ENSEMBL_ACCOUNT'].split()
49
49
        
50
50
        db = Database(account=account, release=Release, db_type='compara')
51
51
        got = set(db.getDistinct('homology', 'description'))
52
 
        expected = set(['apparent_ortholog_one2one', 'between_species_paralog',
53
 
        'ortholog_many2many', 'ortholog_one2many', 'ortholog_one2one',
54
 
        'within_species_paralog'])
 
52
        expected = set(['apparent_ortholog_one2one', 'ortholog_many2many',
 
53
          'ortholog_one2many', 'ortholog_one2one', 'within_species_paralog'])
55
54
        self.assertEquals(len(got&expected), len(expected))
56
 
        
 
55
    
57
56
    def test_get_table_row_counts(self):
58
57
        """should return correct row counts for some tables"""
59
 
        expect = {'homo_sapiens_core_56_37a.analysis': 57L,
60
 
                  'homo_sapiens_core_56_37a.seq_region': 55604L,
61
 
                  'homo_sapiens_core_56_37a.assembly': 102068L,
62
 
                  'homo_sapiens_core_56_37a.qtl': 0L}
 
58
        expect = {'homo_sapiens_core_58_37c.analysis': 61L,
 
59
                  'homo_sapiens_core_58_37c.seq_region': 55616L,
 
60
                  'homo_sapiens_core_58_37c.assembly': 102090L,
 
61
                  'homo_sapiens_core_58_37c.qtl': 0L}
63
62
        human = Database(account=account, release=Release,
64
63
                    species='human', db_type='core')
65
64
        table_names = [n.split('.')[1] for n in expect]