CFSAN
Introduction
CFSAN performs a reference-based phylogenetic analysis and builds a Single Nucleotide Polymorphism (SNP) matrix. The matrix is then used to generate "Maximum Likelihood" (ML) distance graphs with IQ-TREE or FastTree, and "Minimum Spanning Tree" (MST) and "Hierarchical Clustering" (HC) with ReporTree.
Further information on the software is available in:
- CFSAN official guide: <(https://snp-pipeline.readthedocs.io/en/latest/readme.html)> CFSAN GitHub page: https://github.com/CFSAN-Biostatistics/snp-pipeline
- ReporTree GitHub page: https://github.com/insapathogenomics/ReporTree
- IQ-TREE GitHub page: https://github.com/iqtree/iqtree2
- FastTree GitHub page: https://github.com/morgannprice/fasttree
Run CFSAN analysis
Once the CFSAN analysis has been selected in the dedicated run analysis page, the system will move to a confirmation interface.
In the parameter definition screen, it will be necessary to specify a reference genome; morevover the input selection interface provides the advanced input selection mode, to allow the use of inputs processed by different methods that were applied upstream in the analysis workflow.
In the case of CFSAN, the inputs are always reads in FASTQ:
The parameter definition screen offers a high level of customization, including:
-
Parametri di CFSAN:
Pipeline version: it allows you to choose the software version (2.0.2 "legacy" or 2.2.1);Keep intermediate files: at the end of the run, the analysis normally deletes the largest files that are not needed for downstream analyses. This option allows you to choose not to delete these files at the end of the process;Remove abnormal SNPs across all vcf files: the Snippy-core output files typically also list the reference used for mapping. This option allows you to remove the reference from thecore.vcffile, an action necessary to prevent the reference from being included as a sample in the final tree.
-
ReporTree parameters:
-
Partition threshold for clustering definition: it allows you to customize the threshold values for the creation of tree partitions;Minimum proportion of samples per site without missing data: ReporTree normally considers all genomic sites where variants have been called for the calculation of the distance matrix and the tree. This option allows you to define a threshold value: only sites for which variants are called in a percentage of the dataset equal to or greater than the specified value will be considered. Sites that do not pass the filter are discarded;Minimum proportion of loci/positions called for SNP/allele matrices: ReporTree normally uses all provided samples to compute the distance matrix and the tree. This option allows you to define a threshold for the number of sites where a variant has been called. All samples with a number of sites without variants lower than the specified value will be discarded;Sample of interestoptions: they allow you to specify one or more samples of interest on which ReporTree recalculates a ‘Zoom’, i.e., a tree containing only the sample of interest and the samples belonging to the same cluster;Method used in HC clustering to create a dendrogramoptions: selection of the mode for optional hierarchical clustering;Custom parametersoptions: text fields where command-line style options can be entered, to be passed to ReporTree exclusively for the computation of the specified trees (MST produced with Grapetree or HC).
-
Clustering ML parameters:
Maximum likelood phylogenetic tree calculation: it allows you to choose the software to use for optional clustering with an ML algorithm. The available software are IQ-TREE v2.3.6, IQ-TREE "legacy" v1.6.12 and FastTree.
Given the number and complexity of parameters and results of the CFSAN and ReporTree software, users are encouraged to consult their official guides: - CFSAN official guide - ReporTree official guide.
The procedure for launching the analysis is similar to other analyses that include the execution of ReporTree:
Once the analysis is launched, the page generates a link to the Check analysis section to allow a check of the processus status. The system will send the user a notification both when the analysis is successfully started and when the operation is completed.
In the completed analysis card, several options will be available, including the possibility to browse the output folder, direct access to some log and metadata files, opening the .nwk file, and the direct visualization of the MSTree through the integration of SPREAD into the platform.
To visualize the tree, it will be necessary to navigate to the analysis card and, in the section Result data, select the link: - ML tree (IQ-Tree) with Auspice for the ML tree; - MST with SPREAD for the MSTree.

Note: Results from multi-sample analyses cannot be imported. Users are advised to use the dedicated functionality for non-importable analysis preservation or, alternatively, the option to directly download the newick file (
.nwk) and the metadata file, so that the files can be stored and the tree can be visualized at any time, either within the platform or using external software.
Result folder
To consult the guide on how to download files from the platform, please refer to the dedicated page.
The Result folder can be browsed by clicking the link available within the analysis card, in the Result data section. Inside the subsequent results folder, there are two subfolders:
- meta (metadata), where the log and configuration files of the executed process are saved;
- result, where the files containing the results produced by the analysis are saved.
The table below shows the list of the main files of interest present in the folders, along with some useful information.
| File | Description | Location |
|---|---|---|
metrics.tsv |
summary .tsv table with sample values and statistics and their corresponding SNPs | folder: result |
referenceSNP.fasta |
FASTA file containing the reference sequence bases for each SNP position | folder: result |
snp_distance_matrix.tsv |
.tsv table with a distance matrix, calculated on differences in SNPs, for each pair of samples | folder: result |
snp_distance_pairwise.tsv |
.tsv table containing pairwise distances, based on differences in SNPs, for each pair of samples | folder: result |
iqtree.nwk |
tree file in .nwk (Newick) format computed using a Maximum Likelihood (ML) algorithm | folder: result |
snpma.vcf |
list of SNPs and their corresponding positions, for each sample, in VCFv4.2 format | folder: result |
iqtree.mldist |
distance matrix for the ML tree | folder: result |
auspice_iqtree.json |
JSON file containing metadata and the ML tree | folder: result |
For further information regarding all CFSAN outputs, please refer to the dedicated section of the CFSAN official manual.