diff --git a/README.md b/README.md index 17607cd..3bc2a02 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # read2tree -read2tree is a software tool that allows to obtain alignment matrices for tree inference. For this purpose it makes use of the OMA database and a set of reads. Its strength lies in the fact that it bipasses the several standard steps when obtaining such a matrix in regular analysis. These steps are read filtereing, assembly, gene prediction, gene annotation, all vs all comparison, orthology prediction, alignment and concatenation. +read2tree is a software tool that allows obtaining alignment matrices for tree inference. For this purpose it makes use of the OMA database and a set of reads. Its strength lies in the fact that it bypasses the several standard steps when obtaining such a matrix in regular analysis. These steps are read filtering, assembly, gene prediction, gene annotation, all vs all comparison, orthology prediction, alignment and concatenation. read2tree works in linux with [![Python 3.10.8](https://img.shields.io/badge/python-3.10.8-blue.svg)](https://www.python.org/downloads/release/python-310/) ## New release -We are now realasing Read2Tree v2.0.0 with improved spead and logging. As the aligner, we are now using minimap2 [minimap2](https://github.com/lh3/minimap2). Also, MAFFT and IQtree are now using multiple threads. We would suggest to run r2t with `--debug` which helps to debug later. Please note that arguments have slightly changed in this release(see below for details). +We are now releasing Read2Tree v2.0.0 with improved speed and logging. As the aligner, we are now using minimap2 [minimap2](https://github.com/lh3/minimap2). Also, MAFFT and IQtree are now using multiple threads. We would suggest running r2t with `--debug` which helps to debug later. Please note that arguments have slightly changed in this release(see below for details). ## Read2Tree Talk: @@ -45,7 +45,7 @@ conda install -c conda-forge biopython numpy Cython ete3 lxml tqdm scipy pyparsi conda install -c bioconda dendropy pysam ``` -Besides, you need softwares including [mafft](http://mafft.cbrc.jp/alignment/software/) (multiple sequence aligner), [iqtree](http://www.iqtree.org/) (phylogenomic inference), [minimap2](https://github.com/lh3/minimap2) (long and short read mappers), and [samtools](http://www.htslib.org/download/) which could be installed using conda. +Besides, you need software packages including [mafft](http://mafft.cbrc.jp/alignment/software/) (multiple sequence aligner), [iqtree](http://www.iqtree.org/) (phylogenomic inference), [minimap2](https://github.com/lh3/minimap2) (long and short read mappers), and [samtools](http://www.htslib.org/download/) which could be installed using conda. For this version, the `--read_type` argument accepts any minimap2 options string that defines how reads are aligned to the reference. For example, it could be `-ax sr`, `-ax map-hifi` or `-ax map-ont`. You can also pass `--threads 40` to be used with minimap2. ``` conda install -c bioconda mafft iqtree minimap2 samtools @@ -163,6 +163,13 @@ Hint: As read2tree exploits the `progress` package, the user can benefit from co To see the details of arguments, please take look at our wiki [page](https://github.com/DessimozLab/read2tree/wiki/Details-of-arguments) ## Possible issues +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 +``` +Shell err: b"[E::main] unknown preset 'sr'\n" +``` + +Updating minimap2 to version 2.30 should fix the issue. + Installing on MAC sometimes drops this error: @@ -180,8 +187,12 @@ export LANG=en_US.UTF-8 ## Change log +- version 2.0.1: + - fixing a few bugs +- version 2.0.0: + - pre-release: improve logging and make minimap2 as default aligner - version 1.5: - - using minimap2 as the read mapper + - using minimap2 as the read mapper in the minimap2 branch - version 0.1.5: - fix issue with UnknownSeq being removed in Biopython>1.80 - removing unused modeltester wrappers diff --git a/read2tree/Aligner.py b/read2tree/Aligner.py index d90901f..5053e5e 100644 --- a/read2tree/Aligner.py +++ b/read2tree/Aligner.py @@ -292,9 +292,11 @@ def _align_worker(self, og_set): mafft_wrapper = Mafft(value.aa, datatype=DataType.PROTEIN) mafft_wrapper.options.options['--localpair'].set_value(True) mafft_wrapper.options.options['--maxiterate'].set_value(1000) - mafft_wrapper.options.options['--thread'].set_value(self.args.threads) + mafft_wrapper.options.options['--thread'].set_value(int(self.args.threads)) logger.info("aligning OG {} with {} proteins".format(key, len(value.aa))) alignment = mafft_wrapper() + #logger.debug("MAFFT command line : {} {}".format(mafft_wrapper.cli.exe ,mafft_wrapper.command())) + codons = self._get_codon_dict_og(value) align = Alignment() align.aa = alignment diff --git a/read2tree/__init__.py b/read2tree/__init__.py index 567dab5..98f592f 100644 --- a/read2tree/__init__.py +++ b/read2tree/__init__.py @@ -6,7 +6,7 @@ from pkg_resources import resource_string logging.getLogger(__name__).addHandler(logging.NullHandler()) -__version__ = '2.0.0' +__version__ = '2.0.1' __copyright__ = 'read2tree (C) 2017-{:d} David Dylus, Adrian M. Altenhoff, Sina Majidian ' \ .format(date.today().year) diff --git a/read2tree/wrappers/abstract_cli.py b/read2tree/wrappers/abstract_cli.py index e7b02f0..3128607 100644 --- a/read2tree/wrappers/abstract_cli.py +++ b/read2tree/wrappers/abstract_cli.py @@ -212,7 +212,7 @@ def __call__(self, cmd=None, wait=False, **flags): if flags: cmd = ' '.join([cmd.strip(), _kwargs_to_args(flags, self._hyphen_policy)]) self.cmd = '{} {}'.format(self.exe, cmd) - logger.debug('Running following command: {}'.format(self.cmd)) + logger.info('Running following command: {}'.format(self.cmd)) # spawn self.process = Popen(shlex.split(self.cmd), diff --git a/read2tree/wrappers/options.py b/read2tree/wrappers/options.py index 672d4a4..2e5109c 100644 --- a/read2tree/wrappers/options.py +++ b/read2tree/wrappers/options.py @@ -99,7 +99,7 @@ def _type(self): return Real def get_value(self): - return float(self._value) + return self._value class StringOption(TypedValueOption):