Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:

Expand All @@ -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
Expand Down
4 changes: 3 additions & 1 deletion read2tree/Aligner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion read2tree/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion read2tree/wrappers/abstract_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion read2tree/wrappers/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def _type(self):
return Real

def get_value(self):
return float(self._value)
return self._value


class StringOption(TypedValueOption):
Expand Down