InMoose: the Integrated Multi Omic Open Source Environment
Project description
InMoose
InMoose is the Integrated Multi Omic Open Source Environment. It is a collection of tools for the analysis of omic data.
Installation
You can install InMoose directly with:
pip install inmoose
Documentation
Documentation is hosted on readthedocs.org.
Batch Effect Correction
InMoose provides features to correct technical biases, also called batch effects, in transcriptomic data:
- for microarray data, InMoose supersedes pyCombat [1], a Python3 implementation of ComBat [2], one of the most widely used tool for batch effect correction on microarray data.
- for RNASeq data, InMoose features a port to Python3 of ComBat-Seq [3], one of the most widely used tool for batch effect correction on RNASeq data.
To use these functions, simply import them and call them with default parameters:
from inmoose.pycombat import pycombat_norm, pycombat_seq
microarray_corrected = pycombat_norm(microarray_data, microarray_batches)
rnaseq_corrected = pycombat_seq(rnaseq_data, rnaseq_batches)
microarray_data
,rnaseq_data
: the expression matrices, containing the information about the gene expression (rows) for each sample (columns).microarray_batches
,rnaseq_batches
: list of batch indices, describing the batch for each sample. The list of batches should contain as many elements as the number of samples in the expression matrix.
Cohort QC
InMoose provides classes CohortMetric
and QCReport
to help to perform quality control (QC) on cohort datasets after batch effect correction.
CohortMetric
: This class handles the analysis and provides methods for performing quality control on cohort datasets.
Description
The CohortMetric
class performs a range of quality control analyses, including:
- Principal Component Analysis (PCA) to assess data variation.
- Comparison of sample distributions across different datasets or batches.
- Quantification of the effect of batch correction.
- Silhouette Score calculation to assess how well batches are separated.
- Entropy calculation to evaluate the mixing of samples from different batches.
Usage Example
from inmoose.cohort_qc.cohort_metric import CohortMetric
cohort_quality_control = CohortMetric(
clinical_df=clinical_data,
batch_column="batch",
data_expression_df=gene_expression_after_correction,
data_expression_df_before=gene_expression_before_correction,
covariates=["biopsy_site", "sample_type"]
)
QCReport
: This class takes a CohortMetric argument, and generates an HTML report summarizing the QC results.
Description
The QCReport
class extends CohortMetric
and generates a comprehensive HTML report based on the quality control analysis. It includes visualizations and summaries of PCA, batch correction, Silhouette Scores, entropy, and more.
Usage Example
from inmoose.cohort_qc.qc_report import QCReport
# Generate and save the QC report
qc_report = QCReport(cohort_quality_control)
qc_report.save_html_report_local(output_path='reports')
Differential Expression Analysis
InMoose provides features to analyse diffentially expressed genes in bulk transcriptomic data:
- for microarray data, InMoose features a port of limma [4], the de facto standard tool for differential expression analysis on microarray data.
- for RNASeq data, InMoose features a ports to Python3 of edgeR [5] and DESeq2 [6], two of the most widely used tools for differential expression analysis on RNASeq data.
See the dedicated sections of the documentation.
Consensus clustering
InMoose provides features to compute consensus clustering, a resampling based algorithm compatible with any clustering algorithms which class implementation is instantiated with parameter n_clusters
, and possess a fit_predict
method, which is invoked on data.
Consensus clustering helps determining the best number of clusters to use and output confidence metrics and plots.
To use these functions, import the consensusClustering class and a clustering algorithm class:
from inmoose.consensus_clustering.consensus_clustering import consensusClustering
from sklearn.cluster import AgglomerativeClustering
CC = consensusClustering(AgglomerativeClustering)
CC.compute_consensus_clustering(numpy_ndarray)
How to contribute
Please refer to CONTRIBUTING.md to learn more about the contribution guidelines.
References
[1] Behdenna A, Colange M, Haziza J, Gema A, Appé G, Azencot CA and Nordor A. (2023) pyComBat, a Python tool for batch effects correction in high-throughput molecular data using empirical Bayes methods. BMC Bioinformatics 7;24(1):459. https://doi.org/10.1186/s12859-023-05578-5.
[2] Johnson W E, et al. (2007) Adjusting batch effects in microarray expression data using empirical Bayes methods. Biostatistics, 8, 118–12. https://doi.org/10.1093/biostatistics/kxj037
[3] Zhang Y, et al. (2020) ComBat-Seq: batch effect adjustment for RNASeq count data. NAR Genomics and Bioinformatics, 2(3). https://doi.org/10.1093/nargab/lqaa078
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file inmoose-0.7.3.tar.gz
.
File metadata
- Download URL: inmoose-0.7.3.tar.gz
- Upload date:
- Size: 7.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8924c94245d49f8990ed05d962409cf9949a6124180fdc2f6784778a29a6c0e |
|
MD5 | be0260a5cecd297ac06e7e5f8a004edf |
|
BLAKE2b-256 | 2b817ecfae2ad7a95045466eb971c7d64f2b9313153c57195c49bdf1aa2a0ada |
Provenance
The following attestation bundles were made for inmoose-0.7.3.tar.gz
:
Publisher:
build_dist.yaml
on epigenelabs/inmoose
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
inmoose-0.7.3.tar.gz
- Subject digest:
c8924c94245d49f8990ed05d962409cf9949a6124180fdc2f6784778a29a6c0e
- Sigstore transparency entry: 147269827
- Sigstore integration time:
- Predicate type: