mantispy.ds.cp_posh#
- mantispy.ds.cp_posh(cache_dir=None, *, aggregated=False, feature_selected=False)[source]#
Single cells of insitro cp-POSH, a broad-morphology pooled CRISPR Cell Painting screen.
The 124-gene proof-of-concept dataset from
insitro/cp-posh: A549 cells carrying a pooled CRISPR-knockout library, stained with a six-channel Cell Painting panel (WGA, a mitochondrial probe, phalloidin, concanavalin A, DAPI and a marker round) and read by in-situ sequencing of the guide barcodes. Each cell gets a broad, untargeted morphology profile of about 1,278 CellStats features rather than the handful of hand-picked readouts a targeted screen keeps, so it is the broad-morphology complement toscallops_arv471().The features are already well-normalized by the authors, so
normalize()is not needed before analysis; a per-plate control normalization would re-do work already done.The base and its variants are pre-built by
scripts/build_staged_datasets.pyfrom the raw parquet and rehosted onscverse-exampledata, so the loader fetches a single h5ad rather than reassembling the base on every call. The two flags select the variant:both
False: the cells with every feature.feature_selected=True: the cells after pycytominer-default feature selection.aggregated=True: one median profile per(Metadata_Gene, Metadata_sgRNA)guide, withMetadata_CellCount.aggregated=True, feature_selected=True: that same guide aggregate on the feature-selected block.
- Parameters:
cache_dir (
str|Path|None(default:None)) – Where to keep the download. Defaults tomantispy.settings.cache_dir.aggregated (
bool(default:False)) – Return the guide-level median aggregate instead of the cells.feature_selected (
bool(default:False)) – Return the feature-selected block instead of all features.
- Returns:
Metadata_Gene: the gene the cell’s guide targets, taken from the upstreamgene_id. The two control classes keep their upstream spellings,"nontargeting"(the non-targeting guides) and"intergenic"(guides against intergenic regions);"nontargeting"is the spelling the analysis functions read.Metadata_sgRNA: the guide, the upstreambarcode.Metadata_Perturbation: the guide again, so each guide is its own perturbation, matchingscallops_arv471().Metadata_Perturbation_Type:"crispr", the kind of screen this is.Metadata_Plate: the plate, the upstreamplate("EL37").Metadata_Well: the physical well, such as"B04", taken from the upstreamplate_well("EL37_B04") by dropping the plate prefix so the well vocabulary can parse it.Metadata_Control:Truefor the non-targeting and intergenic guides, the referencehit_calling()and the control normalization test against.The upstream
treatmentcolumn is a constant (no small molecule) and is dropped, and theIDbecomes the observation index. The known-mechanism genes, whose knockout moves cells away from the controls, areKIF18A, the proteasome (PSMB1,PSMD4), the mitochondrial ribosome (MRPL43,MRPS5), the ARP2/3 complex (ARPC4,ACTR6) and COPI (COPE,ARCN1), scored againstnontargetingandintergenic.- Return type:
Notes
The CellStats feature names are insitro’s own, not CellProfiler’s
<Object>_<Group>_<Feature>_<Channel>, so the annotation columns ofvarare supplied empty rather than parsed. Left to the parser, a name such asnucleus_mask_heightwould read as themaskfeature group of anucleusobject and invent feature families that are not there, the same reason the learned embeddings ofjump_lite()carry an empty annotation. Anything that readsvar["feature_group"]orvar["channel"]has nothing to work with here.A cell carries no count. The
aggregatedvariant is one median profile per(Metadata_Gene, Metadata_sgRNA)guide, which writesMetadata_CellCount.- Raises:
ValueError –
aggregatedorfeature_selectedis not a bool.