opencode-knowledge-work 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +212 -0
- package/README.md +124 -2
- package/content/bio-research/.mcp.json +48 -0
- package/content/bio-research/CONNECTORS.md +23 -0
- package/content/bio-research/LICENSE +202 -0
- package/content/bio-research/README.md +83 -0
- package/content/bio-research/skills/bio-research-instrument-data-to-allotrope/LICENSE.txt +201 -0
- package/content/bio-research/skills/bio-research-instrument-data-to-allotrope/SKILL.md +280 -0
- package/content/bio-research/skills/bio-research-instrument-data-to-allotrope/references/asm_schema_overview.md +226 -0
- package/content/bio-research/skills/bio-research-instrument-data-to-allotrope/references/field_classification_guide.md +503 -0
- package/content/bio-research/skills/bio-research-instrument-data-to-allotrope/references/flattening_guide.md +254 -0
- package/content/bio-research/skills/bio-research-instrument-data-to-allotrope/references/supported_instruments.md +151 -0
- package/content/bio-research/skills/bio-research-instrument-data-to-allotrope/requirements.txt +26 -0
- package/content/bio-research/skills/bio-research-instrument-data-to-allotrope/scripts/convert_to_asm.py +543 -0
- package/content/bio-research/skills/bio-research-instrument-data-to-allotrope/scripts/export_parser.py +481 -0
- package/content/bio-research/skills/bio-research-instrument-data-to-allotrope/scripts/flatten_asm.py +254 -0
- package/content/bio-research/skills/bio-research-instrument-data-to-allotrope/scripts/validate_asm.py +1102 -0
- package/content/bio-research/skills/bio-research-nextflow-development/LICENSE.txt +201 -0
- package/content/bio-research/skills/bio-research-nextflow-development/SKILL.md +290 -0
- package/content/bio-research/skills/bio-research-nextflow-development/references/geo-sra-acquisition.md +416 -0
- package/content/bio-research/skills/bio-research-nextflow-development/references/installation.md +96 -0
- package/content/bio-research/skills/bio-research-nextflow-development/references/pipelines/atacseq.md +138 -0
- package/content/bio-research/skills/bio-research-nextflow-development/references/pipelines/rnaseq.md +118 -0
- package/content/bio-research/skills/bio-research-nextflow-development/references/pipelines/sarek.md +145 -0
- package/content/bio-research/skills/bio-research-nextflow-development/references/troubleshooting.md +137 -0
- package/content/bio-research/skills/bio-research-nextflow-development/scripts/check_environment.py +452 -0
- package/content/bio-research/skills/bio-research-nextflow-development/scripts/config/genomes.yaml +148 -0
- package/content/bio-research/skills/bio-research-nextflow-development/scripts/config/pipelines/atacseq.yaml +187 -0
- package/content/bio-research/skills/bio-research-nextflow-development/scripts/config/pipelines/rnaseq.yaml +147 -0
- package/content/bio-research/skills/bio-research-nextflow-development/scripts/config/pipelines/sarek.yaml +233 -0
- package/content/bio-research/skills/bio-research-nextflow-development/scripts/detect_data_type.py +300 -0
- package/content/bio-research/skills/bio-research-nextflow-development/scripts/generate_samplesheet.py +455 -0
- package/content/bio-research/skills/bio-research-nextflow-development/scripts/manage_genomes.py +521 -0
- package/content/bio-research/skills/bio-research-nextflow-development/scripts/sra_geo_fetch.py +732 -0
- package/content/bio-research/skills/bio-research-nextflow-development/scripts/utils/__init__.py +69 -0
- package/content/bio-research/skills/bio-research-nextflow-development/scripts/utils/file_discovery.py +189 -0
- package/content/bio-research/skills/bio-research-nextflow-development/scripts/utils/ncbi_utils.py +808 -0
- package/content/bio-research/skills/bio-research-nextflow-development/scripts/utils/sample_inference.py +290 -0
- package/content/bio-research/skills/bio-research-nextflow-development/scripts/utils/validators.py +256 -0
- package/content/bio-research/skills/bio-research-scientific-problem-selection/LICENSE.txt +201 -0
- package/content/bio-research/skills/bio-research-scientific-problem-selection/SKILL.md +269 -0
- package/content/bio-research/skills/bio-research-scientific-problem-selection/references/01-intuition-pumps.md +264 -0
- package/content/bio-research/skills/bio-research-scientific-problem-selection/references/02-risk-assessment.md +323 -0
- package/content/bio-research/skills/bio-research-scientific-problem-selection/references/03-optimization-function.md +481 -0
- package/content/bio-research/skills/bio-research-scientific-problem-selection/references/04-parameter-strategy.md +396 -0
- package/content/bio-research/skills/bio-research-scientific-problem-selection/references/05-decision-tree.md +85 -0
- package/content/bio-research/skills/bio-research-scientific-problem-selection/references/06-adversity-planning.md +123 -0
- package/content/bio-research/skills/bio-research-scientific-problem-selection/references/07-problem-inversion.md +152 -0
- package/content/bio-research/skills/bio-research-scientific-problem-selection/references/08-integration-synthesis.md +173 -0
- package/content/bio-research/skills/bio-research-scientific-problem-selection/references/09-meta-framework.md +504 -0
- package/content/bio-research/skills/bio-research-scvi-tools/LICENSE.txt +201 -0
- package/content/bio-research/skills/bio-research-scvi-tools/SKILL.md +155 -0
- package/content/bio-research/skills/bio-research-scvi-tools/references/atac_peakvi.md +398 -0
- package/content/bio-research/skills/bio-research-scvi-tools/references/batch_correction_sysvi.md +417 -0
- package/content/bio-research/skills/bio-research-scvi-tools/references/citeseq_totalvi.md +420 -0
- package/content/bio-research/skills/bio-research-scvi-tools/references/data_preparation.md +286 -0
- package/content/bio-research/skills/bio-research-scvi-tools/references/environment_setup.md +254 -0
- package/content/bio-research/skills/bio-research-scvi-tools/references/label_transfer.md +373 -0
- package/content/bio-research/skills/bio-research-scvi-tools/references/multiome_multivi.md +384 -0
- package/content/bio-research/skills/bio-research-scvi-tools/references/rna_velocity_velovi.md +410 -0
- package/content/bio-research/skills/bio-research-scvi-tools/references/scarches_mapping.md +401 -0
- package/content/bio-research/skills/bio-research-scvi-tools/references/scrna_integration.md +429 -0
- package/content/bio-research/skills/bio-research-scvi-tools/references/spatial_deconvolution.md +438 -0
- package/content/bio-research/skills/bio-research-scvi-tools/references/troubleshooting.md +420 -0
- package/content/bio-research/skills/bio-research-scvi-tools/scripts/cluster_embed.py +212 -0
- package/content/bio-research/skills/bio-research-scvi-tools/scripts/differential_expression.py +220 -0
- package/content/bio-research/skills/bio-research-scvi-tools/scripts/integrate_datasets.py +237 -0
- package/content/bio-research/skills/bio-research-scvi-tools/scripts/model_utils.py +634 -0
- package/content/bio-research/skills/bio-research-scvi-tools/scripts/prepare_data.py +169 -0
- package/content/bio-research/skills/bio-research-scvi-tools/scripts/train_model.py +370 -0
- package/content/bio-research/skills/bio-research-scvi-tools/scripts/transfer_labels.py +224 -0
- package/content/bio-research/skills/bio-research-scvi-tools/scripts/validate_adata.py +397 -0
- package/content/bio-research/skills/bio-research-single-cell-rna-qc/LICENSE.txt +201 -0
- package/content/bio-research/skills/bio-research-single-cell-rna-qc/SKILL.md +175 -0
- package/content/bio-research/skills/bio-research-single-cell-rna-qc/references/scverse_qc_guidelines.md +186 -0
- package/content/bio-research/skills/bio-research-single-cell-rna-qc/scripts/qc_analysis.py +232 -0
- package/content/bio-research/skills/bio-research-single-cell-rna-qc/scripts/qc_core.py +233 -0
- package/content/bio-research/skills/bio-research-single-cell-rna-qc/scripts/qc_plotting.py +235 -0
- package/content/bio-research/skills/bio-research-start/SKILL.md +79 -0
- package/content/customer-support/.mcp.json +40 -0
- package/content/customer-support/CONNECTORS.md +19 -0
- package/content/customer-support/LICENSE +202 -0
- package/content/customer-support/README.md +140 -0
- package/content/customer-support/skills/customer-support-customer-escalation/SKILL.md +248 -0
- package/content/customer-support/skills/customer-support-customer-research/SKILL.md +252 -0
- package/content/customer-support/skills/customer-support-draft-response/SKILL.md +418 -0
- package/content/customer-support/skills/customer-support-kb-article/SKILL.md +351 -0
- package/content/customer-support/skills/customer-support-ticket-triage/SKILL.md +275 -0
- package/content/data/.mcp.json +36 -0
- package/content/data/CONNECTORS.md +18 -0
- package/content/data/LICENSE +202 -0
- package/content/data/README.md +121 -0
- package/content/data/skills/data-analyze/SKILL.md +119 -0
- package/content/data/skills/data-build-dashboard/SKILL.md +924 -0
- package/content/data/skills/data-create-viz/SKILL.md +154 -0
- package/content/data/skills/data-data-context-extractor/SKILL.md +227 -0
- package/content/data/skills/data-data-context-extractor/references/domain-template.md +147 -0
- package/content/data/skills/data-data-context-extractor/references/example-output.md +198 -0
- package/content/data/skills/data-data-context-extractor/references/skill-template.md +148 -0
- package/content/data/skills/data-data-context-extractor/references/sql-dialects.md +121 -0
- package/content/data/skills/data-data-context-extractor/scripts/package_data_skill.py +126 -0
- package/content/data/skills/data-data-visualization/SKILL.md +305 -0
- package/content/data/skills/data-explore-data/SKILL.md +325 -0
- package/content/data/skills/data-sql-queries/SKILL.md +428 -0
- package/content/data/skills/data-statistical-analysis/SKILL.md +245 -0
- package/content/data/skills/data-validate-data/SKILL.md +383 -0
- package/content/data/skills/data-write-query/SKILL.md +122 -0
- package/content/design/.mcp.json +44 -0
- package/content/design/CONNECTORS.md +18 -0
- package/content/design/README.md +117 -0
- package/content/design/skills/design-accessibility-review/SKILL.md +128 -0
- package/content/design/skills/design-design-critique/SKILL.md +118 -0
- package/content/design/skills/design-design-handoff/SKILL.md +131 -0
- package/content/design/skills/design-design-system/SKILL.md +190 -0
- package/content/design/skills/design-research-synthesis/SKILL.md +92 -0
- package/content/design/skills/design-user-research/SKILL.md +41 -0
- package/content/design/skills/design-ux-copy/SKILL.md +107 -0
- package/content/engineering/.mcp.json +48 -0
- package/content/engineering/CONNECTORS.md +19 -0
- package/content/engineering/README.md +136 -0
- package/content/engineering/skills/engineering-architecture/SKILL.md +85 -0
- package/content/engineering/skills/engineering-code-review/SKILL.md +118 -0
- package/content/engineering/skills/engineering-debug/SKILL.md +95 -0
- package/content/engineering/skills/engineering-deploy-checklist/SKILL.md +78 -0
- package/content/engineering/skills/engineering-documentation/SKILL.md +49 -0
- package/content/engineering/skills/engineering-incident-response/SKILL.md +158 -0
- package/content/engineering/skills/engineering-standup/SKILL.md +75 -0
- package/content/engineering/skills/engineering-system-design/SKILL.md +42 -0
- package/content/engineering/skills/engineering-tech-debt/SKILL.md +32 -0
- package/content/engineering/skills/engineering-testing-strategy/SKILL.md +33 -0
- package/content/enterprise-search/.mcp.json +36 -0
- package/content/enterprise-search/CONNECTORS.md +21 -0
- package/content/enterprise-search/LICENSE +202 -0
- package/content/enterprise-search/README.md +157 -0
- package/content/enterprise-search/skills/enterprise-search-digest/SKILL.md +173 -0
- package/content/enterprise-search/skills/enterprise-search-knowledge-synthesis/SKILL.md +258 -0
- package/content/enterprise-search/skills/enterprise-search-search/SKILL.md +178 -0
- package/content/enterprise-search/skills/enterprise-search-search-strategy/SKILL.md +222 -0
- package/content/enterprise-search/skills/enterprise-search-source-management/SKILL.md +173 -0
- package/content/finance/.mcp.json +32 -0
- package/content/finance/CONNECTORS.md +20 -0
- package/content/finance/LICENSE +202 -0
- package/content/finance/README.md +92 -0
- package/content/finance/skills/finance-audit-support/SKILL.md +374 -0
- package/content/finance/skills/finance-close-management/SKILL.md +221 -0
- package/content/finance/skills/finance-financial-statements/SKILL.md +335 -0
- package/content/finance/skills/finance-journal-entry/SKILL.md +131 -0
- package/content/finance/skills/finance-journal-entry-prep/SKILL.md +186 -0
- package/content/finance/skills/finance-reconciliation/SKILL.md +175 -0
- package/content/finance/skills/finance-sox-testing/SKILL.md +218 -0
- package/content/finance/skills/finance-variance-analysis/SKILL.md +266 -0
- package/content/human-resources/.mcp.json +28 -0
- package/content/human-resources/CONNECTORS.md +19 -0
- package/content/human-resources/README.md +138 -0
- package/content/human-resources/skills/human-resources-comp-analysis/SKILL.md +92 -0
- package/content/human-resources/skills/human-resources-draft-offer/SKILL.md +82 -0
- package/content/human-resources/skills/human-resources-interview-prep/SKILL.md +37 -0
- package/content/human-resources/skills/human-resources-onboarding/SKILL.md +104 -0
- package/content/human-resources/skills/human-resources-org-planning/SKILL.md +28 -0
- package/content/human-resources/skills/human-resources-people-report/SKILL.md +99 -0
- package/content/human-resources/skills/human-resources-performance-review/SKILL.md +149 -0
- package/content/human-resources/skills/human-resources-policy-lookup/SKILL.md +94 -0
- package/content/human-resources/skills/human-resources-recruiting-pipeline/SKILL.md +31 -0
- package/content/legal/.mcp.json +36 -0
- package/content/legal/CONNECTORS.md +21 -0
- package/content/legal/LICENSE +202 -0
- package/content/legal/README.md +234 -0
- package/content/legal/skills/legal-brief/SKILL.md +208 -0
- package/content/legal/skills/legal-compliance-check/SKILL.md +274 -0
- package/content/legal/skills/legal-legal-response/SKILL.md +457 -0
- package/content/legal/skills/legal-legal-risk-assessment/SKILL.md +265 -0
- package/content/legal/skills/legal-meeting-briefing/SKILL.md +220 -0
- package/content/legal/skills/legal-review-contract/SKILL.md +358 -0
- package/content/legal/skills/legal-signature-request/SKILL.md +104 -0
- package/content/legal/skills/legal-triage-nda/SKILL.md +262 -0
- package/content/legal/skills/legal-vendor-check/SKILL.md +159 -0
- package/content/manifest.json +86 -0
- package/content/marketing/.mcp.json +60 -0
- package/content/marketing/CONNECTORS.md +20 -0
- package/content/marketing/LICENSE +202 -0
- package/content/marketing/README.md +90 -0
- package/content/marketing/skills/marketing-brand-review/SKILL.md +276 -0
- package/content/marketing/skills/marketing-campaign-plan/SKILL.md +308 -0
- package/content/marketing/skills/marketing-competitive-brief/SKILL.md +331 -0
- package/content/marketing/skills/marketing-content-creation/SKILL.md +157 -0
- package/content/marketing/skills/marketing-draft-content/SKILL.md +117 -0
- package/content/marketing/skills/marketing-email-sequence/SKILL.md +220 -0
- package/content/marketing/skills/marketing-performance-report/SKILL.md +392 -0
- package/content/marketing/skills/marketing-seo-audit/SKILL.md +190 -0
- package/content/operations/.mcp.json +32 -0
- package/content/operations/CONNECTORS.md +20 -0
- package/content/operations/README.md +135 -0
- package/content/operations/skills/operations-capacity-plan/SKILL.md +113 -0
- package/content/operations/skills/operations-change-request/SKILL.md +121 -0
- package/content/operations/skills/operations-compliance-tracking/SKILL.md +44 -0
- package/content/operations/skills/operations-process-doc/SKILL.md +82 -0
- package/content/operations/skills/operations-process-optimization/SKILL.md +39 -0
- package/content/operations/skills/operations-risk-assessment/SKILL.md +40 -0
- package/content/operations/skills/operations-runbook/SKILL.md +87 -0
- package/content/operations/skills/operations-status-report/SKILL.md +77 -0
- package/content/operations/skills/operations-vendor-review/SKILL.md +104 -0
- package/content/pdf-viewer/.mcp.json +8 -0
- package/content/pdf-viewer/CONNECTORS.md +15 -0
- package/content/pdf-viewer/LICENSE +202 -0
- package/content/pdf-viewer/README.md +57 -0
- package/content/pdf-viewer/commands/annotate.md +51 -0
- package/content/pdf-viewer/commands/fill-form.md +73 -0
- package/content/pdf-viewer/commands/open.md +34 -0
- package/content/pdf-viewer/commands/sign.md +54 -0
- package/content/pdf-viewer/skills/pdf-viewer-view-pdf/SKILL.md +147 -0
- package/content/product-management/.mcp.json +72 -0
- package/content/product-management/CONNECTORS.md +22 -0
- package/content/product-management/LICENSE +202 -0
- package/content/product-management/README.md +118 -0
- package/content/product-management/commands/brainstorm.md +120 -0
- package/content/product-management/skills/product-management-competitive-brief/SKILL.md +302 -0
- package/content/product-management/skills/product-management-metrics-review/SKILL.md +388 -0
- package/content/product-management/skills/product-management-product-brainstorming/SKILL.md +273 -0
- package/content/product-management/skills/product-management-roadmap-update/SKILL.md +266 -0
- package/content/product-management/skills/product-management-sprint-planning/SKILL.md +94 -0
- package/content/product-management/skills/product-management-stakeholder-update/SKILL.md +352 -0
- package/content/product-management/skills/product-management-synthesize-research/SKILL.md +312 -0
- package/content/product-management/skills/product-management-write-spec/SKILL.md +250 -0
- package/content/productivity/.mcp.json +44 -0
- package/content/productivity/CONNECTORS.md +18 -0
- package/content/productivity/LICENSE +202 -0
- package/content/productivity/README.md +97 -0
- package/content/productivity/skills/dashboard.html +3111 -0
- package/content/productivity/skills/productivity-memory-management/SKILL.md +323 -0
- package/content/productivity/skills/productivity-start/SKILL.md +158 -0
- package/content/productivity/skills/productivity-task-management/SKILL.md +91 -0
- package/content/productivity/skills/productivity-update/SKILL.md +168 -0
- package/content/sales/.mcp.json +100 -0
- package/content/sales/CONNECTORS.md +36 -0
- package/content/sales/LICENSE +202 -0
- package/content/sales/README.md +148 -0
- package/content/sales/skills/sales-account-context/SKILL.md +94 -0
- package/content/sales/skills/sales-account-plan/SKILL.md +95 -0
- package/content/sales/skills/sales-account-research/SKILL.md +99 -0
- package/content/sales/skills/sales-account-tiering/SKILL.md +101 -0
- package/content/sales/skills/sales-call-prep/SKILL.md +111 -0
- package/content/sales/skills/sales-call-summary/SKILL.md +111 -0
- package/content/sales/skills/sales-close-plan/SKILL.md +106 -0
- package/content/sales/skills/sales-competitive-intelligence/SKILL.md +102 -0
- package/content/sales/skills/sales-create-an-asset/SKILL.md +105 -0
- package/content/sales/skills/sales-crm-hygiene-check/SKILL.md +103 -0
- package/content/sales/skills/sales-customer-health/SKILL.md +108 -0
- package/content/sales/skills/sales-customer-voice/SKILL.md +94 -0
- package/content/sales/skills/sales-daily-briefing/SKILL.md +61 -0
- package/content/sales/skills/sales-deal-advance-gap/SKILL.md +102 -0
- package/content/sales/skills/sales-deal-review/SKILL.md +105 -0
- package/content/sales/skills/sales-deal-signals/SKILL.md +96 -0
- package/content/sales/skills/sales-deal-slip-scenario/SKILL.md +101 -0
- package/content/sales/skills/sales-draft-outreach/SKILL.md +116 -0
- package/content/sales/skills/sales-end-of-day/SKILL.md +114 -0
- package/content/sales/skills/sales-expansion-whitespace/SKILL.md +97 -0
- package/content/sales/skills/sales-forecast/SKILL.md +100 -0
- package/content/sales/skills/sales-handle-objection/SKILL.md +93 -0
- package/content/sales/skills/sales-inbox-sweep/SKILL.md +114 -0
- package/content/sales/skills/sales-lead-triage/SKILL.md +105 -0
- package/content/sales/skills/sales-log-activity/SKILL.md +111 -0
- package/content/sales/skills/sales-pipeline-review/SKILL.md +97 -0
- package/content/sales/skills/sales-renewal-radar/SKILL.md +95 -0
- package/content/sales/skills/sales-rep-context/SKILL.md +90 -0
- package/content/sales/skills/sales-route-lead/SKILL.md +111 -0
- package/content/sales/skills/sales-schedule-meeting/SKILL.md +99 -0
- package/content/sales/skills/sales-setup/SKILL.md +195 -0
- package/content/sales/skills/sales-stakeholder-map/SKILL.md +107 -0
- package/content/sales/skills/sales-team-pipeline/SKILL.md +105 -0
- package/content/sales/skills/sales-update-opportunity/SKILL.md +111 -0
- package/content/sales/skills/sales-weekly-wrap/SKILL.md +90 -0
- package/content/sales/skills/sales-win-loss-review/SKILL.md +88 -0
- package/content/small-business/.mcp.json +148 -0
- package/content/small-business/README.md +117 -0
- package/content/small-business/skills/small-business-ad-manager/SKILL.md +128 -0
- package/content/small-business/skills/small-business-ad-manager/reference/ad_copy.md +112 -0
- package/content/small-business/skills/small-business-ad-manager/reference/change_playbook.md +127 -0
- package/content/small-business/skills/small-business-ad-manager/reference/data_sources.md +100 -0
- package/content/small-business/skills/small-business-ad-manager/reference/diagnostics.md +89 -0
- package/content/small-business/skills/small-business-ad-manager/reference/gotchas.md +181 -0
- package/content/small-business/skills/small-business-ap-processor/SKILL.md +158 -0
- package/content/small-business/skills/small-business-ap-processor/reference/coding_rules.md +70 -0
- package/content/small-business/skills/small-business-ap-processor/reference/gotchas.md +131 -0
- package/content/small-business/skills/small-business-ap-processor/reference/intake_and_extraction.md +82 -0
- package/content/small-business/skills/small-business-ap-processor/reference/matching_and_exceptions.md +80 -0
- package/content/small-business/skills/small-business-ap-processor/reference/payment_run.md +77 -0
- package/content/small-business/skills/small-business-brand-style/SKILL.md +106 -0
- package/content/small-business/skills/small-business-build-agent/SKILL.md +105 -0
- package/content/small-business/skills/small-business-build-agent/reference/capture.md +133 -0
- package/content/small-business/skills/small-business-build-agent/reference/gotchas.md +204 -0
- package/content/small-business/skills/small-business-build-agent/reference/skill_authoring.md +165 -0
- package/content/small-business/skills/small-business-build-connector/SKILL.md +102 -0
- package/content/small-business/skills/small-business-build-connector/reference/discovery.md +120 -0
- package/content/small-business/skills/small-business-build-connector/reference/gotchas.md +237 -0
- package/content/small-business/skills/small-business-build-connector/reference/paths.md +106 -0
- package/content/small-business/skills/small-business-build-connector/reference/use-zapier.md +128 -0
- package/content/small-business/skills/small-business-business-pulse/SKILL.md +181 -0
- package/content/small-business/skills/small-business-business-pulse/reference/data_sources.md +173 -0
- package/content/small-business/skills/small-business-business-pulse/reference/gotchas.md +103 -0
- package/content/small-business/skills/small-business-business-pulse/reference/output_template.md +109 -0
- package/content/small-business/skills/small-business-business-pulse/reference/thresholds.md +71 -0
- package/content/small-business/skills/small-business-business-pulse/reference/v2_sources.md +63 -0
- package/content/small-business/skills/small-business-call-list/SKILL.md +82 -0
- package/content/small-business/skills/small-business-canva-creator/SKILL.md +448 -0
- package/content/small-business/skills/small-business-canva-creator/reference/canva-api.md +208 -0
- package/content/small-business/skills/small-business-canva-creator/reference/examples/boutique-brief-campaign.md +181 -0
- package/content/small-business/skills/small-business-canva-creator/reference/gotchas.md +380 -0
- package/content/small-business/skills/small-business-canva-creator/reference/hubspot-staging.md +137 -0
- package/content/small-business/skills/small-business-cash-flow-snapshot/SKILL.md +251 -0
- package/content/small-business/skills/small-business-cash-flow-snapshot/reference/examples/worked-example.md +92 -0
- package/content/small-business/skills/small-business-cash-flow-snapshot/reference/gotchas.md +62 -0
- package/content/small-business/skills/small-business-cash-flow-snapshot/reference/v2_sources.md +84 -0
- package/content/small-business/skills/small-business-close-month/SKILL.md +86 -0
- package/content/small-business/skills/small-business-content-strategy/SKILL.md +152 -0
- package/content/small-business/skills/small-business-content-strategy/reference/examples/retail-boutique-example.md +71 -0
- package/content/small-business/skills/small-business-content-strategy/reference/gotchas.md +104 -0
- package/content/small-business/skills/small-business-content-strategy/reference/v2_sources.md +40 -0
- package/content/small-business/skills/small-business-contract-review/SKILL.md +158 -0
- package/content/small-business/skills/small-business-contract-review/reference/docusign-fetch.md +32 -0
- package/content/small-business/skills/small-business-contract-review/reference/examples/flagged-summary-saas.md +97 -0
- package/content/small-business/skills/small-business-contract-review/reference/gmail-fetch.md +30 -0
- package/content/small-business/skills/small-business-contract-review/reference/gotchas.md +105 -0
- package/content/small-business/skills/small-business-contract-review/reference/m365-fetch.md +60 -0
- package/content/small-business/skills/small-business-crm-autopilot/SKILL.md +162 -0
- package/content/small-business/skills/small-business-crm-autopilot/reference/cleanup-checklist.md +82 -0
- package/content/small-business/skills/small-business-crm-autopilot/reference/examples/cleanup-deal.md +83 -0
- package/content/small-business/skills/small-business-crm-autopilot/reference/examples/log-call-happy-path.md +68 -0
- package/content/small-business/skills/small-business-crm-autopilot/reference/examples/log-email-happy-path.md +50 -0
- package/content/small-business/skills/small-business-crm-autopilot/reference/gotchas.md +110 -0
- package/content/small-business/skills/small-business-crm-autopilot/reference/hubspot-fields.md +62 -0
- package/content/small-business/skills/small-business-crm-autopilot/reference/lightweight_crm.md +125 -0
- package/content/small-business/skills/small-business-crm-autopilot/reference/salesforce-fields.md +122 -0
- package/content/small-business/skills/small-business-crm-autopilot/reference/standing_mode.md +144 -0
- package/content/small-business/skills/small-business-grant-rfp-writer/SKILL.md +162 -0
- package/content/small-business/skills/small-business-grant-rfp-writer/reference/drafting.md +129 -0
- package/content/small-business/skills/small-business-grant-rfp-writer/reference/go_no_go.md +125 -0
- package/content/small-business/skills/small-business-grant-rfp-writer/reference/gotchas.md +180 -0
- package/content/small-business/skills/small-business-grant-rfp-writer/reference/opportunity_sources.md +90 -0
- package/content/small-business/skills/small-business-grant-rfp-writer/reference/org_profile.md +81 -0
- package/content/small-business/skills/small-business-grow-pipeline/SKILL.md +92 -0
- package/content/small-business/skills/small-business-growth-pulse/SKILL.md +143 -0
- package/content/small-business/skills/small-business-growth-pulse/reference/data_sources.md +113 -0
- package/content/small-business/skills/small-business-growth-pulse/reference/gotchas.md +175 -0
- package/content/small-business/skills/small-business-growth-pulse/reference/output_template.md +122 -0
- package/content/small-business/skills/small-business-growth-pulse/reference/thresholds.md +110 -0
- package/content/small-business/skills/small-business-hiring-screener/SKILL.md +137 -0
- package/content/small-business/skills/small-business-hiring-screener/reference/candidate_comms.md +132 -0
- package/content/small-business/skills/small-business-hiring-screener/reference/fair_screening.md +103 -0
- package/content/small-business/skills/small-business-hiring-screener/reference/gotchas.md +183 -0
- package/content/small-business/skills/small-business-hiring-screener/reference/onboarding.md +82 -0
- package/content/small-business/skills/small-business-hiring-screener/reference/rubric.md +122 -0
- package/content/small-business/skills/small-business-inbox-manager/SKILL.md +130 -0
- package/content/small-business/skills/small-business-inbox-manager/reference/digest_format.md +110 -0
- package/content/small-business/skills/small-business-inbox-manager/reference/gotchas.md +220 -0
- package/content/small-business/skills/small-business-inbox-manager/reference/handoffs.md +77 -0
- package/content/small-business/skills/small-business-inbox-manager/reference/reply_drafting.md +116 -0
- package/content/small-business/skills/small-business-inbox-manager/reference/triage_rules.md +72 -0
- package/content/small-business/skills/small-business-inventory-planner/SKILL.md +126 -0
- package/content/small-business/skills/small-business-inventory-planner/reference/data_sources.md +94 -0
- package/content/small-business/skills/small-business-inventory-planner/reference/gotchas.md +153 -0
- package/content/small-business/skills/small-business-inventory-planner/reference/po_drafting.md +92 -0
- package/content/small-business/skills/small-business-inventory-planner/reference/seasonality.md +112 -0
- package/content/small-business/skills/small-business-inventory-planner/reference/velocity_and_reorder.md +154 -0
- package/content/small-business/skills/small-business-invoice-chase/SKILL.md +131 -0
- package/content/small-business/skills/small-business-invoice-chase/reference/examples/firm-reminder.md +28 -0
- package/content/small-business/skills/small-business-invoice-chase/reference/examples/gentle-reminder.md +27 -0
- package/content/small-business/skills/small-business-invoice-chase/reference/gotchas.md +75 -0
- package/content/small-business/skills/small-business-invoice-chase/reference/tone-matching.md +44 -0
- package/content/small-business/skills/small-business-invoice-chase/reference/v2_sources.md +78 -0
- package/content/small-business/skills/small-business-job-post-builder/SKILL.md +204 -0
- package/content/small-business/skills/small-business-job-post-builder/reference/docusign-routing.md +63 -0
- package/content/small-business/skills/small-business-job-post-builder/reference/examples/worked-example.md +110 -0
- package/content/small-business/skills/small-business-job-post-builder/reference/existing-document-merge.md +58 -0
- package/content/small-business/skills/small-business-job-post-builder/reference/gotchas.md +68 -0
- package/content/small-business/skills/small-business-job-post-builder/reference/interview-guide-structure.md +93 -0
- package/content/small-business/skills/small-business-job-post-builder/reference/job-post-structure.md +62 -0
- package/content/small-business/skills/small-business-job-post-builder/reference/offer-letter-template.md +145 -0
- package/content/small-business/skills/small-business-job-post-builder/reference/role-intake.md +73 -0
- package/content/small-business/skills/small-business-lead-finder/SKILL.md +119 -0
- package/content/small-business/skills/small-business-lead-finder/reference/gotchas.md +152 -0
- package/content/small-business/skills/small-business-lead-finder/reference/icp_method.md +97 -0
- package/content/small-business/skills/small-business-lead-finder/reference/output_template.md +124 -0
- package/content/small-business/skills/small-business-lead-finder/reference/scoring.md +92 -0
- package/content/small-business/skills/small-business-lead-finder/reference/sourcing.md +78 -0
- package/content/small-business/skills/small-business-lead-triage/SKILL.md +81 -0
- package/content/small-business/skills/small-business-lead-triage/reference/examples/happy-path-triage.md +68 -0
- package/content/small-business/skills/small-business-lead-triage/reference/gotchas.md +76 -0
- package/content/small-business/skills/small-business-lead-triage/reference/hubspot-scoring.md +169 -0
- package/content/small-business/skills/small-business-marketing-monday/SKILL.md +108 -0
- package/content/small-business/skills/small-business-monday-brief/SKILL.md +97 -0
- package/content/small-business/skills/small-business-month-end-prep/SKILL.md +331 -0
- package/content/small-business/skills/small-business-month-end-prep/reference/close-packet-format.md +127 -0
- package/content/small-business/skills/small-business-month-end-prep/reference/examples/pl-narrative.md +52 -0
- package/content/small-business/skills/small-business-month-end-prep/reference/gotchas.md +113 -0
- package/content/small-business/skills/small-business-month-end-prep/reference/paypal-settlements.md +110 -0
- package/content/small-business/skills/small-business-month-end-prep/reference/quickbooks-reconcile.md +71 -0
- package/content/small-business/skills/small-business-month-end-prep/reference/v2_sources.md +125 -0
- package/content/small-business/skills/small-business-month-end-prep/reference/xero-reconcile.md +175 -0
- package/content/small-business/skills/small-business-month-end-prep/reference/zoho-books-reconcile.md +168 -0
- package/content/small-business/skills/small-business-outreach-composer/SKILL.md +144 -0
- package/content/small-business/skills/small-business-outreach-composer/reference/gotchas.md +213 -0
- package/content/small-business/skills/small-business-outreach-composer/reference/output_template.md +147 -0
- package/content/small-business/skills/small-business-outreach-composer/reference/sequence_patterns.md +99 -0
- package/content/small-business/skills/small-business-outreach-composer/reference/slop_test.md +164 -0
- package/content/small-business/skills/small-business-pay-the-bills/SKILL.md +101 -0
- package/content/small-business/skills/small-business-payroll-prep/SKILL.md +139 -0
- package/content/small-business/skills/small-business-payroll-prep/reference/anomaly_rules.md +99 -0
- package/content/small-business/skills/small-business-payroll-prep/reference/books_sync.md +72 -0
- package/content/small-business/skills/small-business-payroll-prep/reference/gotchas.md +153 -0
- package/content/small-business/skills/small-business-payroll-prep/reference/run_sheet_format.md +90 -0
- package/content/small-business/skills/small-business-payroll-prep/reference/timesheet_intake.md +118 -0
- package/content/small-business/skills/small-business-plan-payroll/SKILL.md +88 -0
- package/content/small-business/skills/small-business-proposal-builder/SKILL.md +168 -0
- package/content/small-business/skills/small-business-proposal-builder/reference/discovery_extraction.md +138 -0
- package/content/small-business/skills/small-business-proposal-builder/reference/gotchas.md +184 -0
- package/content/small-business/skills/small-business-proposal-builder/reference/output_template.md +128 -0
- package/content/small-business/skills/small-business-proposal-builder/reference/pricing_method.md +125 -0
- package/content/small-business/skills/small-business-proposal-builder/reference/proposal_structure.md +120 -0
- package/content/small-business/skills/small-business-reactivate/SKILL.md +109 -0
- package/content/small-business/skills/small-business-report-builder/SKILL.md +142 -0
- package/content/small-business/skills/small-business-report-builder/reference/data_sources.md +168 -0
- package/content/small-business/skills/small-business-report-builder/reference/gotchas.md +155 -0
- package/content/small-business/skills/small-business-report-builder/reference/output_template.md +109 -0
- package/content/small-business/skills/small-business-report-builder/reference/report_spec.md +109 -0
- package/content/small-business/skills/small-business-report-builder/reference/saved_reports.md +50 -0
- package/content/small-business/skills/small-business-report-pack/SKILL.md +83 -0
- package/content/small-business/skills/small-business-restock/SKILL.md +88 -0
- package/content/small-business/skills/small-business-review-reputation/SKILL.md +130 -0
- package/content/small-business/skills/small-business-review-reputation/reference/churn-signals.md +110 -0
- package/content/small-business/skills/small-business-review-reputation/reference/examples/example-report.md +150 -0
- package/content/small-business/skills/small-business-review-reputation/reference/gotchas.md +164 -0
- package/content/small-business/skills/small-business-review-reputation/reference/response-patterns.md +123 -0
- package/content/small-business/skills/small-business-review-reputation/reference/sources.md +116 -0
- package/content/small-business/skills/small-business-seo-ai-visibility/SKILL.md +143 -0
- package/content/small-business/skills/small-business-seo-ai-visibility/reference/ai_visibility.md +173 -0
- package/content/small-business/skills/small-business-seo-ai-visibility/reference/audit_checklist.md +134 -0
- package/content/small-business/skills/small-business-seo-ai-visibility/reference/catalog_refresh.md +126 -0
- package/content/small-business/skills/small-business-seo-ai-visibility/reference/content_rewrite.md +113 -0
- package/content/small-business/skills/small-business-seo-ai-visibility/reference/gotchas.md +211 -0
- package/content/small-business/skills/small-business-smb-onboard/SKILL.md +82 -0
- package/content/small-business/skills/small-business-smb-onboard/reference/examples/happy-path.md +190 -0
- package/content/small-business/skills/small-business-smb-onboard/reference/gotchas.md +111 -0
- package/content/small-business/skills/small-business-smb-onboard/reference/onboard-checklist.md +99 -0
- package/content/small-business/skills/small-business-smb-onboard/reference/website-research.md +82 -0
- package/content/small-business/skills/small-business-smb-router/SKILL.md +216 -0
- package/content/small-business/skills/small-business-smb-router/reference/connector-map.md +96 -0
- package/content/small-business/skills/small-business-social-content-engine/SKILL.md +162 -0
- package/content/small-business/skills/small-business-social-content-engine/reference/calendar.md +116 -0
- package/content/small-business/skills/small-business-social-content-engine/reference/canva-api.md +208 -0
- package/content/small-business/skills/small-business-social-content-engine/reference/examples/okonkwo-campaign.md +190 -0
- package/content/small-business/skills/small-business-social-content-engine/reference/gotchas.md +447 -0
- package/content/small-business/skills/small-business-social-content-engine/reference/publishing.md +166 -0
- package/content/small-business/skills/small-business-social-content-engine/reference/shopify-assets.md +77 -0
- package/content/small-business/skills/small-business-speed-to-lead/SKILL.md +172 -0
- package/content/small-business/skills/small-business-speed-to-lead/reference/approval.md +61 -0
- package/content/small-business/skills/small-business-speed-to-lead/reference/gotchas.md +167 -0
- package/content/small-business/skills/small-business-speed-to-lead/reference/qualification.md +153 -0
- package/content/small-business/skills/small-business-speed-to-lead/reference/response_patterns.md +184 -0
- package/content/small-business/skills/small-business-tax-prep/SKILL.md +85 -0
- package/content/small-business/skills/small-business-tax-season-organizer/SKILL.md +210 -0
- package/content/small-business/skills/small-business-tax-season-organizer/reference/calculation-assumptions.md +177 -0
- package/content/small-business/skills/small-business-tax-season-organizer/reference/connector-queries.md +267 -0
- package/content/small-business/skills/small-business-tax-season-organizer/reference/examples/quarterly-estimate.md +92 -0
- package/content/small-business/skills/small-business-tax-season-organizer/reference/examples/year-end-1099.md +102 -0
- package/content/small-business/skills/small-business-tax-season-organizer/reference/gotchas.md +104 -0
- package/content/small-business/skills/small-business-tax-season-organizer/reference/output-formats.md +68 -0
- package/content/small-business/skills/small-business-ticket-deflector/SKILL.md +164 -0
- package/content/small-business/skills/small-business-ticket-deflector/reference/examples/deny-refund-request.md +98 -0
- package/content/small-business/skills/small-business-ticket-deflector/reference/examples/respond-refund-request.md +77 -0
- package/content/small-business/skills/small-business-ticket-deflector/reference/gotchas.md +57 -0
- package/index.ts +84 -0
- package/package.json +30 -3
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
# CITE-seq Analysis with totalVI
|
|
2
|
+
|
|
3
|
+
This reference covers multi-modal analysis of CITE-seq data (RNA + surface proteins) using totalVI.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
CITE-seq combines:
|
|
8
|
+
- scRNA-seq (transcriptome)
|
|
9
|
+
- Protein surface markers (antibody-derived tags, ADT)
|
|
10
|
+
|
|
11
|
+
totalVI jointly models both modalities to:
|
|
12
|
+
- Integrate across batches
|
|
13
|
+
- Denoise protein signal
|
|
14
|
+
- Learn joint latent representation
|
|
15
|
+
- Enable cross-modal imputation
|
|
16
|
+
|
|
17
|
+
## Prerequisites
|
|
18
|
+
|
|
19
|
+
```python
|
|
20
|
+
import scvi
|
|
21
|
+
import scanpy as sc
|
|
22
|
+
import mudata as md
|
|
23
|
+
import numpy as np
|
|
24
|
+
import pandas as pd
|
|
25
|
+
|
|
26
|
+
print(f"scvi-tools version: {scvi.__version__}")
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Step 1: Load CITE-seq Data
|
|
30
|
+
|
|
31
|
+
### From 10x Genomics (Cell Ranger)
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
# 10x outputs separate gene expression and feature barcoding
|
|
35
|
+
adata_rna = sc.read_10x_h5("filtered_feature_bc_matrix.h5", gex_only=False)
|
|
36
|
+
|
|
37
|
+
# Separate RNA and protein
|
|
38
|
+
adata_protein = adata_rna[:, adata_rna.var['feature_types'] == 'Antibody Capture'].copy()
|
|
39
|
+
adata_rna = adata_rna[:, adata_rna.var['feature_types'] == 'Gene Expression'].copy()
|
|
40
|
+
|
|
41
|
+
print(f"RNA: {adata_rna.shape}")
|
|
42
|
+
print(f"Protein: {adata_protein.shape}")
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### From MuData
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
# If data is in MuData format
|
|
49
|
+
mdata = md.read_h5mu("cite_seq.h5mu")
|
|
50
|
+
|
|
51
|
+
adata_rna = mdata['rna'].copy()
|
|
52
|
+
adata_protein = mdata['protein'].copy()
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Combine into Single AnnData
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
# totalVI expects protein data in obsm
|
|
59
|
+
adata = adata_rna.copy()
|
|
60
|
+
|
|
61
|
+
# Add protein expression to obsm
|
|
62
|
+
adata.obsm["protein_expression"] = adata_protein.X.toarray() if hasattr(adata_protein.X, 'toarray') else adata_protein.X
|
|
63
|
+
|
|
64
|
+
# Store protein names
|
|
65
|
+
adata.uns["protein_names"] = list(adata_protein.var_names)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Step 2: Quality Control
|
|
69
|
+
|
|
70
|
+
### RNA QC
|
|
71
|
+
|
|
72
|
+
```python
|
|
73
|
+
# Standard RNA QC
|
|
74
|
+
# Handle both human (MT-) and mouse (mt-, Mt-) mitochondrial genes
|
|
75
|
+
adata.var['mt'] = (
|
|
76
|
+
adata.var_names.str.startswith('MT-') |
|
|
77
|
+
adata.var_names.str.startswith('mt-') |
|
|
78
|
+
adata.var_names.str.startswith('Mt-')
|
|
79
|
+
)
|
|
80
|
+
sc.pp.calculate_qc_metrics(adata, qc_vars=['mt'], inplace=True)
|
|
81
|
+
|
|
82
|
+
# Filter cells
|
|
83
|
+
adata = adata[adata.obs['n_genes_by_counts'] > 200].copy()
|
|
84
|
+
adata = adata[adata.obs['pct_counts_mt'] < 20].copy()
|
|
85
|
+
|
|
86
|
+
# Filter genes
|
|
87
|
+
sc.pp.filter_genes(adata, min_cells=3)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Protein QC
|
|
91
|
+
|
|
92
|
+
```python
|
|
93
|
+
# Protein QC
|
|
94
|
+
protein_counts = adata.obsm["protein_expression"]
|
|
95
|
+
print(f"Protein counts per cell: min={protein_counts.sum(1).min():.0f}, max={protein_counts.sum(1).max():.0f}")
|
|
96
|
+
|
|
97
|
+
# Check for isotype controls
|
|
98
|
+
# Isotype controls should have low counts
|
|
99
|
+
protein_names = adata.uns["protein_names"]
|
|
100
|
+
for i, name in enumerate(protein_names):
|
|
101
|
+
if 'isotype' in name.lower() or 'control' in name.lower():
|
|
102
|
+
print(f"{name}: mean={protein_counts[:, i].mean():.1f}")
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Step 3: Data Preparation
|
|
106
|
+
|
|
107
|
+
### Store Raw Counts
|
|
108
|
+
|
|
109
|
+
```python
|
|
110
|
+
# Store RNA counts
|
|
111
|
+
adata.layers["counts"] = adata.X.copy()
|
|
112
|
+
|
|
113
|
+
# Protein must be raw ADT counts (NOT CLR-normalized)
|
|
114
|
+
# WARNING: If importing from Seurat, ensure you use raw counts, not CLR-normalized data
|
|
115
|
+
# Seurat's NormalizeData(normalization.method = "CLR") transforms counts - use the original assay
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### HVG Selection for RNA
|
|
119
|
+
|
|
120
|
+
```python
|
|
121
|
+
# Select HVGs for RNA
|
|
122
|
+
# Note: totalVI uses all proteins regardless of HVG
|
|
123
|
+
|
|
124
|
+
sc.pp.highly_variable_genes(
|
|
125
|
+
adata,
|
|
126
|
+
n_top_genes=4000, # Use more for CITE-seq
|
|
127
|
+
flavor="seurat_v3",
|
|
128
|
+
batch_key="batch" if "batch" in adata.obs else None,
|
|
129
|
+
layer="counts"
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
# Subset to HVGs
|
|
133
|
+
adata = adata[:, adata.var["highly_variable"]].copy()
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Step 4: Setup and Train totalVI
|
|
137
|
+
|
|
138
|
+
```python
|
|
139
|
+
# Setup AnnData for totalVI
|
|
140
|
+
scvi.model.TOTALVI.setup_anndata(
|
|
141
|
+
adata,
|
|
142
|
+
layer="counts",
|
|
143
|
+
protein_expression_obsm_key="protein_expression",
|
|
144
|
+
batch_key="batch" # Optional
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
# Create model
|
|
148
|
+
model = scvi.model.TOTALVI(
|
|
149
|
+
adata,
|
|
150
|
+
n_latent=20,
|
|
151
|
+
latent_distribution="normal" # or "ln" for log-normal
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
# Train
|
|
155
|
+
model.train(
|
|
156
|
+
max_epochs=200,
|
|
157
|
+
early_stopping=True,
|
|
158
|
+
batch_size=128
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
# Check training
|
|
162
|
+
model.history['elbo_train'].plot()
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Step 5: Get Latent Representation
|
|
166
|
+
|
|
167
|
+
```python
|
|
168
|
+
# Joint latent space
|
|
169
|
+
adata.obsm["X_totalVI"] = model.get_latent_representation()
|
|
170
|
+
|
|
171
|
+
# Clustering and visualization
|
|
172
|
+
sc.pp.neighbors(adata, use_rep="X_totalVI")
|
|
173
|
+
sc.tl.umap(adata)
|
|
174
|
+
sc.tl.leiden(adata, resolution=1.0)
|
|
175
|
+
|
|
176
|
+
sc.pl.umap(adata, color=['leiden', 'batch'])
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## Step 6: Denoised Protein Expression
|
|
180
|
+
|
|
181
|
+
```python
|
|
182
|
+
# Get denoised protein values
|
|
183
|
+
# This removes background noise from protein measurements
|
|
184
|
+
|
|
185
|
+
_, protein_denoised = model.get_normalized_expression(
|
|
186
|
+
return_mean=True,
|
|
187
|
+
transform_batch="batch1" # Optional: normalize to specific batch
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
# Add to adata
|
|
191
|
+
adata.obsm["protein_denoised"] = protein_denoised
|
|
192
|
+
|
|
193
|
+
# Visualize denoised proteins
|
|
194
|
+
protein_names = adata.uns["protein_names"]
|
|
195
|
+
for i, protein in enumerate(protein_names[:5]):
|
|
196
|
+
adata.obs[f"denoised_{protein}"] = protein_denoised[:, i]
|
|
197
|
+
|
|
198
|
+
sc.pl.umap(adata, color=[f"denoised_{p}" for p in protein_names[:5]])
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## Step 7: Normalized RNA Expression
|
|
202
|
+
|
|
203
|
+
```python
|
|
204
|
+
# Get normalized RNA expression
|
|
205
|
+
rna_normalized, _ = model.get_normalized_expression(
|
|
206
|
+
return_mean=True
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
# Store
|
|
210
|
+
adata.layers["totalVI_normalized"] = rna_normalized
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
## Step 8: Differential Expression
|
|
214
|
+
|
|
215
|
+
### RNA Differential Expression
|
|
216
|
+
|
|
217
|
+
```python
|
|
218
|
+
# DE between clusters
|
|
219
|
+
de_rna = model.differential_expression(
|
|
220
|
+
groupby="leiden",
|
|
221
|
+
group1="0",
|
|
222
|
+
group2="1"
|
|
223
|
+
)
|
|
224
|
+
|
|
225
|
+
# Filter significant genes
|
|
226
|
+
de_sig = de_rna[
|
|
227
|
+
(de_rna['is_de_fdr_0.05']) &
|
|
228
|
+
(abs(de_rna['lfc_mean']) > 1)
|
|
229
|
+
]
|
|
230
|
+
|
|
231
|
+
print(f"Significant DE genes: {len(de_sig)}")
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### Protein Differential Expression
|
|
235
|
+
|
|
236
|
+
```python
|
|
237
|
+
# Protein DE
|
|
238
|
+
de_protein = model.differential_expression(
|
|
239
|
+
groupby="leiden",
|
|
240
|
+
group1="0",
|
|
241
|
+
group2="1",
|
|
242
|
+
mode="protein"
|
|
243
|
+
)
|
|
244
|
+
|
|
245
|
+
print(de_protein.head(20))
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
## Step 9: Visualization
|
|
249
|
+
|
|
250
|
+
### Protein Expression on UMAP
|
|
251
|
+
|
|
252
|
+
```python
|
|
253
|
+
# Denoised protein on UMAP
|
|
254
|
+
import matplotlib.pyplot as plt
|
|
255
|
+
|
|
256
|
+
proteins_to_plot = ["CD3", "CD4", "CD8", "CD19", "CD14"]
|
|
257
|
+
|
|
258
|
+
fig, axes = plt.subplots(1, len(proteins_to_plot), figsize=(4*len(proteins_to_plot), 4))
|
|
259
|
+
for ax, protein in zip(axes, proteins_to_plot):
|
|
260
|
+
idx = adata.uns["protein_names"].index(protein)
|
|
261
|
+
sc.pl.umap(
|
|
262
|
+
adata,
|
|
263
|
+
color=adata.obsm["protein_denoised"][:, idx],
|
|
264
|
+
ax=ax,
|
|
265
|
+
title=protein,
|
|
266
|
+
show=False
|
|
267
|
+
)
|
|
268
|
+
plt.tight_layout()
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Joint Heatmap
|
|
272
|
+
|
|
273
|
+
```python
|
|
274
|
+
# Heatmap of top genes and proteins per cluster
|
|
275
|
+
sc.pl.dotplot(
|
|
276
|
+
adata,
|
|
277
|
+
var_names=de_sig.index[:20].tolist(),
|
|
278
|
+
groupby="leiden",
|
|
279
|
+
layer="totalVI_normalized"
|
|
280
|
+
)
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
## Step 10: Cell Type Annotation
|
|
284
|
+
|
|
285
|
+
```python
|
|
286
|
+
# Use both RNA and protein markers for annotation
|
|
287
|
+
|
|
288
|
+
# RNA markers
|
|
289
|
+
rna_markers = {
|
|
290
|
+
'T cells': ['CD3D', 'CD3E'],
|
|
291
|
+
'CD4 T': ['CD4'],
|
|
292
|
+
'CD8 T': ['CD8A', 'CD8B'],
|
|
293
|
+
'B cells': ['CD19', 'MS4A1'],
|
|
294
|
+
'Monocytes': ['CD14', 'LYZ']
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
# Check denoised protein expression
|
|
298
|
+
for i, protein in enumerate(adata.uns["protein_names"]):
|
|
299
|
+
if any(m in protein for m in ['CD3', 'CD4', 'CD8', 'CD19', 'CD14']):
|
|
300
|
+
print(f"{protein}: cluster means")
|
|
301
|
+
for cluster in adata.obs['leiden'].unique():
|
|
302
|
+
mask = adata.obs['leiden'] == cluster
|
|
303
|
+
mean_expr = adata.obsm["protein_denoised"][mask, i].mean()
|
|
304
|
+
print(f" Cluster {cluster}: {mean_expr:.2f}")
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
## Complete Pipeline
|
|
308
|
+
|
|
309
|
+
```python
|
|
310
|
+
def analyze_citeseq(
|
|
311
|
+
adata_rna,
|
|
312
|
+
adata_protein,
|
|
313
|
+
batch_key=None,
|
|
314
|
+
n_top_genes=4000,
|
|
315
|
+
n_latent=20
|
|
316
|
+
):
|
|
317
|
+
"""
|
|
318
|
+
Complete CITE-seq analysis with totalVI.
|
|
319
|
+
|
|
320
|
+
Parameters
|
|
321
|
+
----------
|
|
322
|
+
adata_rna : AnnData
|
|
323
|
+
RNA expression (raw counts)
|
|
324
|
+
adata_protein : AnnData
|
|
325
|
+
Protein expression (raw counts)
|
|
326
|
+
batch_key : str, optional
|
|
327
|
+
Batch column in obs
|
|
328
|
+
n_top_genes : int
|
|
329
|
+
Number of HVGs
|
|
330
|
+
n_latent : int
|
|
331
|
+
Latent dimensions
|
|
332
|
+
|
|
333
|
+
Returns
|
|
334
|
+
-------
|
|
335
|
+
Tuple of (processed AnnData, trained model)
|
|
336
|
+
"""
|
|
337
|
+
import scvi
|
|
338
|
+
import scanpy as sc
|
|
339
|
+
|
|
340
|
+
# Ensure same cells
|
|
341
|
+
common_cells = adata_rna.obs_names.intersection(adata_protein.obs_names)
|
|
342
|
+
adata = adata_rna[common_cells].copy()
|
|
343
|
+
adata_protein = adata_protein[common_cells].copy()
|
|
344
|
+
|
|
345
|
+
# Add protein to obsm
|
|
346
|
+
adata.obsm["protein_expression"] = adata_protein.X.toarray() if hasattr(adata_protein.X, 'toarray') else adata_protein.X
|
|
347
|
+
adata.uns["protein_names"] = list(adata_protein.var_names)
|
|
348
|
+
|
|
349
|
+
# RNA QC
|
|
350
|
+
# Handle both human (MT-) and mouse (mt-, Mt-) mitochondrial genes
|
|
351
|
+
adata.var['mt'] = (
|
|
352
|
+
adata.var_names.str.startswith('MT-') |
|
|
353
|
+
adata.var_names.str.startswith('mt-') |
|
|
354
|
+
adata.var_names.str.startswith('Mt-')
|
|
355
|
+
)
|
|
356
|
+
sc.pp.calculate_qc_metrics(adata, qc_vars=['mt'], inplace=True)
|
|
357
|
+
adata = adata[adata.obs['pct_counts_mt'] < 20].copy()
|
|
358
|
+
sc.pp.filter_genes(adata, min_cells=3)
|
|
359
|
+
|
|
360
|
+
# Store counts
|
|
361
|
+
adata.layers["counts"] = adata.X.copy()
|
|
362
|
+
|
|
363
|
+
# HVG selection
|
|
364
|
+
sc.pp.highly_variable_genes(
|
|
365
|
+
adata,
|
|
366
|
+
n_top_genes=n_top_genes,
|
|
367
|
+
flavor="seurat_v3",
|
|
368
|
+
batch_key=batch_key,
|
|
369
|
+
layer="counts"
|
|
370
|
+
)
|
|
371
|
+
adata = adata[:, adata.var["highly_variable"]].copy()
|
|
372
|
+
|
|
373
|
+
# Setup totalVI
|
|
374
|
+
scvi.model.TOTALVI.setup_anndata(
|
|
375
|
+
adata,
|
|
376
|
+
layer="counts",
|
|
377
|
+
protein_expression_obsm_key="protein_expression",
|
|
378
|
+
batch_key=batch_key
|
|
379
|
+
)
|
|
380
|
+
|
|
381
|
+
# Train
|
|
382
|
+
model = scvi.model.TOTALVI(adata, n_latent=n_latent)
|
|
383
|
+
model.train(max_epochs=200, early_stopping=True)
|
|
384
|
+
|
|
385
|
+
# Get representations
|
|
386
|
+
adata.obsm["X_totalVI"] = model.get_latent_representation()
|
|
387
|
+
rna_norm, protein_denoised = model.get_normalized_expression(return_mean=True)
|
|
388
|
+
adata.layers["totalVI_normalized"] = rna_norm
|
|
389
|
+
adata.obsm["protein_denoised"] = protein_denoised
|
|
390
|
+
|
|
391
|
+
# Clustering
|
|
392
|
+
sc.pp.neighbors(adata, use_rep="X_totalVI")
|
|
393
|
+
sc.tl.umap(adata)
|
|
394
|
+
sc.tl.leiden(adata)
|
|
395
|
+
|
|
396
|
+
return adata, model
|
|
397
|
+
|
|
398
|
+
# Usage
|
|
399
|
+
adata, model = analyze_citeseq(
|
|
400
|
+
adata_rna,
|
|
401
|
+
adata_protein,
|
|
402
|
+
batch_key="batch"
|
|
403
|
+
)
|
|
404
|
+
|
|
405
|
+
# Visualize
|
|
406
|
+
sc.pl.umap(adata, color=['leiden', 'batch'])
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
## Troubleshooting
|
|
410
|
+
|
|
411
|
+
| Issue | Cause | Solution |
|
|
412
|
+
|-------|-------|----------|
|
|
413
|
+
| Protein signal noisy | Background not removed | Use get_normalized_expression with denoising |
|
|
414
|
+
| Batch effects persist | Need batch_key | Ensure batch_key is specified |
|
|
415
|
+
| Memory error | Too many genes | Reduce n_top_genes |
|
|
416
|
+
| Poor protein clustering | Few proteins | Normal - totalVI uses RNA for structure |
|
|
417
|
+
|
|
418
|
+
## Key References
|
|
419
|
+
|
|
420
|
+
- Gayoso et al. (2021) "Joint probabilistic modeling of single-cell multi-omic data with totalVI"
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
# Data Preparation for scvi-tools
|
|
2
|
+
|
|
3
|
+
This reference covers how to properly prepare AnnData objects for use with scvi-tools models.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Proper data preparation is critical for scvi-tools. Key requirements:
|
|
8
|
+
1. **Raw counts** (not normalized)
|
|
9
|
+
2. **Highly variable gene selection**
|
|
10
|
+
3. **Proper setup_anndata() call**
|
|
11
|
+
|
|
12
|
+
## Step 1: Load and Inspect Data
|
|
13
|
+
|
|
14
|
+
```python
|
|
15
|
+
import scanpy as sc
|
|
16
|
+
import scvi
|
|
17
|
+
import numpy as np
|
|
18
|
+
|
|
19
|
+
# Load data
|
|
20
|
+
adata = sc.read_h5ad("data.h5ad")
|
|
21
|
+
|
|
22
|
+
# Check what's in adata.X
|
|
23
|
+
print(f"Shape: {adata.shape}")
|
|
24
|
+
print(f"X dtype: {adata.X.dtype}")
|
|
25
|
+
print(f"X contains integers: {np.allclose(adata.X.data, adata.X.data.astype(int))}")
|
|
26
|
+
print(f"X min: {adata.X.min()}, max: {adata.X.max()}")
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Verify Raw Counts
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
# scvi-tools needs INTEGER counts
|
|
33
|
+
# If X appears normalized, check for raw counts
|
|
34
|
+
|
|
35
|
+
if hasattr(adata, 'raw') and adata.raw is not None:
|
|
36
|
+
print("Found adata.raw")
|
|
37
|
+
# Use raw counts
|
|
38
|
+
adata = adata.raw.to_adata()
|
|
39
|
+
|
|
40
|
+
# Or check layers
|
|
41
|
+
if 'counts' in adata.layers:
|
|
42
|
+
print("Found counts layer")
|
|
43
|
+
# Will specify layer in setup_anndata
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Step 2: Basic Filtering
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
# Filter cells (standard QC)
|
|
50
|
+
sc.pp.filter_cells(adata, min_genes=200)
|
|
51
|
+
sc.pp.filter_cells(adata, max_genes=5000)
|
|
52
|
+
|
|
53
|
+
# Calculate mito percent if not present
|
|
54
|
+
# Handle both human (MT-) and mouse (mt-, Mt-) mitochondrial genes
|
|
55
|
+
adata.var['mt'] = (
|
|
56
|
+
adata.var_names.str.startswith('MT-') |
|
|
57
|
+
adata.var_names.str.startswith('mt-') |
|
|
58
|
+
adata.var_names.str.startswith('Mt-')
|
|
59
|
+
)
|
|
60
|
+
sc.pp.calculate_qc_metrics(adata, qc_vars=['mt'], inplace=True)
|
|
61
|
+
adata = adata[adata.obs['pct_counts_mt'] < 20].copy()
|
|
62
|
+
|
|
63
|
+
# Filter genes
|
|
64
|
+
sc.pp.filter_genes(adata, min_cells=3)
|
|
65
|
+
|
|
66
|
+
print(f"After filtering: {adata.shape}")
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Step 3: Store Raw Counts
|
|
70
|
+
|
|
71
|
+
**Critical**: Always preserve raw counts before any normalization.
|
|
72
|
+
|
|
73
|
+
```python
|
|
74
|
+
# Store raw counts in a layer
|
|
75
|
+
adata.layers["counts"] = adata.X.copy()
|
|
76
|
+
|
|
77
|
+
# Now you can normalize for other purposes (HVG selection)
|
|
78
|
+
# But scvi will use the counts layer
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Step 4: Highly Variable Gene Selection
|
|
82
|
+
|
|
83
|
+
scvi-tools works best with 1,500-5,000 HVGs.
|
|
84
|
+
|
|
85
|
+
### For Single-Batch Data
|
|
86
|
+
|
|
87
|
+
```python
|
|
88
|
+
# Normalize for HVG selection only
|
|
89
|
+
adata_hvg = adata.copy()
|
|
90
|
+
sc.pp.normalize_total(adata_hvg, target_sum=1e4)
|
|
91
|
+
sc.pp.log1p(adata_hvg)
|
|
92
|
+
|
|
93
|
+
# Select HVGs
|
|
94
|
+
sc.pp.highly_variable_genes(
|
|
95
|
+
adata_hvg,
|
|
96
|
+
n_top_genes=2000,
|
|
97
|
+
flavor="seurat" # or "cell_ranger"
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
# Transfer HVG annotation
|
|
101
|
+
adata.var['highly_variable'] = adata_hvg.var['highly_variable']
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### For Multi-Batch Data (Recommended)
|
|
105
|
+
|
|
106
|
+
```python
|
|
107
|
+
# Use seurat_v3 flavor with batch_key
|
|
108
|
+
# This selects genes variable across batches
|
|
109
|
+
sc.pp.highly_variable_genes(
|
|
110
|
+
adata,
|
|
111
|
+
n_top_genes=2000,
|
|
112
|
+
flavor="seurat_v3",
|
|
113
|
+
batch_key="batch", # Your batch column
|
|
114
|
+
layer="counts" # Use raw counts
|
|
115
|
+
)
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Subset to HVGs
|
|
119
|
+
|
|
120
|
+
```python
|
|
121
|
+
# Subset to highly variable genes
|
|
122
|
+
adata = adata[:, adata.var['highly_variable']].copy()
|
|
123
|
+
print(f"After HVG selection: {adata.shape}")
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Step 5: Setup AnnData
|
|
127
|
+
|
|
128
|
+
The `setup_anndata()` function registers data for the model.
|
|
129
|
+
|
|
130
|
+
### Basic Setup
|
|
131
|
+
|
|
132
|
+
```python
|
|
133
|
+
scvi.model.SCVI.setup_anndata(
|
|
134
|
+
adata,
|
|
135
|
+
layer="counts" # Specify layer with raw counts
|
|
136
|
+
)
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### With Batch Information
|
|
140
|
+
|
|
141
|
+
```python
|
|
142
|
+
scvi.model.SCVI.setup_anndata(
|
|
143
|
+
adata,
|
|
144
|
+
layer="counts",
|
|
145
|
+
batch_key="batch" # Column in adata.obs
|
|
146
|
+
)
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### With Cell Type Labels (for scANVI)
|
|
150
|
+
|
|
151
|
+
```python
|
|
152
|
+
scvi.model.SCANVI.setup_anndata(
|
|
153
|
+
adata,
|
|
154
|
+
layer="counts",
|
|
155
|
+
batch_key="batch",
|
|
156
|
+
labels_key="cell_type" # Column with cell type labels
|
|
157
|
+
)
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### With Continuous Covariates
|
|
161
|
+
|
|
162
|
+
```python
|
|
163
|
+
scvi.model.SCVI.setup_anndata(
|
|
164
|
+
adata,
|
|
165
|
+
layer="counts",
|
|
166
|
+
batch_key="batch",
|
|
167
|
+
continuous_covariate_keys=["percent_mito", "n_genes"]
|
|
168
|
+
)
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### With Categorical Covariates
|
|
172
|
+
|
|
173
|
+
```python
|
|
174
|
+
scvi.model.SCVI.setup_anndata(
|
|
175
|
+
adata,
|
|
176
|
+
layer="counts",
|
|
177
|
+
batch_key="batch",
|
|
178
|
+
categorical_covariate_keys=["donor", "technology"]
|
|
179
|
+
)
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## Multi-Modal Data Setup
|
|
183
|
+
|
|
184
|
+
### CITE-seq (for totalVI)
|
|
185
|
+
|
|
186
|
+
```python
|
|
187
|
+
# Protein data in adata.obsm
|
|
188
|
+
# RNA in adata.X, protein in separate matrix
|
|
189
|
+
|
|
190
|
+
# Add protein data
|
|
191
|
+
adata.obsm["protein_expression"] = protein_counts # numpy array
|
|
192
|
+
|
|
193
|
+
# Setup for totalVI
|
|
194
|
+
scvi.model.TOTALVI.setup_anndata(
|
|
195
|
+
adata,
|
|
196
|
+
layer="counts",
|
|
197
|
+
batch_key="batch",
|
|
198
|
+
protein_expression_obsm_key="protein_expression"
|
|
199
|
+
)
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Multiome RNA+ATAC (for MultiVI)
|
|
203
|
+
|
|
204
|
+
```python
|
|
205
|
+
# RNA and ATAC in separate AnnData objects or MuData
|
|
206
|
+
|
|
207
|
+
import mudata as md
|
|
208
|
+
|
|
209
|
+
# If using MuData
|
|
210
|
+
mdata = md.read("multiome.h5mu")
|
|
211
|
+
|
|
212
|
+
scvi.model.MULTIVI.setup_mudata(
|
|
213
|
+
mdata,
|
|
214
|
+
rna_layer="counts",
|
|
215
|
+
protein_layer=None,
|
|
216
|
+
batch_key="batch",
|
|
217
|
+
modalities={"rna": "rna", "accessibility": "atac"}
|
|
218
|
+
)
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
## Complete Preparation Pipeline
|
|
222
|
+
|
|
223
|
+
For a complete preparation function, use `prepare_adata()` from `scripts/model_utils.py`:
|
|
224
|
+
|
|
225
|
+
```python
|
|
226
|
+
from model_utils import prepare_adata
|
|
227
|
+
|
|
228
|
+
# Prepare data with QC, HVG selection, and layer setup
|
|
229
|
+
adata = prepare_adata(
|
|
230
|
+
adata,
|
|
231
|
+
batch_key="batch",
|
|
232
|
+
n_top_genes=2000,
|
|
233
|
+
min_genes=200,
|
|
234
|
+
max_mito_pct=20
|
|
235
|
+
)
|
|
236
|
+
|
|
237
|
+
# Then setup for your model
|
|
238
|
+
import scvi
|
|
239
|
+
scvi.model.SCVI.setup_anndata(adata, layer="counts", batch_key="batch")
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
This function handles:
|
|
243
|
+
- Mitochondrial QC filtering
|
|
244
|
+
- Cell and gene filtering
|
|
245
|
+
- Storing counts in layer
|
|
246
|
+
- HVG selection (batch-aware if batch_key provided)
|
|
247
|
+
- Subsetting to HVGs
|
|
248
|
+
|
|
249
|
+
## Checking Setup
|
|
250
|
+
|
|
251
|
+
```python
|
|
252
|
+
# View registered data
|
|
253
|
+
print(adata.uns['_scvi_manager_uuid'])
|
|
254
|
+
print(adata.uns['_scvi_adata_minify_type'])
|
|
255
|
+
|
|
256
|
+
# For scVI
|
|
257
|
+
scvi.model.SCVI.view_anndata_setup(adata)
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
## Common Issues and Solutions
|
|
261
|
+
|
|
262
|
+
| Issue | Cause | Solution |
|
|
263
|
+
|-------|-------|----------|
|
|
264
|
+
| "X should contain integers" | Normalized data in X | Use layer="counts" |
|
|
265
|
+
| "batch_key not found" | Wrong column name | Check adata.obs.columns |
|
|
266
|
+
| Sparse matrix errors | Incompatible format | Convert: adata.X = adata.X.toarray() |
|
|
267
|
+
| Memory error | Too many genes | Subset to HVGs first |
|
|
268
|
+
| NaN in data | Missing values | Filter or impute |
|
|
269
|
+
|
|
270
|
+
## Data Format Reference
|
|
271
|
+
|
|
272
|
+
### Required
|
|
273
|
+
|
|
274
|
+
- `adata.X` or `adata.layers["counts"]`: Raw integer counts (sparse OK)
|
|
275
|
+
- `adata.obs`: Cell metadata DataFrame
|
|
276
|
+
- `adata.var`: Gene metadata DataFrame
|
|
277
|
+
|
|
278
|
+
### Recommended
|
|
279
|
+
|
|
280
|
+
- `adata.obs["batch"]`: Batch/sample identifiers
|
|
281
|
+
- `adata.var["highly_variable"]`: HVG boolean mask
|
|
282
|
+
|
|
283
|
+
### For scANVI
|
|
284
|
+
|
|
285
|
+
- `adata.obs["labels"]`: Cell type annotations
|
|
286
|
+
- Can include "Unknown" for unlabeled cells
|