Skip to content
Merged

Dev #76

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
13 changes: 10 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Docker Image CI

on:
push:
branches: [ main ]
branches:
- main
- dev
pull_request:
branches: [ main ]
release:
Expand Down Expand Up @@ -58,8 +60,13 @@ jobs:
-
name: Test
run: |
docker run --rm -i -v $PWD/tests:/input -v $PWD/tests/:/reads -v $PWD/output:/out -v $PWD/run:/run ${{ env.TEST_TAG }} --tree --standalone_path /input/marker_genes --dna_reference /input/dna_ref.fa --reads /reads/sample_1.fastq --output_path /out/output
if [ ! -f output/tree_sample_1.nwk ] ; then exit 1; fi
echo "docker run --rm -i -v $PWD/tests:/input -v $PWD/tests/:/reads -v $PWD/outside_docker_out:/inside_docker_out -v $PWD/run:/run ${{ env.TEST_TAG }} --tree --standalone_path /input/marker_genes --dna_reference /input/dna_ref.fa --reads /reads/sample_1.fastq --output_path /inside_docker_out/output --debug --threads 1";
docker run --rm -i -v $PWD/tests:/input -v $PWD/tests/:/reads -v $PWD/outside_docker_out:/inside_docker_out -v $PWD/run:/run ${{ env.TEST_TAG }} --tree --standalone_path /input/marker_genes --dna_reference /input/dna_ref.fa --reads /reads/sample_1.fastq --output_path /inside_docker_out/output --debug --threads 1
echo "ls -l $PWD/outside_docker_out"
ls -l $PWD/outside_docker_out
echo "ls -l $PWD/outside_docker_out/output"
ls -l $PWD/outside_docker_out/output
if [ ! -f $PWD/outside_docker_out/output/tree_sample_1.nwk ] ; then exit 1; fi
-
name: Login to DockerHub
if: github.event_name != 'pull_request' && github.event_name != 'push'
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ read2tree is a software tool that allows to obtain alignment matrices for tree i

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/)

## Important note
If you want to re-run a read2tree analysis (after facing an error, or changing the inputs), please make sure that you removed the `mplog.log` file and the output folder. Alternatively you could start from an empty folder. Otherwise, read2tree might use the faulty output of previous unfinished run.

We are working on a new [read2tree version](https://github.com/DessimozLab/read2tree/tree/minimap2) using the [minimap2](https://github.com/lh3/minimap2) aligner, which is much faster. For this version, the `--read_type` argument could be either `short`, `long-hifi` or `long-ont`. You could also use `--threads 40` to be used with minimap2.
## 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).


## Read2Tree Talk:
Expand Down Expand Up @@ -140,7 +138,7 @@ read2tree --tree --standalone_path marker_genes/ --reads sample_1.fastq sample_2
#### Run test example using docker
(to be updated )
```
docker run --rm -i -v $PWD/tests:/input -v $PWD/tests/:/reads -v $PWD/output:/out -v $PWD/run:/run dessimozlab/read2tree:latest --tree --standalone_path /input/marker_genes --dna_reference /input/cds-marker_genes.fasta.gz --reads /reads/sample_1.fastq --output_path /out
docker run --rm -i -v $PWD/tests:/input -v $PWD/tests/:/reads -v $PWD/outside_docker_out:/inside_docker_out -v $PWD/run:/run ${{ env.TEST_TAG }} --tree --standalone_path /input/marker_genes --dna_reference /input/dna_ref.fa --reads /reads/sample_1.fastq --output_path /inside_docker_out/output --debug --threads 1
```

### output files
Expand Down
1 change: 0 additions & 1 deletion archive/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ six>=1.10.0
requests>=2.13.0
dendropy>=4.3.0
tqdm>=4.19.1
pyham
pyyaml
multiprocessing_logging
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies:
- mafft
- iqtree
- ngmlr
- nextgenmap
- minimap2
- samtools
- filelock
- pysam
1 change: 1 addition & 0 deletions read2tree/TreeInference.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def _infer_tree(self, concat_alignment):
iqtree_wrapper.options.options['-m'].set_value('LG')
iqtree_wrapper.options.options['-nt'].set_value(self.args.threads)
tree = iqtree_wrapper()
logger.info("Tree is written to " + os.path.join(output_folder, "tree_" + self._species_name + ".nwk"))
with open(os.path.join(output_folder, "tree_" + self._species_name + ".nwk"), "w") as text_file:
text_file.write("{}".format(tree))
self.tree = "{}".format(tree)
Expand Down