Cell painting gallery data handling and validation
Project description
Cell painting gallery data handling and validation
Getting started
Install cpgdata package
pip install cpgdata
Sync pre-generated index files
cpg index sync -o "path to save index files"
Example of using the index for filtering files to download from the Cell painting gallery
from pathlib import Path
from pprint import pprint
import polars as pl
from cpgdata.utils import download_s3_files, parallel
index_dir = Path("path to dir containing index files")
index_files = [file for file in index_dir.glob("*.parquet")]
df = pl.scan_parquet(index_files)
df = (
df
.filter(pl.col("dataset_id").eq("cpg0016-jump"))
.filter(pl.col("source_id").eq("source_4"))
.filter(pl.col("leaf_node").str.contains("Cells.csv"))
.select(pl.col("key"))
.collect()
)
# print first 10 results
pprint(df.to_dicts()[0:10])
# Download filtered files
download_keys = list(df.to_dict()["key"])
parallel(download_keys, download_s3_files, ["cellpainting-gallery", Path("path to save downloaded files")], jobs=20)
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
cpgdata-0.6.0.tar.gz
(11.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
cpgdata-0.6.0-py3-none-any.whl
(14.9 kB
view details)
File details
Details for the file cpgdata-0.6.0.tar.gz.
File metadata
- Download URL: cpgdata-0.6.0.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.6.75
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49b116e406b816c6c1d1020a3390bf297fa69c057e56be21c0ec7099c2dc49ab
|
|
| MD5 |
41ea05dde5aa215b1d5e49248f4b6867
|
|
| BLAKE2b-256 |
bb9e2a2321354e05ac62768885b01511ee3c06863d930f6fc7dc69c08ff4590a
|
File details
Details for the file cpgdata-0.6.0-py3-none-any.whl.
File metadata
- Download URL: cpgdata-0.6.0-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.6.75
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0f495206be0794bdb700707c698e4b52e479cbb43f39b8def17ecfa2130ae68
|
|
| MD5 |
442e7fea3b6337b6f76085ff82853006
|
|
| BLAKE2b-256 |
5f6d7387029145d70b15701d2a37903aabc100629a02facebdbf37985e52f77e
|