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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ WORKDIR /app

RUN conda install -c etetoolkit -c anaconda -c bioconda -c conda-forge -c defaults biopython=1.77 cgmlst-dists=0.4.0 ete3 grapetree=2.1 numba=0.55.1 numpy=1.19.2 numpy-base=1.19.2 pandas=1.1.3 python=3.8 scikit-learn snp-sites=2.5.1 treecluster=1.0.3 zip pytest git --yes

RUN git clone -b v2.6.0 https://github.com/insapathogenomics/ReporTree && chmod 755 ReporTree/reportree.py && chmod 755 ReporTree/scripts/partitioning_grapetree.py && chmod 755 ReporTree/scripts/partitioning_HC.py && chmod 755 ReporTree/scripts/partitioning_treecluster.py && chmod 755 ReporTree/scripts/alignment_processing.py && chmod 755 ReporTree/scripts/metadata_report.py && cd ReporTree/scripts/ && git clone https://github.com/insapathogenomics/ComparingPartitions.git && git clone https://github.com/insapathogenomics/GrapeTree.git && git clone https://github.com/insapathogenomics/vcf2mst.git && cd ComparingPartitions && chmod 755 comparing_partitions_v2.py
RUN git clone -b v2.6.1 https://github.com/insapathogenomics/ReporTree && chmod 755 ReporTree/reportree.py && chmod 755 ReporTree/scripts/partitioning_grapetree.py && chmod 755 ReporTree/scripts/partitioning_HC.py && chmod 755 ReporTree/scripts/partitioning_treecluster.py && chmod 755 ReporTree/scripts/alignment_processing.py && chmod 755 ReporTree/scripts/metadata_report.py && cd ReporTree/scripts/ && git clone https://github.com/insapathogenomics/ComparingPartitions.git && git clone https://github.com/insapathogenomics/GrapeTree.git && git clone https://github.com/insapathogenomics/vcf2mst.git && cd ComparingPartitions && chmod 755 comparing_partitions_v2.py

ENV PATH="/app/ReporTree:/app/ReporTree/scripts:/app/ReporTree/scripts/ComparingPartitions:${PATH}"
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ In summary, ReporTree facilitates and accelerates the production of surveillance
_Note: this tool relies on the usage of programs/modules of other developers. DO NOT FORGET TO ALSO [CITE](https://github.com/insapathogenomics/ReporTree/edit/main/README.md#citation) THEM!_

## News!
#### 2025.11.27 - ReporTree v2.6.1
Fixes a bug when updating cluster names in metadata table.

#### 2025.10.22 - ReporTree v2.6.0
We release a new version of ReporTree that besides fixing some small issues, also brings important new features:
1. ReporTree is much more efficient in filtering allele matrices based on "--loci-called, "--site-inclusion" or "--loci" arguments.
Expand Down Expand Up @@ -209,14 +212,14 @@ python reportree.py -h
docker pull insapathogenomics/reportree:latest
```

- Or install a specific version by specifying the release you want (e.g. for v2.5.4):
- Or install a specific version by specifying the release you want (e.g. for v2.6.1):
```bash
docker pull insapathogenomics/reportree:v2.6.0
docker pull insapathogenomics/reportree:v2.6.1
```

Run ReporTree:
```bash
docker run insapathogenomics/reportree:v2.6.0 reportree.py -h
docker run insapathogenomics/reportree:v2.6.1 reportree.py -h
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions reportree.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import numpy
from collections import defaultdict

version = "2.6.0"
last_updated = "2025-10-22"
version = "2.6.1"
last_updated = "2025-11-27"

reportree_script = os.path.realpath(__file__)
reportree_path = reportree_script.rsplit("/", 1)[0]
Expand Down
11 changes: 6 additions & 5 deletions scripts/metadata_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
from pandas.api.types import is_datetime64_any_dtype as is_datetime
import datetime

version = "1.4.0"
last_updated = "2025-10-22"
version = "1.5.0"
last_updated = "2025-11-27"

# functions ----------

Expand Down Expand Up @@ -128,9 +128,10 @@ def partitions2metadata(partitions_name, partitions, mx_metadata, partitions2rep
else:
required_partitions = partitions2report.split(",")
for column_name in required_partitions:
if column_name in b.columns and column_name not in shared_columns:
valid_rows = b.index.intersection(c.index)
c = pandas.concat([c, b.loc[valid_rows, [column_name]].reindex(c.index)], axis=1)
if column_name in b.columns:
if column_name not in shared_columns:
valid_rows = b.index.intersection(c.index)
c = pandas.concat([c, b.loc[valid_rows, [column_name]].reindex(c.index)], axis=1)
else:
print("\t\t" + column_name + " will not be reported because it was not found in the partitions table!!")
print("\t\t" + column_name + " will not be reported because it was not found in the partitions table!!", file=log)
Expand Down
Loading
Loading