← Về thư mục
skills/single-cell-rna-analysis/kernel.py
- _utc_now · function · L67-L68 — def _utc_now() -> str
- _read_json · function · L71-L76 — def _read_json(path: Path) -> dict[str, Any]
- _write_json · function · L79-L87 — def _write_json(path: Path, value: Any) -> None: # Atomic: resume() trusts these files, and a truncated half-write from an # interrupted run must never shadow a readable prior state.
- _load_config · function · L90-L96 — def _load_config( config: Mapping[str, Any] | str | os.PathLike[str], ) -> tuple[dict, Path]
- _path · function · L99-L103 — def _path(value: Any, base: Path) -> str
- _resolved_config · function · L106-L182 — def _resolved_config( config: Mapping[str, Any] | str | os.PathLike[str], ) -> dict[str, Any]
- _config_errors · function · L185-L345 — def _config_errors(config: Mapping[str, Any]) -> tuple[list[str], list[str]]
- _read_sample_sheet · function · L348-L366 — def _read_sample_sheet(path: Path) -> list[dict[str, str]]
- _sample_sheet_errors · function · L369-L430 — def _sample_sheet_errors( config: Mapping[str, Any], ) -> tuple[list[str], list[str], list[dict]]
- _confounding_errors · function · L433-L452 — def _confounding_errors( records: list[Mapping[str, Any]], config: Mapping[str, Any] ) -> list[str]
- _matrix_rank · function · L455-L482 — def _matrix_rank(rows: list[list[float]], tolerance: float = 1e-10) -> int
- _design_checks · function · L485-L574 — def _design_checks( records: list[Mapping[str, Any]], config: Mapping[str, Any] ) -> tuple[list[str], list[str], dict[str, int]]
- _inspect_h5ad · function · L577-L665 — def _inspect_h5ad( path: Path, counts_layer: str, config: Mapping[str, Any], inspect_metadata: bool = True, ) -> tuple[list[str], list[str], int | None]
- _sha256_file · function · L668-L673 — def _sha256_file(path: Path) -> str
- _sha256_path · function · L676-L683 — def _sha256_path(path: Path) -> str
- _input_fingerprint · function · L686-L696 — def _input_fingerprint(config: Mapping[str, Any]) -> tuple[str, list[dict[str, str]]]
- _config_sha · function · L699-L701 — def _config_sha(config: Mapping[str, Any]) -> str
- _stage_hashes · function · L704-L792 — def _stage_hashes( config: Mapping[str, Any], input_fingerprint: str | None ) -> dict[str, str]
- digest · function · L709-L713 — def digest(value: Any) -> str
- preflight · function · L795-L859 — def preflight(config: Mapping[str, Any] | str | os.PathLike[str]) -> dict[str, Any]
- _science_imports · function · L862-L873 — def _science_imports() -> tuple[Any, Any, Any, Any]
- _is_raw_counts · function · L876-L893 — def _is_raw_counts(matrix: Any, np: Any) -> tuple[bool, str | None]
- _extract_counts · function · L896-L901 — def _extract_counts(adata: Any, counts_layer: str) -> Any
- _read_one · function · L904-L920 — def _read_one(path: str, matrix_format: str, counts_layer: str, sc: Any) -> Any
- _derive_h5ad · function · L923-L952 — def _derive_h5ad( source: Path, destination: Path, adata: Any, keys: tuple[str, ...] ) -> None
- _load_data · function · L955-L1094 — def _load_data( config: Mapping[str, Any], np: Any, pd: Any, sc: Any, ad: Any ) -> tuple[Any, list[str]]
- _gene_names · function · L1097-L1101 — def _gene_names(adata: Any, config: Mapping[str, Any]) -> list[str]
- _mad_flags · function · L1104-L1115 — def _mad_flags(values: Any, side: str, threshold: float, np: Any) -> Any
- _run_qc · function · L1118-L1251 — def _run_qc( adata: Any, config: Mapping[str, Any], np: Any, pd: Any, sc: Any ) -> tuple[Any, Any, Any, list[str]]
- _resolution_key · function · L1254-L1255 — def _resolution_key(value: float) -> str
- _run_embedding · function · L1258-L1313 — def _run_embedding(adata: Any, config: Mapping[str, Any], sc: Any) -> Any
- _run_clustering · function · L1316-L1331 — def _run_clustering(adata: Any, config: Mapping[str, Any], sc: Any) -> Any
- _write_markers · function · L1334-L1343 — def _write_markers(adata: Any, output: Path, pd: Any, sc: Any) -> Any
- _annotate · function · L1346-L1474 — def _annotate( adata: Any, config: Mapping[str, Any], pd: Any, np: Any ) -> tuple[Any, str, list[str], Any]
- _pseudobulk · function · L1477-L1536 — def _pseudobulk( adata: Any, config: Mapping[str, Any], pd: Any, np: Any ) -> tuple[Any, Any, str]
- _replication_status · function · L1539-L1551 — def _replication_status( metadata: Any, config: Mapping[str, Any] ) -> tuple[bool, dict[str, int]]
- _run_deseq · function · L1554-L1645 — def _run_deseq( pseudobulk: Any, metadata: Any, config: Mapping[str, Any], output: Path, pd: Any ) -> tuple[str, list[str]]
- _run_milo · function · L1648-L1681 — def _run_milo(adata: Any, config: Mapping[str, Any], output: Path) -> str
- _plot_outputs · function · L1684-L1808 — def _plot_outputs(adata: Any, output_dir: Path, pd: Any) -> list[str]
- _package_versions · function · L1811-L1823 — def _package_versions() -> dict[str, str | None]
- _remove_inferential_outputs · function · L1826-L1831 — def _remove_inferential_outputs(output_dir: Path) -> None
- _featured · function · L1834-L1863 — def _featured(output_dir: Path, analysis_mode: str = "comparative") -> list[str]
- _write_report · function · L1866-L1905 — def _write_report(output_dir: Path, manifest: Mapping[str, Any]) -> None
- _finalize_manifest · function · L1908-L1931 — def _finalize_manifest(output_dir: Path, manifest: dict[str, Any]) -> dict[str, Any]
- _result · function · L1934-L1950 — def _result(output_dir: Path, manifest: Mapping[str, Any]) -> dict[str, Any]
- _run · function · L1953-L2245 — def _run( config: Mapping[str, Any] | str | os.PathLike[str], output_dir: str | os.PathLike[str], *, _resume_stage: str | None = None, _prior_manifest: Mapping[str, Any] | None = None, _preflight: Mapping[str, Any] | None = None, ) -> dict[str, Any]
- _sync_warnings · function · L2026-L2036 — def _sync_warnings() -> None
- _checkpoint_manifest · function · L2051-L2056 — def _checkpoint_manifest() -> None: # Persist progress after every completed stage so an interrupted run # can resume from the last durable stage instead of recomputing # everything; the file inventory is finalized only at the end.
- run · function · L2248-L2253 — def run( config: Mapping[str, Any] | str | os.PathLike[str], output_dir: str | os.PathLike[str], ) -> dict[str, Any]
- resume · function · L2256-L2421 — def resume(run_dir: str | os.PathLike[str]) -> dict[str, Any]