Skip to main content

biocognia-markers

The marker graph that SCIMAP Pro, Plexora and other BioCognia products share.

  • Nodes: markers and cell families.
  • Edges: what is known about them: exceptions, exclusions, subsets, carriers and co-expression.
  • Evidence: the evidence behind each node and edge.
  • Verification: an item counts as verified only when a machine has found every part of it in its source (biocognia-markers verify).
import biocognia_markers as bm

graph = bm.load()                       # the shipped graph, with the user's overlay laid over it
graph.resolve(["CD3e", "PD-1"])
graph.edges_of("m:pd1")

Phenotyping from it

from biocognia_markers import phenotypes, inference

defs = phenotypes.definitions(["CD45", "CD3e", "CD8a", "FOXP3"], context="melanoma")
defs["coverage"]["types"]                # what this panel can resolve, and what would recover the rest
inference.evaluate(defs, {"CD45": 0.9, "CD3e": 0.8, "CD8a": 0.9})   # one cell: type, outcome, reason, confidence

phenotypes turns the graph and a panel into definitions; inference is the one engine every product runs on them (SCIMAP Pro's tl.autoPhenotype streams cells through it): one decision per pattern of positive, negative and unmeasured markers. A cell positive for two lineages the graph keeps apart climbs a ladder (spill from a neighbour, unmixing on linear intensities, relative strength, its spatial and expression neighbours) and, when nothing settles it, gets the best guess. Named functional states live in the graph's states section (schema 2), how a transcript reads each marker in its rna field.

Changing it safely

Every write to an overlay is validated first (bm.validate.validate, a dry run: schema, unknown names, duplicates, contradictions) and journaled beside it (bm.overlay.history, at, revert). A write never brings a citation with it; only verify earns one. Graph.fingerprint(used) records what a result rested on, and bm.graph.compare says later which of those items changed.

See the graph

biocognia-markers view          # the live graph (shipped + your overlays), opened in a browser

The page shows every marker, family and relation, with the quotes behind each; search it by any name a panel uses, filter by relation, confidence or tissue, or read the relations as a table. It is written beside your overlay, and every change to the graph through this package rewrites it, so reloading the tab shows the current graph. bm.view.write(path) writes it anywhere.

On GitHub, docs/graph.html is the page of the shipped graph at that commit: download it (Raw, then save) and open the file. biocognia-markers merge and verify --write rewrite it when they change the shipped graph; after a hand edit, run biocognia-markers view --shipped --out docs/graph.html --no-open (the tests fail until you do).

Adding to it

To add to the graph, an agent follows the skill biocognia-marker-graph (src/biocognia_markers/skills/marker-graph/SKILL.md). tools/migrate.py built the first graph from SCIMAP Pro's rule library and Plexora's vocabulary. Where those two sources disagree is listed in MIGRATION_REPORT.md.

Metadata

Release files for biocognia-markers 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for biocognia-markers 0.2.0
File Size Uploaded Provenance Actions
biocognia_markers-0.2.0.tar.gz 2.2 MB Without provenance Details for biocognia_markers-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for biocognia-markers 0.2.0
File Interpreter ABI Platform Actions
biocognia_markers-0.2.0-py3-none-any.whl Python 3 none any Details for biocognia_markers-0.2.0-py3-none-any.whl

Total release size: 3.4 MB

Release files / biocognia_markers-0.2.0.tar.gz

Download URL biocognia_markers-0.2.0.tar.gz
Size 2.2 MB
Tags Source
SHA-256 checksum
How to use checksums
c76fb5e238d8e843ff86afa8315894c53c96e7f1c9e19956975dd47b8e707128
BLAKE2b-256 checksum
How to use checksums
8f59fc25626f81f16cf39fcd3a89b486b3362407794b1faa6fd2cb582b2f9001
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.14

Release files / biocognia_markers-0.2.0-py3-none-any.whl

Download URL biocognia_markers-0.2.0-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
7742bfb905c5892164cb6d04844c4151415c064296a3554e5502a9dc4223a0be
BLAKE2b-256 checksum
How to use checksums
77bab2a07e4de180620595f5e97b5f9f177f584eee01cb54d82fd782d5523467
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.14

Security for biocognia-markers 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page