Example #1
0
f_map = open("map_route.dict", 'r')
map_route = pickle.load(f_map)
f_map.close()

#*********************************
#load in cathdb and extract info
#*********************************

ss_indices = map_route['map_route'][0]
s1_profile = ss_profiles[ss_indices[0]][int(sys.argv[1])]
s2_profile = ss_profiles[ss_indices[1]][int(sys.argv[2])]


smotif = ud.getSmotif(s1_profile, s2_profile)
rdc_file, ss_seq, cathdb = ud.initData()
cath_entries  = ud.extractCath(smotif, cathdb)
print sys.argv[1], sys.argv[2], s1_profile, s2_profile
print smotif
print len(cath_entries)

#*********************************
# Search for needles in the haystack
#*********************************

B0     = 18.8
TinK   = 298.0
Sorder = 1.0
scal = rf.rdcScal(Sorder, B0, TinK)

homologs=[] # specify homologs to exclude from calculation
sort_nchi={}

# top_entry has previously fit tensor information and coordinates
# the domin in this context is previous domain and the current domain is referred to as
# "entry" in the pymol fit
top_entry = top_dict [top_list[int(sys.argv[3])]]


profile=get_profile(ss_profile,csmotif_index)
print profile
csmotif_subentry=profile[int(sys.argv[4])]

dir_name,domain,s1_struct,s2_struct,smotif,direction = generate_smotif(top_entry,csmotif_index,csmotif_subentry,sys.argv[3],sys.argv[4])

print dir_name,domain,s1_struct,s2_struct,smotif,direction
save_dir=get_simple_save_dir(csmotif_index,sys.argv[3],sys.argv[4],direction)
print save_dir

cath_list = ud.extractCath(smotif,cathdb)
print s1_struct,s2_struct,smotif,domain,len(cath_list)

ntags, tsets, npc_files=gettaginfo(broker_file)
fit_data=[ss_seq,ntags,tsets,npc_files,s1_struct,s2_struct,top_entry]
hit_list_dict =pymol_filter(dir_name,domain,cath_list,rmsd_cutoff,direction,save_dir,fit_data)

if hit_list_dict:
    fout=open("pre_"+save_dir[2:]+".dict",'w')
    pickle.dump(hit_list_dict,fout,protocol=0)
    fout.close()
sys.exit()