02.08.2013 Views

Sample A: Cover Page of Thesis, Project, or Dissertation Proposal

Sample A: Cover Page of Thesis, Project, or Dissertation Proposal

Sample A: Cover Page of Thesis, Project, or Dissertation Proposal

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

fp=open(logfile, 'a')<br />

fp.write('\n')<br />

fp.write('SNP filter:\n')<br />

conn.close()<br />

snp_filter(usr, pswd, db, msk, msk_tab, fp)<br />

def XH_filter(usr, pswd, db, msk, msk_tab, fp):<br />

cur, conn= make_connect(usr, pswd, db)<br />

exp=get_exp(usr, pswd, db)<br />

notes='probes w/o xhybrid'<br />

k=0<br />

#print 'Map length ', len(map), map[k]<br />

pid_tbles=[]<br />

#fp=open(logfile,'a')<br />

f<strong>or</strong> i in msk:<br />

trl= 'CREATE table tmp as select count(*), probeset_id,<br />

xhybrid_list.x, xhybrid_list.y from xhybrid_list inner join '<br />

trl=trl+ msk[k] +'_snp on ( '+ msk[k] +'_snp.x =<br />

xhybrid_list.x and ' +msk[k]+ '_snp.y = xhybrid_list.y) '<br />

trl=trl+ 'group by probeset_id, xhybrid_list.x,<br />

xhybrid_list.y having count(*) = 1 <strong>or</strong>der by probeset_id,<br />

xhybrid_list.x, xhybrid_list.y'<br />

cur.execute(trl)<br />

conn.commit()<br />

trl= 'create table ' +msk[k]+'_XH as select xhybrid_list.*<br />

from xhybrid_list inner join tmp on (tmp.x = xhybrid_list.x and tmp.y =<br />

xhybrid_list.y) <strong>or</strong>der by probeset_id, xhybrid_list.x, xhybrid_list.y'<br />

cur.execute(trl)<br />

conn.commit()<br />

fp.write('\tTable '), fp.write(msk[k]+ '_XH '), fp.write('<br />

created.\n')<br />

pid_tbles.append(msk[k]+ '_XH')<br />

trl='drop table tmp'<br />

cur.execute(trl)<br />

conn.commit()<br />

cur, conn=UpdateW<strong>or</strong>kReg(cur, conn, msk[k]+'_XH', exp,<br />

'xhybrid_filter', usr, msk[k]+'_snp', 'xhybrid_list', notes)<br />

k+=1<br />

onto='select * from '+msk[k-1]+'_XH'<br />

cur.execute(onto)<br />

desc=cur.description<br />

conn.close()<br />

fp=UpdateOntology2(usr, pswd, db, desc, exp, 'xhybrid_filter',<br />

'_XH', notes, '', fp)<br />

fp.close()<br />

134

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!