comparison libs/special_gene_test_assemblies.py @ 10:53efef402c51 draft

planemo upload commit a4fb57231f274270afbfebd47f67df05babffa4a-dirty
author charles_s_test
date Wed, 29 Nov 2017 08:34:19 -0500
parents 3d6680af0bec
children
comparison
equal deleted inserted replaced
9:acc5cd06a36a 10:53efef402c51
29 hspbit=[] 29 hspbit=[]
30 alignmentlist=[] 30 alignmentlist=[]
31 for record in records: 31 for record in records:
32 for alignment in record.alignments: 32 for alignment in record.alignments:
33 if x in alignment.hit_def: #multi gene database, so... 33 if x in alignment.hit_def: #multi gene database, so...
34 print(x,"got a hit, evaluating the hit quality...") 34 print x,"got a hit, evaluating the hit quality..."
35 score=0 35 score=0
36 for hsp in alignment.hsps: 36 for hsp in alignment.hsps:
37 if hsp.expect<E_thresh: 37 if hsp.expect<E_thresh:
38 score+=hsp.bits 38 score+=hsp.bits
39 alignment=alignment.hit_def+':'+str(score) 39 alignment=alignment.hit_def+':'+str(score)
44 for Htype in scorelist: 44 for Htype in scorelist:
45 if scorelist[Htype]>score: 45 if scorelist[Htype]>score:
46 First_Choice=Htype 46 First_Choice=Htype
47 score=scorelist[Htype] 47 score=scorelist[Htype]
48 if float(score)>=0.1*aver_len: 48 if float(score)>=0.1*aver_len:
49 print("$$$",First_Choice,"got a hit, score:",score) 49 print "$$$",First_Choice,"got a hit, score:",score
50 else: 50 else:
51 print("$$$No ",x,"exists") 51 print "$$$No ",x,"exists"
52 os.system("rm "+database+"_db.*")##########1/28/2015 52 os.system("rm "+database+"_db.*")##########1/28/2015
53 os.system("rm "+xml_file)##########1/28/2015 53 os.system("rm "+xml_file)##########1/28/2015
54 54
55 database=sys.argv[1] 55 database=sys.argv[1]
56 target_file=sys.argv[2] 56 target_file=sys.argv[2]