Skip to content

Latest commit

 

History

106 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NF1_organoid_profile_analysis

This repo contains analysis code of profiles generated in multiple image-based profiling repos.

Repo modules

  • 0.download_data: Download image-based profiles from the internet (not yet available)
  • 1.EDA: Exploratory data analysis of image-based profiles
  • data_viewing: Interactive Streamlit app to explore results from 1.EDA, 3.viability_prediction_models and 4.linear_modeling (see data_viewing/README.md)
  • 2.2d_vs_3d_analysis: Comparison of 2D and 3D profiles (patient correlation, mAP, drug hits, entropy, kBET, sparse CCA)
  • 3.viability_prediction_models: Viability prediction models trained on the profiles
  • 4.linear_modeling: Per-patient linear models of every feature on treatment plus count and technical covariates, and the variance, variate-importance and hit analyses built on them (see 4.linear_modeling/README.md)

Computational environment

Notebooks in this repo are split between Python and R, each managed by a separate environment.

Python (uv) and R (uvr) setup

Python notebooks use a uv-managed virtual environment defined in pyproject.toml/uv.lock.

source uv_setup.sh

This creates .venv and registers a python3 Jupyter kernel. Select this kernel when running the Python notebooks.

This also creates a .uvr directory for the R environment.

For more about uv and uvr, see:

R (uvr)

R notebooks use a uvr-managed R library defined in uvr.toml/uvr.lock (R >=4.3.0, set by r_version). uv_setup.sh also sets this up: it runs uvr sync to install the packages into .uvr/library, checks the uvr-managed R against r_version, and registers an IRkernel Jupyter kernel named after the uvr.toml project (NF1_organoid_profile_analysis) that runs that R with the project library. Select this kernel when running the R notebooks.

R scripts run in the same environment with uvr run:

uvr run 4.linear_modeling/scripts/6.plot_variate_importance.r

Add a package with uvr add <package> so it is recorded in uvr.toml and uvr.lock.

R (mamba, older modules)

The R notebooks in 1.EDA and 2.2d_vs_3d_analysis were run with the mamba environment in environments/r_env.yml (mamba env create -f environments/r_env.yml) and a generic ir kernel.

Running the analysis repo

Ensure that the data are acquired prior. The data zip once downloaded will be extracted and placed in the data/ directory. data file: data/shippable_dir.zip should be present.

Then run:

just all

About

This repo contains analysis code of profiles generated in multiple image-based profiling repos.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages