@@ -412,11 +412,12 @@ class Integron(object):
412412
413413 colors = ["#749FCD" if i == "attC" else
414414 "#DD654B" if i == "intI" else
415- "#6BC865" if i [- 2 :] == "_1" else
416- "#D06CC0" if i [- 2 :] == "_2" else
417- "#C3B639" if i [- 2 :] == "_3" else
415+ "#6BC865" if ( i [- 2 :] == "_1" and j == "Promoter" ) else
416+ "#D06CC0" if ( i [- 2 :] == "_2" and j == "Promoter" ) else
417+ "#C3B639" if ( i [- 2 :] == "_3" and j == "Promoter" ) else
418418 "#e8950e" if i != "protein" else
419- "#d3d3d3" for i in full .annotation ]
419+ "#d3d3d3" for (i , j ) in zip (full .annotation ,
420+ full .type_elt )]
420421
421422 colors_alpha = [j + [i ] for j , i in zip ([[ord (c )/ 255. for c in i [1 :].decode ("hex" )] for i in colors ],
422423 alpha )]
@@ -1051,7 +1052,7 @@ def func_annot(replicon_name, out_dir, hmm_files, evalue=10, coverage="todo"):
10511052 """
10521053 print "# Start Functional annotation... : "
10531054 prot_tmp = os .path .join (out_dir , replicon_name + "_subseqprot.tmp" )
1054- hmm_out = os . path . join ( out_dir , replicon_name + "_fa.res" )
1055+
10551056 for integron in integrons :
10561057
10571058 if os .path .isfile (prot_tmp ):
@@ -1075,11 +1076,16 @@ def func_annot(replicon_name, out_dir, hmm_files, evalue=10, coverage="todo"):
10751076 SeqIO .write (prot_to_annotate , prot_tmp , "fasta" )
10761077
10771078 for hmm in hmm_files :
1078-
1079+ hmm_out = os .path .join (out_dir , "_" .join ([replicon_name ,
1080+ hmm .split ("/" )[- 1 ].split ("." )[0 ],
1081+ "fa.res" ]))
1082+ hmm_tableout = os .path .join (out_dir , "_" .join ([replicon_name ,
1083+ hmm .split ("/" )[- 1 ].split ("." )[0 ],
1084+ "fa_table.res" ]))
10791085 hmm_cmd = [HMMSEARCH ,
10801086 "-Z" , str (n_prot ),
10811087 "--cpu" , N_CPU ,
1082- "--tblout" , os . path . join ( out_dir , replicon_name + "_fa_table.res" ) ,
1088+ "--tblout" , hmm_tableout ,
10831089 "-o" , hmm_out ,
10841090 hmm ,
10851091 prot_tmp ]
0 commit comments