File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -72,12 +72,15 @@ def do_align(aligner, fa_file):
72
72
# check muscle version
73
73
if aligner == 'muscle' :
74
74
if get_muscle_version (aligner ) == 'v3' :
75
- if fasta_fn .check_long_seq (fa_file ) == 1 :
75
+ if fasta_fn .check_long_seq (fa_file , 12000 ) == 1 :
76
76
aligner = 'mafft-linsi'
77
77
else :
78
78
aligner = 'muscle_v3'
79
79
else :
80
- aligner = 'muscle_v5'
80
+ if fasta_fn .check_long_seq (fa_file , 15000 ) == 1 :
81
+ aligner = 'mafft-linsi'
82
+ else :
83
+ aligner = 'muscle_v5'
81
84
# create alignment command and run
82
85
align_cline = ''
83
86
if aligner == 'muscle_v3' :
Original file line number Diff line number Diff line change @@ -55,11 +55,12 @@ def append_to_fasta_file(fa_file, new_fa_dict):
55
55
fa_out .write ('>%s\n %s\n ' % (id , seq ))
56
56
57
57
58
- def check_long_seq (fa_file ):
59
- """ Check if any sequence longer than 12.000 aa/nt"""
58
+ def check_long_seq (fa_file , max_len ):
59
+ """ Check if any sequence longer than max_len
60
+ (12.000 aa/nt for muscle v3; 20.000 for muscle v5)"""
60
61
fa_seq = SeqIO .parse (open (fa_file ),'fasta' )
61
62
for fa in fa_seq :
62
- if len (fa .seq ) > 12000 :
63
+ if len (fa .seq ) > max_len :
63
64
return (1 )
64
65
return (0 )
65
66
Original file line number Diff line number Diff line change 26
26
27
27
setup (
28
28
name = "fdog" ,
29
- version = "0.1.15 " ,
29
+ version = "0.1.16 " ,
30
30
python_requires = '>=3.7.0' ,
31
31
description = "Feature-aware Directed OrtholoG search tool" ,
32
32
long_description = long_description ,
You can’t perform that action at this time.
0 commit comments