opencode-knowledge-work 0.0.0-stage → 0.1.1
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 +83 -0
- package/package.json +28 -3
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
# Environment Setup for scvi-tools
|
|
2
|
+
|
|
3
|
+
This reference covers installation and environment configuration for scvi-tools.
|
|
4
|
+
|
|
5
|
+
## Installation Options
|
|
6
|
+
|
|
7
|
+
### Option 1: Conda Environment (Recommended)
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Create environment with GPU support
|
|
11
|
+
conda create -n scvi-env python=3.10
|
|
12
|
+
conda activate scvi-env
|
|
13
|
+
|
|
14
|
+
# Install scvi-tools
|
|
15
|
+
pip install scvi-tools
|
|
16
|
+
|
|
17
|
+
# For GPU acceleration (recommended for large datasets)
|
|
18
|
+
pip install torch --index-url https://download.pytorch.org/whl/cu118
|
|
19
|
+
|
|
20
|
+
# Common dependencies
|
|
21
|
+
pip install scanpy leidenalg
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Option 2: Pip Only
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Create virtual environment
|
|
28
|
+
python -m venv scvi-env
|
|
29
|
+
source scvi-env/bin/activate # Linux/Mac
|
|
30
|
+
# scvi-env\Scripts\activate # Windows
|
|
31
|
+
|
|
32
|
+
# Install
|
|
33
|
+
pip install scvi-tools scanpy
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Option 3: With Spatial Analysis Support
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
conda create -n scvi-spatial python=3.10
|
|
40
|
+
conda activate scvi-spatial
|
|
41
|
+
|
|
42
|
+
pip install scvi-tools scanpy squidpy
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Option 4: With MuData Support (Multiome)
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install scvi-tools mudata muon
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Verify Installation
|
|
52
|
+
|
|
53
|
+
```python
|
|
54
|
+
import scvi
|
|
55
|
+
import torch
|
|
56
|
+
import scanpy as sc
|
|
57
|
+
|
|
58
|
+
print(f"scvi-tools version: {scvi.__version__}")
|
|
59
|
+
print(f"scanpy version: {sc.__version__}")
|
|
60
|
+
print(f"PyTorch version: {torch.__version__}")
|
|
61
|
+
print(f"GPU available: {torch.cuda.is_available()}")
|
|
62
|
+
|
|
63
|
+
if torch.cuda.is_available():
|
|
64
|
+
print(f"GPU device: {torch.cuda.get_device_name(0)}")
|
|
65
|
+
print(f"GPU memory: {torch.cuda.get_device_properties(0).total_memory / 1e9:.1f} GB")
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## GPU Configuration
|
|
69
|
+
|
|
70
|
+
### Check CUDA Version
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
nvidia-smi
|
|
74
|
+
nvcc --version
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### PyTorch CUDA Versions
|
|
78
|
+
|
|
79
|
+
| CUDA Version | PyTorch Install Command |
|
|
80
|
+
|--------------|------------------------|
|
|
81
|
+
| CUDA 11.8 | `pip install torch --index-url https://download.pytorch.org/whl/cu118` |
|
|
82
|
+
| CUDA 12.1 | `pip install torch --index-url https://download.pytorch.org/whl/cu121` |
|
|
83
|
+
| CPU only | `pip install torch --index-url https://download.pytorch.org/whl/cpu` |
|
|
84
|
+
|
|
85
|
+
### Memory Management
|
|
86
|
+
|
|
87
|
+
```python
|
|
88
|
+
import torch
|
|
89
|
+
|
|
90
|
+
# Clear GPU cache between models
|
|
91
|
+
torch.cuda.empty_cache()
|
|
92
|
+
|
|
93
|
+
# Monitor memory usage
|
|
94
|
+
print(f"Allocated: {torch.cuda.memory_allocated() / 1e9:.2f} GB")
|
|
95
|
+
print(f"Cached: {torch.cuda.memory_reserved() / 1e9:.2f} GB")
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Common Issues
|
|
99
|
+
|
|
100
|
+
| Issue | Cause | Solution |
|
|
101
|
+
|-------|-------|----------|
|
|
102
|
+
| `CUDA out of memory` | GPU memory exhausted | Reduce batch_size, use smaller model |
|
|
103
|
+
| `No GPU detected` | CUDA not installed | Install CUDA toolkit matching PyTorch |
|
|
104
|
+
| `Version mismatch` | PyTorch/CUDA incompatibility | Reinstall PyTorch with correct CUDA version |
|
|
105
|
+
| `Import error scvi` | Missing dependencies | `pip install scvi-tools[all]` |
|
|
106
|
+
|
|
107
|
+
## Jupyter Setup
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# Install Jupyter kernel
|
|
111
|
+
pip install ipykernel
|
|
112
|
+
python -m ipykernel install --user --name scvi-env --display-name "scvi-tools"
|
|
113
|
+
|
|
114
|
+
# For interactive plots
|
|
115
|
+
pip install matplotlib seaborn
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Recommended Package Versions
|
|
119
|
+
|
|
120
|
+
For reproducibility, pin versions:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
pip install \
|
|
124
|
+
scvi-tools>=1.0.0 \
|
|
125
|
+
scanpy>=1.9.0 \
|
|
126
|
+
anndata>=0.9.0 \
|
|
127
|
+
torch>=2.0.0
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Version Compatibility Guide
|
|
131
|
+
|
|
132
|
+
### scvi-tools 1.x vs 0.x API Changes
|
|
133
|
+
|
|
134
|
+
The 1.x release introduced breaking changes. Key differences:
|
|
135
|
+
|
|
136
|
+
| Operation | 0.x API (deprecated) | 1.x API (current) |
|
|
137
|
+
|-----------|---------------------|-------------------|
|
|
138
|
+
| Setup data | `scvi.data.setup_anndata(adata, ...)` | `scvi.model.SCVI.setup_anndata(adata, ...)` |
|
|
139
|
+
| Register data | `scvi.data.register_tensor_from_anndata(...)` | Built into `setup_anndata` |
|
|
140
|
+
| View setup | `scvi.data.view_anndata_setup(adata)` | `scvi.model.SCVI.view_anndata_setup(adata)` |
|
|
141
|
+
|
|
142
|
+
### Migration from 0.x to 1.x
|
|
143
|
+
|
|
144
|
+
```python
|
|
145
|
+
# OLD (0.x) - DEPRECATED
|
|
146
|
+
import scvi
|
|
147
|
+
scvi.data.setup_anndata(adata, layer="counts", batch_key="batch")
|
|
148
|
+
model = scvi.model.SCVI(adata)
|
|
149
|
+
|
|
150
|
+
# NEW (1.x) - CURRENT
|
|
151
|
+
import scvi
|
|
152
|
+
scvi.model.SCVI.setup_anndata(adata, layer="counts", batch_key="batch")
|
|
153
|
+
model = scvi.model.SCVI(adata)
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Model-Specific Setup (1.x)
|
|
157
|
+
|
|
158
|
+
Each model has its own setup method:
|
|
159
|
+
|
|
160
|
+
```python
|
|
161
|
+
# scVI
|
|
162
|
+
scvi.model.SCVI.setup_anndata(adata, layer="counts", batch_key="batch")
|
|
163
|
+
|
|
164
|
+
# scANVI
|
|
165
|
+
scvi.model.SCANVI.setup_anndata(adata, layer="counts", batch_key="batch", labels_key="cell_type")
|
|
166
|
+
|
|
167
|
+
# totalVI
|
|
168
|
+
scvi.model.TOTALVI.setup_anndata(adata, layer="counts", protein_expression_obsm_key="protein")
|
|
169
|
+
|
|
170
|
+
# MultiVI (uses MuData)
|
|
171
|
+
scvi.model.MULTIVI.setup_mudata(mdata, rna_layer="counts", atac_layer="counts")
|
|
172
|
+
|
|
173
|
+
# PeakVI
|
|
174
|
+
scvi.model.PEAKVI.setup_anndata(adata, batch_key="batch")
|
|
175
|
+
|
|
176
|
+
# veloVI
|
|
177
|
+
scvi.external.VELOVI.setup_anndata(adata, spliced_layer="spliced", unspliced_layer="unspliced")
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Minimum Version Requirements
|
|
181
|
+
|
|
182
|
+
| Package | Minimum Version | Notes |
|
|
183
|
+
|---------|-----------------|-------|
|
|
184
|
+
| scvi-tools | 1.0.0 | Required for current API |
|
|
185
|
+
| scanpy | 1.9.0 | HVG selection improvements |
|
|
186
|
+
| anndata | 0.9.0 | Improved MuData support |
|
|
187
|
+
| torch | 2.0.0 | Performance improvements |
|
|
188
|
+
| mudata | 0.2.0 | Required for MultiVI |
|
|
189
|
+
| scvelo | 0.2.5 | Required for veloVI |
|
|
190
|
+
|
|
191
|
+
### Check Your Versions
|
|
192
|
+
|
|
193
|
+
```python
|
|
194
|
+
import scvi
|
|
195
|
+
import scanpy as sc
|
|
196
|
+
import anndata
|
|
197
|
+
import torch
|
|
198
|
+
|
|
199
|
+
print(f"scvi-tools: {scvi.__version__}")
|
|
200
|
+
print(f"scanpy: {sc.__version__}")
|
|
201
|
+
print(f"anndata: {anndata.__version__}")
|
|
202
|
+
print(f"torch: {torch.__version__}")
|
|
203
|
+
|
|
204
|
+
# Check if using 1.x API
|
|
205
|
+
if hasattr(scvi.model.SCVI, 'setup_anndata'):
|
|
206
|
+
print("Using scvi-tools 1.x API")
|
|
207
|
+
else:
|
|
208
|
+
print("WARNING: Using deprecated 0.x API - please upgrade")
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Known Compatibility Issues
|
|
212
|
+
|
|
213
|
+
| Issue | Affected Versions | Solution |
|
|
214
|
+
|-------|-------------------|----------|
|
|
215
|
+
| `setup_anndata` not found | scvi-tools < 1.0 | Upgrade to 1.0+ |
|
|
216
|
+
| MuData errors | mudata < 0.2 | `pip install mudata>=0.2.0` |
|
|
217
|
+
| CUDA version mismatch | Any | Reinstall PyTorch for your CUDA |
|
|
218
|
+
| numpy 2.0 issues | Early 2024 builds | `pip install numpy<2.0` |
|
|
219
|
+
|
|
220
|
+
### Upgrading scvi-tools
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
# Upgrade to latest
|
|
224
|
+
pip install --upgrade scvi-tools
|
|
225
|
+
|
|
226
|
+
# Upgrade all dependencies
|
|
227
|
+
pip install --upgrade scvi-tools scanpy anndata torch
|
|
228
|
+
|
|
229
|
+
# If you have issues, clean install
|
|
230
|
+
pip uninstall scvi-tools
|
|
231
|
+
pip cache purge
|
|
232
|
+
pip install scvi-tools
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## Testing Installation
|
|
236
|
+
|
|
237
|
+
```python
|
|
238
|
+
# Quick test with sample data
|
|
239
|
+
import scvi
|
|
240
|
+
import scanpy as sc
|
|
241
|
+
|
|
242
|
+
# Load test dataset
|
|
243
|
+
adata = scvi.data.heart_cell_atlas_subsampled()
|
|
244
|
+
print(f"Loaded test data: {adata.shape}")
|
|
245
|
+
|
|
246
|
+
# Setup and create model (quick test)
|
|
247
|
+
scvi.model.SCVI.setup_anndata(adata, layer="counts", batch_key="cell_source")
|
|
248
|
+
model = scvi.model.SCVI(adata, n_latent=10)
|
|
249
|
+
print("Model created successfully")
|
|
250
|
+
|
|
251
|
+
# Quick training test (1 epoch)
|
|
252
|
+
model.train(max_epochs=1)
|
|
253
|
+
print("Training works!")
|
|
254
|
+
```
|
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
# Label Transfer and Reference Mapping with scANVI
|
|
2
|
+
|
|
3
|
+
This reference covers using scANVI for transferring cell type annotations from a reference atlas to query data.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Reference mapping (also called "label transfer") uses a pre-trained model on annotated reference data to predict cell types in new, unannotated query data. This is faster than re-clustering and more consistent across studies.
|
|
8
|
+
|
|
9
|
+
scANVI excels at this because it:
|
|
10
|
+
- Jointly embeds reference and query in shared space
|
|
11
|
+
- Transfers labels probabilistically
|
|
12
|
+
- Handles batch effects between reference and query
|
|
13
|
+
|
|
14
|
+
## When to Use Reference Mapping
|
|
15
|
+
|
|
16
|
+
- Annotating new dataset using existing atlas
|
|
17
|
+
- Consistent annotation across multiple studies
|
|
18
|
+
- Speed: no need to re-cluster and manually annotate
|
|
19
|
+
- Quality: leverage expert-curated reference annotations
|
|
20
|
+
|
|
21
|
+
## Workflow Options
|
|
22
|
+
|
|
23
|
+
1. **Train new model**: Train scANVI on reference, then map query
|
|
24
|
+
2. **Use pre-trained model**: Load existing model (e.g., from Model Hub)
|
|
25
|
+
3. **scArches**: Extend existing model with query data (preserves reference)
|
|
26
|
+
|
|
27
|
+
## Option 1: Train scANVI on Reference
|
|
28
|
+
|
|
29
|
+
### Step 1: Prepare Reference Data
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
import scvi
|
|
33
|
+
import scanpy as sc
|
|
34
|
+
|
|
35
|
+
# Load reference atlas
|
|
36
|
+
adata_ref = sc.read_h5ad("reference_atlas.h5ad")
|
|
37
|
+
|
|
38
|
+
# Check annotations
|
|
39
|
+
print(f"Reference cells: {adata_ref.n_obs}")
|
|
40
|
+
print(f"Cell types: {adata_ref.obs['cell_type'].nunique()}")
|
|
41
|
+
print(adata_ref.obs['cell_type'].value_counts())
|
|
42
|
+
|
|
43
|
+
# Ensure raw counts
|
|
44
|
+
adata_ref.layers["counts"] = adata_ref.raw.X.copy() if adata_ref.raw else adata_ref.X.copy()
|
|
45
|
+
|
|
46
|
+
# HVG selection
|
|
47
|
+
sc.pp.highly_variable_genes(
|
|
48
|
+
adata_ref,
|
|
49
|
+
n_top_genes=3000,
|
|
50
|
+
flavor="seurat_v3",
|
|
51
|
+
batch_key="batch" if "batch" in adata_ref.obs else None,
|
|
52
|
+
layer="counts"
|
|
53
|
+
)
|
|
54
|
+
adata_ref = adata_ref[:, adata_ref.var["highly_variable"]].copy()
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Step 2: Train scANVI on Reference
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
# First train scVI (unlabeled)
|
|
61
|
+
scvi.model.SCVI.setup_anndata(
|
|
62
|
+
adata_ref,
|
|
63
|
+
layer="counts",
|
|
64
|
+
batch_key="batch"
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
scvi_ref = scvi.model.SCVI(adata_ref, n_latent=30)
|
|
68
|
+
scvi_ref.train(max_epochs=200)
|
|
69
|
+
|
|
70
|
+
# Initialize scANVI from scVI
|
|
71
|
+
scanvi_ref = scvi.model.SCANVI.from_scvi_model(
|
|
72
|
+
scvi_ref,
|
|
73
|
+
labels_key="cell_type",
|
|
74
|
+
unlabeled_category="Unknown"
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
# Train scANVI
|
|
78
|
+
scanvi_ref.train(max_epochs=50)
|
|
79
|
+
|
|
80
|
+
# Save for later use
|
|
81
|
+
scanvi_ref.save("scanvi_reference_model/")
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Step 3: Prepare Query Data
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
# Load query data
|
|
88
|
+
adata_query = sc.read_h5ad("query_data.h5ad")
|
|
89
|
+
|
|
90
|
+
# CRITICAL: Use same genes as reference
|
|
91
|
+
common_genes = adata_ref.var_names.intersection(adata_query.var_names)
|
|
92
|
+
print(f"Common genes: {len(common_genes)}")
|
|
93
|
+
|
|
94
|
+
# Subset query to reference genes
|
|
95
|
+
adata_query = adata_query[:, adata_ref.var_names].copy()
|
|
96
|
+
|
|
97
|
+
# Handle missing genes (set to 0)
|
|
98
|
+
missing_genes = set(adata_ref.var_names) - set(adata_query.var_names)
|
|
99
|
+
if missing_genes:
|
|
100
|
+
# Add missing genes with zero expression
|
|
101
|
+
import numpy as np
|
|
102
|
+
from scipy.sparse import csr_matrix
|
|
103
|
+
|
|
104
|
+
zero_matrix = csr_matrix((adata_query.n_obs, len(missing_genes)))
|
|
105
|
+
# ... concat and reorder to match reference
|
|
106
|
+
|
|
107
|
+
# Store counts
|
|
108
|
+
adata_query.layers["counts"] = adata_query.X.copy()
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Step 4: Map Query to Reference
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
# Prepare query data for mapping
|
|
115
|
+
scvi.model.SCANVI.prepare_query_anndata(adata_query, scanvi_ref)
|
|
116
|
+
|
|
117
|
+
# Create query model from reference
|
|
118
|
+
scanvi_query = scvi.model.SCANVI.load_query_data(
|
|
119
|
+
adata_query,
|
|
120
|
+
scanvi_ref
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
# Fine-tune on query (optional but recommended)
|
|
124
|
+
scanvi_query.train(
|
|
125
|
+
max_epochs=100,
|
|
126
|
+
plan_kwargs={"weight_decay": 0.0}
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
# Get predictions
|
|
130
|
+
adata_query.obs["predicted_cell_type"] = scanvi_query.predict()
|
|
131
|
+
|
|
132
|
+
# Get prediction probabilities
|
|
133
|
+
soft_predictions = scanvi_query.predict(soft=True)
|
|
134
|
+
adata_query.obs["prediction_score"] = soft_predictions.max(axis=1)
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Step 5: Evaluate Predictions
|
|
138
|
+
|
|
139
|
+
```python
|
|
140
|
+
# Confidence scores
|
|
141
|
+
print(f"Mean prediction confidence: {adata_query.obs['prediction_score'].mean():.3f}")
|
|
142
|
+
|
|
143
|
+
# Low confidence predictions
|
|
144
|
+
low_conf = adata_query.obs['prediction_score'] < 0.5
|
|
145
|
+
print(f"Low confidence cells: {low_conf.sum()} ({low_conf.mean()*100:.1f}%)")
|
|
146
|
+
|
|
147
|
+
# Visualize
|
|
148
|
+
sc.pp.neighbors(adata_query, use_rep="X_scANVI")
|
|
149
|
+
sc.tl.umap(adata_query)
|
|
150
|
+
sc.pl.umap(adata_query, color=['predicted_cell_type', 'prediction_score'])
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Option 2: Use Pre-Trained Models
|
|
154
|
+
|
|
155
|
+
### From Model Hub
|
|
156
|
+
|
|
157
|
+
```python
|
|
158
|
+
# scvi-tools maintains models on HuggingFace
|
|
159
|
+
# Check: https://huggingface.co/scvi-tools
|
|
160
|
+
|
|
161
|
+
# Example: Load pre-trained model
|
|
162
|
+
from huggingface_hub import hf_hub_download
|
|
163
|
+
|
|
164
|
+
model_path = hf_hub_download(
|
|
165
|
+
repo_id="scvi-tools/example-model",
|
|
166
|
+
filename="model.pt"
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
# Load model
|
|
170
|
+
model = scvi.model.SCANVI.load(model_path, adata=adata_query)
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### From Published Atlas
|
|
174
|
+
|
|
175
|
+
```python
|
|
176
|
+
# Many atlases provide pre-trained models
|
|
177
|
+
# Example workflow with CellTypist-style model
|
|
178
|
+
|
|
179
|
+
# Download reference model
|
|
180
|
+
# model = scvi.model.SCANVI.load("atlas_model/", adata=adata_query)
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Option 3: scArches for Incremental Updates
|
|
184
|
+
|
|
185
|
+
scArches extends a reference model without retraining from scratch:
|
|
186
|
+
|
|
187
|
+
```python
|
|
188
|
+
# Load existing reference model
|
|
189
|
+
scanvi_ref = scvi.model.SCANVI.load("reference_model/")
|
|
190
|
+
|
|
191
|
+
# Surgery: prepare for query integration
|
|
192
|
+
scanvi_ref.freeze_layers()
|
|
193
|
+
|
|
194
|
+
# Map query data
|
|
195
|
+
scvi.model.SCANVI.prepare_query_anndata(adata_query, scanvi_ref)
|
|
196
|
+
scanvi_query = scvi.model.SCANVI.load_query_data(adata_query, scanvi_ref)
|
|
197
|
+
|
|
198
|
+
# Train only query-specific parameters
|
|
199
|
+
scanvi_query.train(
|
|
200
|
+
max_epochs=200,
|
|
201
|
+
plan_kwargs={"weight_decay": 0.0}
|
|
202
|
+
)
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## Visualize Reference and Query Together
|
|
206
|
+
|
|
207
|
+
```python
|
|
208
|
+
# Concatenate for joint visualization
|
|
209
|
+
adata_ref.obs["dataset"] = "reference"
|
|
210
|
+
adata_query.obs["dataset"] = "query"
|
|
211
|
+
|
|
212
|
+
# Get latent representations
|
|
213
|
+
adata_ref.obsm["X_scANVI"] = scanvi_ref.get_latent_representation()
|
|
214
|
+
adata_query.obsm["X_scANVI"] = scanvi_query.get_latent_representation()
|
|
215
|
+
|
|
216
|
+
# Combine
|
|
217
|
+
adata_combined = sc.concat([adata_ref, adata_query])
|
|
218
|
+
|
|
219
|
+
# Compute combined UMAP
|
|
220
|
+
sc.pp.neighbors(adata_combined, use_rep="X_scANVI")
|
|
221
|
+
sc.tl.umap(adata_combined)
|
|
222
|
+
|
|
223
|
+
# Plot
|
|
224
|
+
sc.pl.umap(
|
|
225
|
+
adata_combined,
|
|
226
|
+
color=["dataset", "cell_type", "predicted_cell_type"],
|
|
227
|
+
ncols=2
|
|
228
|
+
)
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## Quality Control for Predictions
|
|
232
|
+
|
|
233
|
+
### Confidence Filtering
|
|
234
|
+
|
|
235
|
+
```python
|
|
236
|
+
# Filter predictions by confidence
|
|
237
|
+
confidence_threshold = 0.7
|
|
238
|
+
|
|
239
|
+
high_conf = adata_query[adata_query.obs['prediction_score'] >= confidence_threshold].copy()
|
|
240
|
+
low_conf = adata_query[adata_query.obs['prediction_score'] < confidence_threshold].copy()
|
|
241
|
+
|
|
242
|
+
print(f"High confidence: {len(high_conf)} ({len(high_conf)/len(adata_query)*100:.1f}%)")
|
|
243
|
+
print(f"Low confidence: {len(low_conf)} ({len(low_conf)/len(adata_query)*100:.1f}%)")
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
### Marker Validation
|
|
247
|
+
|
|
248
|
+
```python
|
|
249
|
+
# Validate predictions with known markers
|
|
250
|
+
markers = {
|
|
251
|
+
'T cells': ['CD3D', 'CD3E'],
|
|
252
|
+
'B cells': ['CD19', 'MS4A1'],
|
|
253
|
+
'Monocytes': ['CD14', 'LYZ']
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
for ct, genes in markers.items():
|
|
257
|
+
ct_cells = adata_query[adata_query.obs['predicted_cell_type'] == ct]
|
|
258
|
+
if len(ct_cells) > 0:
|
|
259
|
+
for gene in genes:
|
|
260
|
+
if gene in adata_query.var_names:
|
|
261
|
+
expr = ct_cells[:, gene].X.mean()
|
|
262
|
+
print(f"{ct} - {gene}: {expr:.3f}")
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
## Complete Pipeline
|
|
266
|
+
|
|
267
|
+
```python
|
|
268
|
+
def transfer_labels(
|
|
269
|
+
adata_ref,
|
|
270
|
+
adata_query,
|
|
271
|
+
cell_type_key="cell_type",
|
|
272
|
+
batch_key=None,
|
|
273
|
+
n_top_genes=3000,
|
|
274
|
+
confidence_threshold=0.5
|
|
275
|
+
):
|
|
276
|
+
"""
|
|
277
|
+
Transfer cell type labels from reference to query.
|
|
278
|
+
|
|
279
|
+
Parameters
|
|
280
|
+
----------
|
|
281
|
+
adata_ref : AnnData
|
|
282
|
+
Annotated reference data
|
|
283
|
+
adata_query : AnnData
|
|
284
|
+
Unannotated query data
|
|
285
|
+
cell_type_key : str
|
|
286
|
+
Column with cell type annotations in reference
|
|
287
|
+
batch_key : str, optional
|
|
288
|
+
Batch column
|
|
289
|
+
n_top_genes : int
|
|
290
|
+
Number of HVGs
|
|
291
|
+
confidence_threshold : float
|
|
292
|
+
Minimum confidence for predictions
|
|
293
|
+
|
|
294
|
+
Returns
|
|
295
|
+
-------
|
|
296
|
+
AnnData with predictions
|
|
297
|
+
"""
|
|
298
|
+
import scvi
|
|
299
|
+
import scanpy as sc
|
|
300
|
+
|
|
301
|
+
# Prepare reference
|
|
302
|
+
adata_ref = adata_ref.copy()
|
|
303
|
+
adata_ref.layers["counts"] = adata_ref.X.copy()
|
|
304
|
+
|
|
305
|
+
sc.pp.highly_variable_genes(
|
|
306
|
+
adata_ref,
|
|
307
|
+
n_top_genes=n_top_genes,
|
|
308
|
+
flavor="seurat_v3",
|
|
309
|
+
batch_key=batch_key,
|
|
310
|
+
layer="counts"
|
|
311
|
+
)
|
|
312
|
+
adata_ref = adata_ref[:, adata_ref.var["highly_variable"]].copy()
|
|
313
|
+
|
|
314
|
+
# Train reference model
|
|
315
|
+
scvi.model.SCVI.setup_anndata(adata_ref, layer="counts", batch_key=batch_key)
|
|
316
|
+
scvi_ref = scvi.model.SCVI(adata_ref, n_latent=30)
|
|
317
|
+
scvi_ref.train(max_epochs=200)
|
|
318
|
+
|
|
319
|
+
scanvi_ref = scvi.model.SCANVI.from_scvi_model(
|
|
320
|
+
scvi_ref,
|
|
321
|
+
labels_key=cell_type_key,
|
|
322
|
+
unlabeled_category="Unknown"
|
|
323
|
+
)
|
|
324
|
+
scanvi_ref.train(max_epochs=50)
|
|
325
|
+
|
|
326
|
+
# Prepare query
|
|
327
|
+
adata_query = adata_query[:, adata_ref.var_names].copy()
|
|
328
|
+
adata_query.layers["counts"] = adata_query.X.copy()
|
|
329
|
+
|
|
330
|
+
# Map query
|
|
331
|
+
scvi.model.SCANVI.prepare_query_anndata(adata_query, scanvi_ref)
|
|
332
|
+
scanvi_query = scvi.model.SCANVI.load_query_data(adata_query, scanvi_ref)
|
|
333
|
+
scanvi_query.train(max_epochs=100, plan_kwargs={"weight_decay": 0.0})
|
|
334
|
+
|
|
335
|
+
# Get predictions
|
|
336
|
+
adata_query.obs["predicted_cell_type"] = scanvi_query.predict()
|
|
337
|
+
soft = scanvi_query.predict(soft=True)
|
|
338
|
+
adata_query.obs["prediction_score"] = soft.max(axis=1)
|
|
339
|
+
|
|
340
|
+
# Mark low confidence
|
|
341
|
+
adata_query.obs["confident_prediction"] = adata_query.obs["prediction_score"] >= confidence_threshold
|
|
342
|
+
|
|
343
|
+
# Add latent representation
|
|
344
|
+
adata_query.obsm["X_scANVI"] = scanvi_query.get_latent_representation()
|
|
345
|
+
|
|
346
|
+
return adata_query, scanvi_ref, scanvi_query
|
|
347
|
+
|
|
348
|
+
# Usage
|
|
349
|
+
adata_annotated, ref_model, query_model = transfer_labels(
|
|
350
|
+
adata_ref,
|
|
351
|
+
adata_query,
|
|
352
|
+
cell_type_key="cell_type"
|
|
353
|
+
)
|
|
354
|
+
|
|
355
|
+
# Visualize
|
|
356
|
+
sc.pp.neighbors(adata_annotated, use_rep="X_scANVI")
|
|
357
|
+
sc.tl.umap(adata_annotated)
|
|
358
|
+
sc.pl.umap(adata_annotated, color=['predicted_cell_type', 'prediction_score'])
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
## Troubleshooting
|
|
362
|
+
|
|
363
|
+
| Issue | Cause | Solution |
|
|
364
|
+
|-------|-------|----------|
|
|
365
|
+
| Many low-confidence predictions | Query has novel cell types | Manually annotate low-confidence cells |
|
|
366
|
+
| Wrong predictions | Reference doesn't match tissue | Use tissue-appropriate reference |
|
|
367
|
+
| Gene mismatch | Different gene naming | Convert gene IDs |
|
|
368
|
+
| All same prediction | Query too different | Check data quality, try different reference |
|
|
369
|
+
|
|
370
|
+
## Key References
|
|
371
|
+
|
|
372
|
+
- Xu et al. (2021) "Probabilistic harmonization and annotation of single-cell transcriptomics data with deep generative models"
|
|
373
|
+
- Lotfollahi et al. (2022) "Mapping single-cell data to reference atlases by transfer learning"
|