Giter Club home page Giter Club logo

phenotypic_profiling_model's Introduction

Phenotypic Profiling Model

Dataset and analysis approach

main_figure_1

Figure 1. Dataset and analysis approach. (A) Single-cell counts per labeled phenotype stratified by phenotype category. The labeled MitoCheck dataset included a total of 2,916 single nuclei. The original dataset contained labels for 16 classes, but we have removed “folded” because of low counts. Counts are not evenly distributed between the classes. (B) Our analysis pipeline incorporated image analysis, image-based profiling, and machine learning.

Environment Setup

Perform the following steps to set up the phenotypic_profiling environment necessary for processing data in this repository.

Step 1: Create Phenotypic Profiling Environment

# Run this command to create the conda environment for phenotypic profiling

conda env create -f phenotypic_profiling_env.yml

Step 2: Activate Phenotypic Profiling Environment

# Run this command to activate the conda environment for phenotypic profiling

conda activate phenotypic_profiling

Repository Structure:

The repository structure is as follows:

Order Module Description
0.download_data Download training data Download labeled single-cell dataset from mitocheck_data
1.split_data Create data subsets Create training and testing data subsets
2.train_model Train model Train ML models on training data subset and shuffled baseline training dataset
3.evaluate_model Evaluate model Evaluate ML models on all data subsets
4.interpret_model Interpret model Interpret ML models
5.validate_model Validate model Validate ML models
6.single_cell_images Single Cell Images View single cell images and model interpretation
7.figures Figures Create paper-worthy figures

Data

Specific data download/preprocessing instructions are available at: https://github.com/WayScience/mitocheck_data. This repository downloads labeled single-cell data from a specific version of the mitocheck_data repository. For more information see 0.download_data/.

Machine Learning Models

We use Scikit-learn (sklearn) for data manipulation, model training, and model evaluation. Pedregosa et al., JMLR 12, pp. 2825-2830, 2011 describe scikit-learn as a machine learning library for Python. Its ease of implementation in a pipeline makes it ideal for our use case.

We consistently use the following parameters with many sklearn functions:

  • n_jobs=-1: Use all CPU cores in parallel when completing a task.
  • random_state=0: Use seed 0 when shuffling data or generating random numbers. This allows "random" sklearn operations to have consist results. We also use np.random.seed(0) to make "random" numpy operations have consistent results.

We use seaborn for data visualization. Waskom, M.L., 2021 describe seaborn as a library for making statisical graphics in python.

All parts of the machine learning pipeline are completed with the following feature types:

  • CP: Use only CellProfiler features from MitoCheck labeled cells
  • DP: Use only DeepProfiler features from MitoCheck labeled cells
  • CP_and_DP: Use CellProfiler and DeepProfiler features from MitoCheck labeled cells

See MitoCheck_data for more information on feature types and how they are extracted from MitoCheck labeled cells.

We create two versions of the same machine learning model:

  • final: Model fit using real feature values
  • shuffled_baseline: Model fit using shuffled training data (to create a suitable baseline comparison for the final model during evaluation)

Intermediate Data

Throughout this repository, we store intermediate .tsv data in tidy long format, a standardized data structure (see Tidy Data by Hadley Wickham for more details). This data structure makes later analysis easier.

Some intermediate data used in this repository are too large to be stored on GitHub. These intermediate data are available on the Way Lab Zenodo page.

Reproducibility

Specific code and steps used are available within each module folder.

The Way Lab always strives for readable, reproducible computational biology analyses and workflows. If you struggle to understand or reproduce anything in this repository please file an issue!

phenotypic_profiling_model's People

Contributors

roshankern avatar gwaybio avatar jenna-tomkinson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.