Skip to main content

stabilized-ica

Documentation Status License: MIT Code style: black

This repository proposes a python implementation for stabilized ICA decomposition algorithm. Most of the technical details can be found in the references [1], [2],[3], [4] and [5].

Our algorithm integrates two well-known methods to solve the ICA problem :

  • FastICA (implemented in scikit-learn)
  • Preconditioned ICA for Real Data - Picard (implemented in picard package)

We also propose an implementation of the Mutual Nearest Neighbors method as well as a visualization tool to draw the associated network. It is used to study the stability of the ICA components through different datasets.

Stabilized-ica is now compatible with scikit-learn API, meaning that you can use the base class as a sklearn transformer and include it in complex ML pipelines.

Install

Install the latest stable version with PyPi

pip install stabilized-ica

Install from source

pip install git+https://github.com/ncaptier/stabilized-ica.git

Experiments

We provide three jupyter notebooks for an illustration with transcriptomic data :

We provide one jupyter notebook for an illustration with EEG/MEG data :

We provide one jupyter notebook for an illustration of the integration of stabilized-ica into scikit-learn Machine learning pipelines:

Data

The data set which goes with the jupyter notebook "ICA decomposition with stabilized ICA" can be found in the .zip file data.zip. Please extract locally the data set before running the notebook.

For the jupyter notebooks "Stability of ICA components accross several NSCLC cohorts" and "Stabilized ICA for single-cell expression data (cell cycle)" please note that you will have to load the data yourself in order to run them (all the necessary links are reported on the notebooks).

Stabilized ICA for omics data

stabilized-ica was originally developped to deconvolute omics data into reproducible biological sources. We provide two additional computational tools to use stabilized-ica with omics data and interpret the extacted stable sources:

  • sica-omics is a Python toolbox which complements stabilized-ica for the analysis of omics data. In particular, it proposes annotation functions to decipher the biological meaning of the extracted ica sources, as well as a wrapper to adapt stabilized-ica base code to the special case of Anndata format which is popular for dealing with single-cell gene expression data.
  • BIODICA is a computational environment for application of independent component analysis (ICA) to bulk and single-cell molecular profiles, interpretation of the results in terms of biological functions and correlation with metadata. It uses the stabilized-ica package as its computational core. In particular, it comes with Graphical User interface providing a no-code access to all of its functionnalities.
    If you use BIODICA in a scientific publication, we would appreciate citation to the following paper:
    
    Nicolas Captier, Jane Merlevede, Askhat Molkenov, Ainur Seisenova, Altynbek Zhubanchaliyev, Petr V Nazarov, Emmanuel Barillot, Ulykbek Kairov, Andrei Zinovyev, BIODICA: a computational environment for Independent Component Analysis of omics data, Bioinformatics, Volume 38, Issue 10, 15 May 2022, Pages 2963–2964, https://doi.org/10.1093/bioinformatics/btac204
    

Examples

Stabilized ICA method

import pandas as pd
from sica.base import StabilizedICA

df = pd.read_csv("data.csv", index_col=0)

sICA = StabilizedICA(n_components=45, n_runs=30 ,plot=True, n_jobs = -1)
sICA.fit(df)

Metagenes = pd.DataFrame(sICA.S_, columns = df.columns, index = ['metagene ' + str(i) for i in range(sICA.S_.shape[0])])
Metagenes.head()

Mutual Nearest Neighbors method

from sica.mutualknn import MNNgraph

cg = MNNgraph(data = [df1 , df2 , df3] , names=['dataframe1' , 'dataframe2' , 'dataframe3'] , k=1)
cg.draw(colors = ['r', 'g' , 'b'] , spacing = 2)

cg.export_json("example.json")

Acknowledgements

This package was created as a part of the PhD project of Nicolas Captier in the Computational Systems Biology of Cancer group of Institut Curie.

References

[1] "Determining the optimal number of independent components for reproducible transcriptomic data analysis" - Kairov et al. 2017
[2] "Assessing reproducibility of matrix factorization methods in independent transcriptomes" - Cantini et al. 2019
[3] "Icasso: software for investigating the reliability of ICA estimates by clustering and visualization" - Himberg et al. 2003
[4] "Faster independent component analysis by preconditioning with Hessian approximations" - Ablin et al. 2018
[5] "BIODICA: a computational environment for Independent Component Analysis of omics data" - Captier et al. 2022

Metadata

Release files for stabilized-ica 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stabilized-ica 2.0.0
File Size Uploaded Provenance
stabilized-ica-2.0.0.tar.gz 25.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for stabilized-ica 2.0.0
File Interpreter ABI Platform
stabilized_ica-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 49.6 kB

Release files / stabilized-ica-2.0.0.tar.gz

Download URL stabilized-ica-2.0.0.tar.gz
Size 25.3 kB
Tags Source
SHA-256 checksum
How to use checksums
04c460858251282baabca2541cdf6693e0b0bfb14ea669e39e9ad4be4fa7b3a2
BLAKE2b-256 checksum
How to use checksums
c4986ecbf758bdd861b87534e877e4da2a4866db3f8069819877a9f6e84afbd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release files / stabilized_ica-2.0.0-py3-none-any.whl

Download URL stabilized_ica-2.0.0-py3-none-any.whl
Size 24.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f9d17cda4d480bebfb28282b8b96b0034d940530c21b06784ea33b7f85ec4b5
BLAKE2b-256 checksum
How to use checksums
1e6feeec7e90df6b4bac4831192640f6a2e9ac53f25c7ed5bc956712cf44cdc4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Security for stabilized-ica 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page