Beispiel #1
0
def testmusChid():
    """(Somewhat internal test) Check chromosome coord system id."""

    import sys
    sys.stdout.write("Mus Chromosome Coord System")

    mus = ensembl.database('mus_musculus_core_56_37i')
    coordsys = mus.chromosome_coord_system_id()
    sys.stdout.write(" %d\n" % coordsys)
    assert 1 == coordsys
Beispiel #2
0
def testBRCA2trans():
    """BRCA2 Transcripts."""

    print "BRCA2 Transcripts"""

    h**o = ensembl.database('homo_sapiens_core_62_37g')
    # Sadly, the code now doesn't work with older releases
    h**o = ensembl.Binomial('h**o sapiens')
    ts = h**o.fetch_gene_name('BRCA2').Transcripts()
    assert 6 == len(ts)
    return ts
Beispiel #3
0
def testHseq():
    """Check (old) pymysql bug is not present.
    
    (was originally detected by chromosome 20).
    """

    dbid = 18559
    print "H**o assembly 37a seq_region_id %d" % dbid
    # Note: We require a particular release and assembly.
    h**o = ensembl.database('homo_sapiens_core_56_37a')
    cursor=h**o.conn.cursor()
    cursor.execute('''select sequence from dna where
      seq_region_id = %s;''', dbid)
    result, = list(cursor)
    result, = result
    assert 37972 == len(result)