Skip to content

Adaptation of Similarity Network Fusion (SNF) to Python

License

Notifications You must be signed in to change notification settings

lyndonboone/snf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

snf

An adaptation of Similarity Network Fusion (SNF) to Python

Motivation

While an implementation of SNF in Python already exists (https://github.com/rmarkello/snfpy), I found that the output from their main SNF function differed from the output I got from using the SNF package developed by the original authors in R (see tests/test_snf.py in this repository).

snfpy is a great library in its own right (some of its functions are used here as a dependency). I built this small package as an adjunct to provide an SNF function that is an exact replica of the widely used SNFtools package in R.

This pacakge also includes an implementation of the robust_core_clustering function from Jacobs et al. (2021).

Getting started

After cloning this repository locally, you can install it by navigating to the main package folder and running the command

pip install .

To import the main SNF function, you can use this line of Python code:

from snftools.snf import SNF

About

Adaptation of Similarity Network Fusion (SNF) to Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published