diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 925b202..8b935f0 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -2,7 +2,9 @@ name: Docker Image CI on: push: - branches: [ main ] + branches: + - main + - dev pull_request: branches: [ main ] release: @@ -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' diff --git a/README.md b/README.md index 06ecd1e..17607cd 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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 diff --git a/archive/requirements.txt b/archive/requirements.txt index e6daf59..f62b0f2 100644 --- a/archive/requirements.txt +++ b/archive/requirements.txt @@ -11,6 +11,5 @@ six>=1.10.0 requests>=2.13.0 dendropy>=4.3.0 tqdm>=4.19.1 -pyham pyyaml multiprocessing_logging diff --git a/environment.yml b/environment.yml index d4eb262..5355b12 100644 --- a/environment.yml +++ b/environment.yml @@ -19,7 +19,7 @@ dependencies: - mafft - iqtree - ngmlr - - nextgenmap + - minimap2 - samtools - filelock - pysam diff --git a/read2tree/TreeInference.py b/read2tree/TreeInference.py index 07c1f91..e8a91a4 100644 --- a/read2tree/TreeInference.py +++ b/read2tree/TreeInference.py @@ -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)