if __name__ == '__main__': p = PlantCARE('plantcare.db') pl = Place('place.db') meme_slv = shelve.open("meme_motifs.slv") # meme_zslv = zshelve.open("meme_motifs.zslv") meme_motifs = jaspar2meme( '/home/gahoo/Project/jaspar/all_data/FlatFileDir/') # meme_motifs = split_meme(meme_motifs) #meme_slv['jaspar'] = split_meme(meme_motifs) meme_slv.update(split_meme(meme_motifs)) # meme_zslv['jaspar'] = split_meme(meme_motifs) # print join_meme(meme_motifs, meme_motifs.keys()[5:9]) meme_motifs = iupac2meme(p.getMotifSeq()) # meme_motifs = split_meme(meme_motifs) #print join_meme(meme_motifs, meme_motifs.keys()) #meme_slv['plantcare'] = split_meme(meme_motifs) meme_slv.update(split_meme(meme_motifs)) # meme_zslv['plantcare'] = split_meme(meme_motifs) #print meme_zslv['plantcare']['header'] #meme_slv.close() meme_motifs = iupac2meme(pl.getMotifSeq()) #meme_slv['place'] = split_meme(meme_motifs) meme_slv.update(split_meme(meme_motifs)) j = JasparDB('Jaspar.db') print meme_slv.keys() # print join_meme(meme_slv['jaspar'], j.getBASE_ID({"COLLECTION": ["CORE"], "tax_group": ["vertebrates", "insect"], "family": ["GATA"]})) print join_meme(meme_slv, j.getBASE_ID({"COLLECTION": ["CORE"], "tax_group": ["vertebrates", "insect"], "family": ["GATA"]})) # print join_meme(meme_slv['plantcare'], p.getMotifSeq({'Organism': [u'Antirrhinum majus', u'Flaveria trinervia', u'Nicotiana plumbaginifolia']})) # print join_meme(meme_slv['place'], pl.getMotifSeq({'Keyword': ['phyA', 'chloroplast']})) # # meme_zslv.close()