Skip to content

Commit 3c8364b

Browse files
authored
Merge pull request #78 from DessimozLab/dev
fix bugs in multithreading mafft and enhance readme
2 parents 9cb6f47 + f0002ae commit 3c8364b

File tree

5 files changed

+18
-5
lines changed

5 files changed

+18
-5
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,13 @@ Hint: As read2tree exploits the `progress` package, the user can benefit from co
163163
To see the details of arguments, please take look at our wiki [page](https://github.com/DessimozLab/read2tree/wiki/Details-of-arguments)
164164

165165
## Possible issues
166+
It seems that minimap2 doesn't have the preset option `-x sr` for short reads in older versions like 2.1. Then, you might get
167+
```
168+
Shell err: b"[E::main] unknown preset 'sr'\n"
169+
```
170+
171+
Updating minimap2 to version 2.30 should fix the issue.
172+
166173

167174
Installing on MAC sometimes drops this error:
168175

@@ -180,8 +187,12 @@ export LANG=en_US.UTF-8
180187

181188
## Change log
182189

190+
- version 2.0.1:
191+
- fixing a few bugs
192+
- version 2.0.0:
193+
- pre-release: improve logging and make minimap2 as default aligner
183194
- version 1.5:
184-
- using minimap2 as the read mapper
195+
- using minimap2 as the read mapper in the minimap2 branch
185196
- version 0.1.5:
186197
- fix issue with UnknownSeq being removed in Biopython>1.80
187198
- removing unused modeltester wrappers

read2tree/Aligner.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,11 @@ def _align_worker(self, og_set):
292292
mafft_wrapper = Mafft(value.aa, datatype=DataType.PROTEIN)
293293
mafft_wrapper.options.options['--localpair'].set_value(True)
294294
mafft_wrapper.options.options['--maxiterate'].set_value(1000)
295-
mafft_wrapper.options.options['--thread'].set_value(self.args.threads)
295+
mafft_wrapper.options.options['--thread'].set_value(int(self.args.threads))
296296
logger.info("aligning OG {} with {} proteins".format(key, len(value.aa)))
297297
alignment = mafft_wrapper()
298+
#logger.debug("MAFFT command line : {} {}".format(mafft_wrapper.cli.exe ,mafft_wrapper.command()))
299+
298300
codons = self._get_codon_dict_og(value)
299301
align = Alignment()
300302
align.aa = alignment

read2tree/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from pkg_resources import resource_string
77
logging.getLogger(__name__).addHandler(logging.NullHandler())
88

9-
__version__ = '2.0.0'
9+
__version__ = '2.0.1'
1010
__copyright__ = 'read2tree (C) 2017-{:d} David Dylus, Adrian M. Altenhoff, Sina Majidian ' \
1111
.format(date.today().year)
1212

read2tree/wrappers/abstract_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def __call__(self, cmd=None, wait=False, **flags):
212212
if flags:
213213
cmd = ' '.join([cmd.strip(), _kwargs_to_args(flags, self._hyphen_policy)])
214214
self.cmd = '{} {}'.format(self.exe, cmd)
215-
logger.debug('Running following command: {}'.format(self.cmd))
215+
logger.info('Running following command: {}'.format(self.cmd))
216216

217217
# spawn
218218
self.process = Popen(shlex.split(self.cmd),

read2tree/wrappers/options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def _type(self):
9999
return Real
100100

101101
def get_value(self):
102-
return float(self._value)
102+
return self._value
103103

104104

105105
class StringOption(TypedValueOption):

0 commit comments

Comments
 (0)