GenPat Platform, Wiki

Topics
Topics

kSNP

Introduction

kSNP3 identifies Single Nucleotide Polymorphisms (SNPs) in the samples; it performs an alignment-free (reference-free) phylogenetic analysis and builds a phylogenetic tree using a Maximum Likelihood (ML) algorithm, based on the samples' SNP matrix. Moreover, the analyses launches ReporTree to calculate the "Minimum Spanning Tree" (MST).

uml diagram

Run kSNP analysis

Once the kSNP analysis has been selected in the dedicated run analysis page, the system will move to a confirmation interface.

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 accepted inputs for kSNP are:

The parameter definition screen also offers a high level of customization, including:

  • kSNP parameters:

    • Analysis type: it allows you to choose whether to perform the phylogenetic analysis using all SNPs ("All" mode) or only core SNPs ("Core" mode);
    • Kmer length: it allows you to manually change the lengh of k-mers;
    • kSNP version: it allows you to choose the software version between kSNP3 ("legacy") and kSNP4 (v4.1);
  • ReporTree parameters:

  • Partition threshold for clustering definition: it allows you to customize the threshold values for creating tree partitions;

    • Minimum proportion of samples per site without missing data: ReporTree normally considers, for calculating the distance matrix and the tree, all genomic sites where variants have been called. This option allows you to define a threshold value: only sites where variants are called in a percentage of the dataset equal to or higher 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 value 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 interest options: 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 dendrogram options: selection of the mode for optional Hierarchical Clustering;
    • Custom parameters options: 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 a maximum-likelihood (ML) algorithm. The available software are IQ-TREE 2 and FastTree.

Given the number and complexity of parameters and results of the Snippy-core and ReporTree software, users are encouraged to consult their official guides: - kSNP 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 results tab and select the link: - ML tree (IQ-Tree) with Auspice for the ML tree; - MST with SPREAD for the MSTree; - HC with Auspice for the HC graph.

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.

Please note that, depending on the parameter used for the Analysis type, the name of the output files will differ:

  • SNPs_all_matrix (if "All" has been selected for Analysis type);
  • core_SNPs_matrix (if "Core" has been selected for Analysis type).

The table below shows the names when running on "Core" SNPs.

File Description Location
core_SNPs_matrix.fasta multifasta file containing headers with the sample name and a line for the concatenated SNP sequences. ā€œNā€ indicates the absence of an SNP in that sample folder: results
gt.nwk tree file in .nwk (Newick) format calculated using an MST algorithm folder: results
gt_clusterComposition.tsv table listing the clusters and their composition folder: result
gt_metadata_w_partitions.tsv table of sample metadata with cluster membership based on partitions folder: result
gt_dist_hamming.tsv table with Hamming distances folder: result
gt_partitions_summary.tsv list of tree partitions and corresponding samples in the clusters folder: result
gt_partitions.tsv table of samples and their cluster membership based on the partitioning folder: result
gt_loci_used.txt List of loci folder: result

For further information regarding the formatting of kSNP outputs, please refer to the dedicated section of the kSNP user guide.