Snippy-core
Introduction
Snippy-core performs the extraction of the core SNPs from the VCF files produced by Snippy (Rapid haploid variant calling and core genome alignment) and subsequent construction of the MST tree with ReporTree.
If Snippy results are not provided as input, the Snippy-core analysis first performs mapping using the Snippy tool. The resulting mapping FASTA files are then used as input for Snippy-core, which produces the core.vcf file containing the core dataset variants (SNPs and indels).
The VCF file is then processed with ReporTree to obtain the distance matrix and the MST tree.
- Snippy & Snippy-core GitHub page: https://github.com/tseemann/snippy
- 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 Snippy-core analysis
Once the Snippy-core analysis has been selected in the dedicated run analysis page, the system will move to a confirmation interface.
The parameter definition interface requires selecting a reference, which is necessary both for Snippy-core and for optional mapping with Snippy. A reference in genBank (gb) format will always be used.
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.
The possible inputs that can be used for Snippy-core are:
- step_1PP_trimming
- step_1PP_generated
- step_1PP_hostdepl
- step_1PP_downsampling
- step_1PP_filtering
- step_2AS_mapping
- step_2AS_denovo
- step_2AS_hybrid
- step_2MG_denovo
The parameter definition screen offers a high level of customization, including:
-
Snippy/Snippy-core parameters:
Alignment type: it allows the selection between the two SNP alignment and extraction modes of Snippy e Snippy-core ("Core" e "Full");Keep intermediate files: once the execution is complete, the analysis normally removes the largest files which are unnecessary for downstream analyses. This option allows you to choose not to delete those files at the end of the process;Remove reference in downstream analyses: the output files of Snippy-core normally also include the reference used for mapping. This option allows the removal of the reference from thecore.vcffile, a necessary step to prevent the reference from appearing as a sample in the final tree;Filter out recombinations with Gubbins: it allows the execution of the additional software “Gubbins” to remove variants identified as recombinations from thecore.vcffile.
-
ReporTree parameters:
-
Partition threshold for clustering definition: it allows to customize the threshold values for the creation of the tree partitions;Minimum proportion of samples per site without missing data: ReporTree normally considers all sites of the aligned genomes for distance matrix and tree computation. This option allows the user to define a threshold value: sites with a percentage of "missing data", i.e. a percentage of Ns (%N) below the specified threshold, are discarded. Only sites that pass the filter are retained and used for tree calculation;Minimum proportion (0 to 1) of ATCG in informative sites of the alignment per sample: ReporTree normally uses all provided samples for distance matrix and tree computation. This option allows the user to define a threshold value for the percentage of Ns in the sample sequence. Samples with %N below the specified value are discarded;Sample of interestoptions: they allow one or more samples of interest to be specified; on these samples, ReporTree recalculates a “Zoom”, i.e. a tree containing only the sample(s) of interest and the samples belonging to the same cluster;Method used in HC clustering to create a dendrogramoptions: selection of the optional Hierarchical Clustering mode;Custom parameters for reportreeoptions: text fields for entering Command-line style options to be passed to ReporTree, exclusively for the computation of the trees specified in the option (MST produced with Grapetree or HC).
-
Clustering ML parametres:
Maximum likelood phylogenetic tree calculation: it allows the user to choose the software to be used for optional clustering with the ML algorithm. The available software are IQ-TREE and FastTree;Custom parameters for ML phylogenetic tree calculation: text field for entering Command-line style options for ML clustering;[IQ-TREE only] Try to apply CMAPLE tree search algorithm: if IQ-TREE is selected, it allows the user to choose whether to apply the CMAPLE tree placement algorithm, integrated into IQ-TREE.
Given the number and complexity of the parameters and outputs of Snippy-core and ReporTree, users are encouraged to consult the official documentation: - Snippy & Snippy-core 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, in addition to the ability to browse the output folder, several options will be available, such as direct access to some log and metadata files, opening the .nwk file, and the direct visualization of the MSTree through the integration of SPREAD within the platform.
To view the tree, you will need to navigate to the ReporTree result card and select the link Minimum Spanning Tree with SPREAD.
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 |
|---|---|---|
gt.nwk |
.nwk file of MST tree | folder: result |
gt_dist_grapetree.tsv |
MST tree distance matrix | folder: result |
snippycore.full.aln |
multifasta file of the alignment of samples to the reference (Snippy-core). It contains the complete alignment, including non-variable sites | folder: result |
snippycore.aln |
multifasta file of the alignment of samples to the reference (Snippy-core). It contains the alignment of only the variable regions | folder: result |
clean.full.aln |
multifasta file of the alignment of samples to the reference (Snippy-core). This is the filtered snippycore.full.aln file, i.e. after removing uncertain alignment positions with a low-coverage or gaps |
folder: result |
reportree_metadata.tsv |
table of sample metadata produced by ReporTree | folder: result |
gt_dist.tsv |
pairwise distances of the MST tree | folder: result |
gt_clusterComposition.tsv |
table listing the clusters and their composition | folder: result |
gt_loci_used.txt |
list of loci used for the calculation of the distance matrix (start position) | folder: result |
gt_dist_hamming.tsv |
distance matrix | folder: result |
gt_partitions.tsv |
table with information on the cluster membership of the samples at each tree partitioning value | folder: result |
zooms.txt |
list of requested zoom levels | folder: result |
gt_metadata_w_partitions.tsv |
metadata table with information on cluster membership | folder: result |
gt_partitions_summary.tsv |
summary table of the tree partitions and the corresponding samples in the clusters | folder: result |
snippycore.tab |
.tsv table of variants. Columns: chromosome, position, nucleotide in the reference, nucleotide in sample 1, nucleotide in sample 2... | folder: result |
snippycore.vcf |
VCFv4.2 file of variants. It includes an informative header and a table with the variant type and a binary matrix indicating the presence/absence of the variant across samples | folder: result |
The .nwk file contains all the tree data and can be visualised using SPREAD or other external software for viewing dendrograms or distance graphs.