-
Notifications
You must be signed in to change notification settings - Fork 5
Remove Anomalyze and update READMEs #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
MattsonCam
wants to merge
3
commits into
main
Choose a base branch
from
remove_anomalyze
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,13 @@ | ||
| # Download JUMP-Target SQLite files from AWS | ||
| # Download JUMP-Target SQLite Files from AWS | ||
|
|
||
| In this module, we download the SQLite files from [AWS](https://cellpainting-gallery.s3.amazonaws.com/index.html#cpg0000-jump-pilot/source_4/workspace/backend/2020_11_04_CPJUMP1/) with [aws-cli](https://github.com/aws/aws-cli) on Aug 10, 2023 using instructions provided from [JUMP Cell Painting Datasets](https://github.com/jump-cellpainting/datasets). | ||
| There are 51 plates from the pilot dataset (cpg0000), totalling 1.1 TB of storage from the SQLite files. | ||
| In this module, we download SQLite files from [AWS](https://cellpainting-gallery.s3.amazonaws.com/index.html#cpg0000-jump-pilot/source_4/workspace/backend/2020_11_04_CPJUMP1/) with [aws-cli](https://github.com/aws/aws-cli). | ||
| There are 51 plates from the pilot dataset (`cpg0000`), totaling about 1.1 TB of SQLite files. | ||
|
|
||
| Firstly, we generate a manifest file in the [data folder](./data/) called [jump_dataset_location_manifest.csv](./data/jump_dataset_location_manifest.csv). | ||
| Afterwards, we process each plate using [CytoTable](https://github.com/cytomining/CytoTable). | ||
| First, we generate a manifest file in the [data folder](./data/) called [jump_dataset_location_manifest.csv](./data/jump_dataset_location_manifest.csv). | ||
| Afterward, we process each plate using [CytoTable](https://github.com/cytomining/CytoTable). | ||
|
|
||
| Optionally, to download only the SQLite plates, please use the [download_from_aws.sh](./download_from_aws.sh) file, which contains the bash script that will download the files from the paths in the manifest. | ||
| The module entrypoint is [run.sh](./run.sh), which runs manifest generation, CytoTable plate processing, and image-download notebook execution. | ||
|
|
||
| Please see the notes from the main [`README.md` on processing this step](../README.md#running-code-from-this-project). | ||
| Optionally, to download only the SQLite plates, use [download_from_aws.sh](./download_from_aws.sh), which downloads files from paths in the manifest. | ||
|
|
||
| See the main [`README.md` section on running code](../README.md#running-code-from-this-project) for step-level execution details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,22 @@ | ||
| # Merge, normalize, feature select, and aggregate single cells with pycytominer | ||
| # Single-cell Quality Control, Merge, Normalize, Feature Select, and Aggregate Single Cells | ||
|
|
||
| In this module, we perform four preprocessing steps on the SQLite files using [pycytominer](https://github.com/cytomining/pycytominer/tree/main): | ||
| In this module, we perform five preprocessing steps on single-cell data generated from CytoTable outputs, using [pycytominer](https://github.com/cytomining/pycytominer/tree/main) for normalization, feature selection, and aggregation: | ||
|
|
||
| 1. Merge and annotate single cells from the SQLite file using the [pycytominer SingleCell class](https://github.com/cytomining/pycytominer/blob/main/pycytominer/cyto_utils/cells.py) | ||
| 2. [Normalize](https://github.com/cytomining/pycytominer/blob/main/pycytominer/normalize.py) the single cells using the negative controls (e.g., DMSO for compound treatment, no-target or target intergenic region sgRNAs for crispr treatment, and genes with weak signatures in orf treatment) as reference for the standard scalar method per plate. | ||
| 3. [Feature Select](https://github.com/cytomining/pycytominer/blob/main/pycytominer/feature_select.py) the single cell plate morphology data per plate by variance thresholding, correlation thresholding, and by filtering columns containing NaNs and columns specified in the blocklist. | ||
| 4. [Aggregate](https://github.com/cytomining/pycytominer/blob/main/pycytominer/feature_select.py) both the normalized and feature selected single-cell morphology data to the well level. | ||
| 1. Perform single-cell quality control (QC) after CytoTable and before annotation/merging to remove low-quality cells. | ||
| 2. Merge and annotate single-cell profiles from CytoTable outputs for downstream normalization and feature selection. | ||
| 3. [Normalize](https://github.com/cytomining/pycytominer/blob/main/pycytominer/normalize.py) single cells using negative controls (for example, DMSO for compounds, no-target or intergenic-targeting sgRNAs for CRISPR, and weak-signature genes for ORF) as reference populations for standard scaling per plate. | ||
| 4. [Feature select](https://github.com/cytomining/pycytominer/blob/main/pycytominer/feature_select.py) single-cell morphology data per plate using variance thresholding, correlation thresholding, and filtering columns containing NaNs or listed in the blocklist. | ||
| 5. Aggregate both normalized and feature-selected single-cell morphology data to the well level. | ||
|
|
||
| ## Run merging and normalization notebook | ||
| ## Run Single-cell Processing Pipeline | ||
|
|
||
| To process the data, run the [process_data.sh](./process_data.sh) file which will convert the notebook into a python file and run it from terminal. | ||
| To process the data, run [process_data.sh](./process_data.sh), which converts notebooks to Python scripts in `nbconverted/` and runs QC-aware single-cell processing through merging/annotation, normalization, and feature selection; then run [aggregate_sc_data.sh](./aggregate_sc_data.sh) for well-level aggregation. | ||
|
|
||
| ```bash | ||
| # Make sure you are in the 1.process_data directory | ||
| cd 1.process_data | ||
| # Process the data with steps 1-3 | ||
| # Process the data with steps 1-4 | ||
| ./process_data.sh | ||
| # Process the data with step 4 | ||
| # Process the data with step 5 | ||
| ./aggregate_sc_data.sh | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,19 @@ | ||
| # Apply phenotypic profiling model to JUMP data | ||
| # Apply phenotypic profiling models to JUMP data | ||
|
|
||
| In this module, we generate single-cell probabilities for each of the 15 phenotypic classes by applying the [phenotypic profiling model](https://github.com/WayScience/phenotypic_profiling_model). | ||
| There are two model types, final and shuffled baseline. | ||
| The shuffled baseline model trains using randomly shuffled single-cell features. | ||
| We output one file for all plates that contains phenotypic probabilities and relevant metadata for all of the single-cells. | ||
| The files we output are in `parquet` format. | ||
| This module generates single-cell probabilities for 15 phenotypic classes using trained morphology models. | ||
| Current workflows focus on class-balanced logistic regression prediction runs and related per-plate processing. | ||
|
|
||
| ## Run the prediction notebook | ||
| Outputs are written as `parquet` files with phenotypic probabilities and relevant metadata. | ||
|
|
||
| To generate the probabilities for each single cell, run the [evaluate_data.sh](./evaluate_data.sh) file which will convert the notebook into a python file and run it from terminal. | ||
| ## Run predictions | ||
|
|
||
| To generate probabilities, run [evaluate_data.sh](./evaluate_data.sh): | ||
|
|
||
| ```bash | ||
| # Make sure you are in the 2.evaluate_data directory | ||
| # make sure you are in the 2.evaluate_data directory | ||
| cd 2.evaluate_data | ||
| # Run the notebook as a python script | ||
| # run prediction pipeline | ||
| source evaluate_data.sh | ||
| ``` | ||
|
|
||
| `evaluate_data.sh` executes the active prediction workflow in `class_balanced_log_reg_areashape_predict_sc_probabilities/`. |
292 changes: 0 additions & 292 deletions
292
2.evaluate_data/compute_sc_anomalyze_data/compute_aggregate_treatment_anomaly_data.ipynb
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.