Skip to main content

Multimodal Epigenetic Sequencing Analysis (MESA) is a flexible and sensitive method of capturing and integrating multimodal epigenetic information of cfDNA using a single experimental assay.

Project description

MESA

Multimodal Epigenetic Sequencing Analysis (MESA) is a flexible and sensitive method of capturing and integrating multimodal epigenetic information of cfDNA using a single experimental assay.

@ Modified by: Chaorong Chen

@ Modified time: 2023-02-11 02:27:49e original MESA paper, please refer to this tutorial: https://rpubs.com/LiYumei/926228.

Dependencies

  • Python >=3.6
  • deepTools
  • bedtools
  • DANPOS2
  • BSMAP
  • UCSC tools
  • Python Package
    • pandas
    • numpy
    • scikit-learn = 0.24.2
    • joblib
    • itertools
    • boruta_py
    • deep-forest

Installation

Clone the repository with git:

git clone https://github.com/ChaorongC/MESA
cd MESA

Or download the repository with wget:

wget https://github.com/ChaorongC/MESA/archive/refs/heads/main.zip
unzip MESA-main.zip
cd MESA-main

Usage

The Python script MESA.py in the root directory is the main program for MESA. The function MESA_single() in 'MESA.py' is for analysis on a single type of feature, and the function MESA_integration() is for combining results on different types of features and returning the multimodal prediction result.

Example

Check the Jupyter notebook demo.ipynb for a tutorial on how to run MESA.

Parameters

MESA_single(X,
        y,
        estimator,
        classifiers=[],
        cv=5,
        random_state=0,
        min_feature=10,
        n_jobs=-1,
        scoring='roc_auc',
        boruta_top_n_feature=1000)

X : dataframe of shape (n_features, n_samples)

Input samples. A matrix containing features as rows with samples as columns.

y : array-like of shape (n_samples,)

Target values/labels/stages. Usually, we use 0 and 1 for 'normal/negative' and 'cancer/positive' samples.

estimator : estimator object/model implementing ‘fit’

The object used to fit the data. A model that is used to evaluate feature subsets in each iteration of sequential backward selection.

classifiers : a list of estimator object/model implementing ‘fit’ and 'predict_proba'

The object to use to evalutate on test set at the end. A model used to train on the final selected feature subset then test on the testing set.

cv : int, cross-validation generator or an iterable, default=5

(Adopted from sklearn.model_selection.cross_val_score) Determines the cross-validation splitting strategy. Possible inputs for cv are: None, to use the default 5-fold cross validation; int, to specify the number of folds in a (Stratified)KFold; CV splitter, An iterable yielding (train, test) splits as arrays of indices.

random_state : int, RandomState instance or None, default=0

Controls the pseudo random number generation for shuffling the data.

__min_feature : int, default=10

The minimal feature size SBS should consider.

n_jobs : int, default=-1

Number of jobs to run in parallel. When evaluating a new feature to add or remove, the cross-validation procedure is parallel over the folds. None means 1 unless in a joblib.parallel_backend context. -1 means using all processors.

scoring : str or callable, default='roc_auc'

For SBS process, a str (see scikit-learn model evaluation documentation) or a scorer callable object/function with signature scorer(estimator, X, y) which should return only a single value. Compatible with sklearn.model_selection.cross_val_score.

boruta_top_n_feature : int, default=1000

Features to select for SBS in the Boruta algorithm. Features are first ranked by Boruta then output for SBS for further selection.

MESA_integration(X_list, 
                  y, 
                  feature_selected, 
                  classifiers)

X : list of dataframes of shape (n_features, n_samples)

Input samples. A matrix containing features as rows with samples as columns.

y : array-like of shape (n_samples,)

Target values/labels/stages. Usually, we use 0 and 1 for 'normal/negative' and 'cancer/positive' samples.

feature_selected : list of tuples (n_samples)

Features selected for each LOO iteration (same order with X)

classifiers : a list of estimator object/model implementing ‘fit’ and 'predict_proba'

The object to use to evalutate on test set at the end.

Authors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mesa_cfdna-0.1.1.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mesa_cfdna-0.1.1-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file mesa_cfdna-0.1.1.tar.gz.

File metadata

  • Download URL: mesa_cfdna-0.1.1.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mesa_cfdna-0.1.1.tar.gz
Algorithm Hash digest
SHA256 27f4d1b1f7e69197a44814e6d28eb5c38328a935616efad4116eb1e04dfeb63a
MD5 78d70eb4e8a0d09f34981d291b348019
BLAKE2b-256 84a9bce318fb125114792f43d7a5e094c247d450522126ecd67249462ef3f851

See more details on using hashes here.

Provenance

The following attestation bundles were made for mesa_cfdna-0.1.1.tar.gz:

Publisher: python-publish.yml on ChaorongC/mesa_cfdna

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mesa_cfdna-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mesa_cfdna-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mesa_cfdna-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9ff7cc8e6b5200ee2ffae3b9e33f7e5ecc98e0ed8cde907c940a1452def065aa
MD5 059a3919f723c3d803ebd5b145b9147a
BLAKE2b-256 a4c026718940c315e647ec5e62243410c830573e1b7f24a23619822e4a5d369d

See more details on using hashes here.

Provenance

The following attestation bundles were made for mesa_cfdna-0.1.1-py3-none-any.whl:

Publisher: python-publish.yml on ChaorongC/mesa_cfdna

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page