Skip to content

Commit 3827d2e

Browse files
authored
Merge pull request #76 from DessimozLab/dev
fix the docker action and update ReadME
2 parents d4e230f + 430fbcc commit 3827d2e

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed

.github/workflows/docker-image.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: Docker Image CI
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches:
6+
- main
7+
- dev
68
pull_request:
79
branches: [ main ]
810
release:
@@ -58,8 +60,13 @@ jobs:
5860
-
5961
name: Test
6062
run: |
61-
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
62-
if [ ! -f output/tree_sample_1.nwk ] ; then exit 1; fi
63+
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";
64+
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
65+
echo "ls -l $PWD/outside_docker_out"
66+
ls -l $PWD/outside_docker_out
67+
echo "ls -l $PWD/outside_docker_out/output"
68+
ls -l $PWD/outside_docker_out/output
69+
if [ ! -f $PWD/outside_docker_out/output/tree_sample_1.nwk ] ; then exit 1; fi
6370
-
6471
name: Login to DockerHub
6572
if: github.event_name != 'pull_request' && github.event_name != 'push'

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ read2tree is a software tool that allows to obtain alignment matrices for tree i
44

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

7-
## Important note
8-
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.
9-
10-
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.
7+
## New release
8+
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).
119

1210

1311
## Read2Tree Talk:
@@ -140,7 +138,7 @@ read2tree --tree --standalone_path marker_genes/ --reads sample_1.fastq sample_2
140138
#### Run test example using docker
141139
(to be updated )
142140
```
143-
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
141+
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
144142
```
145143

146144
### output files

archive/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@ six>=1.10.0
1111
requests>=2.13.0
1212
dendropy>=4.3.0
1313
tqdm>=4.19.1
14-
pyham
1514
pyyaml
1615
multiprocessing_logging

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies:
1919
- mafft
2020
- iqtree
2121
- ngmlr
22-
- nextgenmap
22+
- minimap2
2323
- samtools
2424
- filelock
2525
- pysam

read2tree/TreeInference.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def _infer_tree(self, concat_alignment):
5252
iqtree_wrapper.options.options['-m'].set_value('LG')
5353
iqtree_wrapper.options.options['-nt'].set_value(self.args.threads)
5454
tree = iqtree_wrapper()
55+
logger.info("Tree is written to " + os.path.join(output_folder, "tree_" + self._species_name + ".nwk"))
5556
with open(os.path.join(output_folder, "tree_" + self._species_name + ".nwk"), "w") as text_file:
5657
text_file.write("{}".format(tree))
5758
self.tree = "{}".format(tree)

0 commit comments

Comments
 (0)