Beispiel #1
0
"""
Created on 27/05/2014

@author: s4361277
"""
from sequence import *
import genome as ge
from go import *

g = ge.readGEOFile("GDS3198.soft", id_column=1)
meanfold = {}
for gene in g.genes:
    profile = g.getGenes(gene)
    meanfold[gene] = (
        math.log(profile[0] / profile[3]) + math.log(profile[1] / profile[4]) + math.log(profile[2] / profile[5])
    ) / 3

result = sorted(meanfold.items(), key=lambda v: v[1])
genes = []

for r in result[0:100]:
    if not (" " in r[0]) and len(search(r[0], dbName="uniprot", format="list", limit=1)) == 1:
        genes.append(r[0])

for r in result[-1:-100:-1]:
    if not (" " in r[0]) and len(search(r[0], dbName="uniprot", format="list", limit=1)) == 1:
        genes.append(r[0])

godb = GODB("yeast_go")
r = godb.get_GO_term_overrepresentation(genes, evalThreshold=1.0)
print "GO terms:"
Beispiel #2
0
'''
Created on 27/05/2014

@author: s4361277
'''
from sequence import *
import genome as ge
import matplotlib.pyplot as plt
import numpy as np

g = ge.readGEOFile('GDS3198.soft', id_column = 1)
meanfold = {}
for gene in g.genes:
    profile = g.getGenes(gene)
    meanfold[gene] = (math.log(profile[0] / profile[3]) +
                      math.log(profile[1] / profile[4]) + 
                      math.log(profile[2] / profile[5])) / 3

result = sorted(meanfold.items(), key=lambda v: v[1])
print '========== Wildtype may down-regulate =========='
c = 0
for r in result[0:100]:
    if not(' ' in r[0]) and len(search(r[0], dbName='uniprot', format='list', limit=1)) == 1:
        print r[0]
        c +=1

print "total down regulated genes=", c
c = 0
print '========== Wildtype may up-regulate =========='
for r in result[-1:-100:-1]:
    if not(' ' in r[0]) and len(search(r[0], dbName='uniprot', format='list', limit=1)) == 1:
Beispiel #3
0
'''
Created on 27/05/2014

@author: s4361277
'''
import genome

g1 = genome.readGEOFile('GDS3198.soft', id_column = 0)
g2 = genome.readGEOFile('GDS3198.soft', id_column = 1)

print "GDS3198.soft contains", len(g1.getGenes()), "probes"
print "GDS3198.soft contains", len(g2.getGenes()), "genes"