From 3da501349b49350995bae1c8a658ca15c3db74dd Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Fri, 14 Aug 2026 07:43:07 +0200 Subject: [PATCH] docs: clarify phylogenetic output files and tool usage Restructure the output files section into categorized subsections with tables. Add explicit mappings between command-line options and generated files. Define CSV matrix conventions, clarify mathematical formulas for distance calculations, and document execution commands for external phylogenetic tools. --- UserDocMD/usage/phylo.md | 84 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 83 insertions(+), 1 deletion(-) diff --git a/UserDocMD/usage/phylo.md b/UserDocMD/usage/phylo.md index 378a33d1..2d6b5e88 100644 --- a/UserDocMD/usage/phylo.md +++ b/UserDocMD/usage/phylo.md @@ -107,4 +107,86 @@ TNT and PhyG both write trees with bare numeric leaf labels (`1`, `2`, …, in t ## Output files -With `-o/--output PREFIX`, the relevant subset of the following files is written: `_dist.csv`, `_shared.csv`, `_nj.nwk`, `_upgma.nwk`, `_siblings.csv`, `_rawsnp.csv`, `_rawsnp_counts.csv`, `_snp.fasta`, `_family_overlap.csv`, `_sankoff_matrix.csv`, `_sankoff_params.yaml`, `_sankoff.fasta`, `_sankoff.tnt`, `_sankoff.tcm`, `_sankoff.pg`, `_iqtree.model`, `_iqtree.fasta`. Without `-o`, only the plain `--metric` distance matrix is produced, on stdout. +With `-o/--output PREFIX`, the relevant subset of the files below is written. Without `-o`, only the plain `--metric` distance matrix is produced, on stdout. All matrices use genome labels (from the index metadata) as row/column headers, in index order; all CSVs are comma-separated with a header row. + +### Distance matrix + +| File | Written by | Format | Content | +|---|---|---|---| +| `_dist.csv` | always | CSV matrix | the `--metric` distance, 6 decimals, symmetric, diagonal 0 | +| `_shared.csv` | `--shared-kmers` | CSV matrix | shared-kmer count per genome pair (integers) | +| `_nj.nwk` | `--nj` | Newick | Neighbor-Joining tree, branch lengths from the `--metric` matrix | +| `_upgma.nwk` | `--upgma` | Newick | UPGMA tree, same matrix | + +Matrix layout (`_dist.csv`, `_shared.csv`, and every other "CSV matrix" below): header `genome,,,...`, one data row per genome, `