@wentorai/research-plugins 1.0.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 +21 -0
- package/README.md +204 -0
- package/curated/analysis/README.md +64 -0
- package/curated/domains/README.md +104 -0
- package/curated/literature/README.md +53 -0
- package/curated/research/README.md +62 -0
- package/curated/tools/README.md +87 -0
- package/curated/writing/README.md +61 -0
- package/index.ts +39 -0
- package/mcp-configs/academic-db/ChatSpatial.json +17 -0
- package/mcp-configs/academic-db/academia-mcp.json +17 -0
- package/mcp-configs/academic-db/academic-paper-explorer.json +17 -0
- package/mcp-configs/academic-db/academic-search-mcp-server.json +17 -0
- package/mcp-configs/academic-db/agentinterviews-mcp.json +17 -0
- package/mcp-configs/academic-db/all-in-mcp.json +17 -0
- package/mcp-configs/academic-db/apple-health-mcp.json +17 -0
- package/mcp-configs/academic-db/arxiv-latex-mcp.json +17 -0
- package/mcp-configs/academic-db/arxiv-mcp-server.json +17 -0
- package/mcp-configs/academic-db/bgpt-mcp.json +17 -0
- package/mcp-configs/academic-db/biomcp.json +17 -0
- package/mcp-configs/academic-db/biothings-mcp.json +17 -0
- package/mcp-configs/academic-db/catalysishub-mcp-server.json +17 -0
- package/mcp-configs/academic-db/clinicaltrialsgov-mcp-server.json +17 -0
- package/mcp-configs/academic-db/deep-research-mcp.json +17 -0
- package/mcp-configs/academic-db/dicom-mcp.json +17 -0
- package/mcp-configs/academic-db/enrichr-mcp-server.json +17 -0
- package/mcp-configs/academic-db/fec-mcp-server.json +17 -0
- package/mcp-configs/academic-db/fhir-mcp-server-themomentum.json +17 -0
- package/mcp-configs/academic-db/fhir-mcp.json +19 -0
- package/mcp-configs/academic-db/gget-mcp.json +17 -0
- package/mcp-configs/academic-db/google-researcher-mcp.json +17 -0
- package/mcp-configs/academic-db/idea-reality-mcp.json +17 -0
- package/mcp-configs/academic-db/legiscan-mcp.json +19 -0
- package/mcp-configs/academic-db/lex.json +17 -0
- package/mcp-configs/ai-platform/Adaptive-Graph-of-Thoughts-MCP-server.json +17 -0
- package/mcp-configs/ai-platform/ai-counsel.json +17 -0
- package/mcp-configs/ai-platform/atlas-mcp-server.json +17 -0
- package/mcp-configs/ai-platform/counsel-mcp.json +17 -0
- package/mcp-configs/ai-platform/cross-llm-mcp.json +17 -0
- package/mcp-configs/ai-platform/gptr-mcp.json +17 -0
- package/mcp-configs/browser/decipher-research-agent.json +17 -0
- package/mcp-configs/browser/deep-research.json +17 -0
- package/mcp-configs/browser/everything-claude-code.json +17 -0
- package/mcp-configs/browser/gpt-researcher.json +17 -0
- package/mcp-configs/browser/heurist-agent-framework.json +17 -0
- package/mcp-configs/data-platform/4everland-hosting-mcp.json +17 -0
- package/mcp-configs/data-platform/context-keeper.json +17 -0
- package/mcp-configs/data-platform/context7.json +19 -0
- package/mcp-configs/data-platform/contextstream-mcp.json +17 -0
- package/mcp-configs/data-platform/email-mcp.json +17 -0
- package/mcp-configs/note-knowledge/ApeRAG.json +17 -0
- package/mcp-configs/note-knowledge/In-Memoria.json +17 -0
- package/mcp-configs/note-knowledge/agent-memory.json +17 -0
- package/mcp-configs/note-knowledge/aimemo.json +17 -0
- package/mcp-configs/note-knowledge/biel-mcp.json +19 -0
- package/mcp-configs/note-knowledge/cognee.json +17 -0
- package/mcp-configs/note-knowledge/context-awesome.json +17 -0
- package/mcp-configs/note-knowledge/context-mcp.json +17 -0
- package/mcp-configs/note-knowledge/conversation-handoff-mcp.json +17 -0
- package/mcp-configs/note-knowledge/cortex.json +17 -0
- package/mcp-configs/note-knowledge/devrag.json +17 -0
- package/mcp-configs/note-knowledge/easy-obsidian-mcp.json +17 -0
- package/mcp-configs/note-knowledge/engram.json +17 -0
- package/mcp-configs/note-knowledge/gnosis-mcp.json +17 -0
- package/mcp-configs/note-knowledge/graphlit-mcp-server.json +19 -0
- package/mcp-configs/reference-mgr/arxiv-cli.json +17 -0
- package/mcp-configs/reference-mgr/arxiv-search-mcp.json +17 -0
- package/mcp-configs/reference-mgr/chiken.json +17 -0
- package/mcp-configs/reference-mgr/claude-scholar.json +17 -0
- package/mcp-configs/reference-mgr/devonthink-mcp.json +17 -0
- package/mcp-configs/registry.json +447 -0
- package/openclaw.plugin.json +21 -0
- package/package.json +61 -0
- package/skills/analysis/dataviz/color-accessibility-guide/SKILL.md +230 -0
- package/skills/analysis/dataviz/geospatial-viz-guide/SKILL.md +218 -0
- package/skills/analysis/dataviz/interactive-viz-guide/SKILL.md +287 -0
- package/skills/analysis/dataviz/network-visualization-guide/SKILL.md +195 -0
- package/skills/analysis/dataviz/publication-figures-guide/SKILL.md +238 -0
- package/skills/analysis/dataviz/python-dataviz-guide/SKILL.md +195 -0
- package/skills/analysis/econometrics/causal-inference-guide/SKILL.md +197 -0
- package/skills/analysis/econometrics/iv-regression-guide/SKILL.md +198 -0
- package/skills/analysis/econometrics/panel-data-guide/SKILL.md +274 -0
- package/skills/analysis/econometrics/robustness-checks/SKILL.md +250 -0
- package/skills/analysis/econometrics/stata-regression/SKILL.md +117 -0
- package/skills/analysis/econometrics/time-series-guide/SKILL.md +235 -0
- package/skills/analysis/statistics/bayesian-statistics-guide/SKILL.md +221 -0
- package/skills/analysis/statistics/hypothesis-testing-guide/SKILL.md +210 -0
- package/skills/analysis/statistics/meta-analysis-guide/SKILL.md +206 -0
- package/skills/analysis/statistics/nonparametric-tests-guide/SKILL.md +221 -0
- package/skills/analysis/statistics/power-analysis-guide/SKILL.md +240 -0
- package/skills/analysis/statistics/sem-guide/SKILL.md +231 -0
- package/skills/analysis/statistics/survival-analysis-guide/SKILL.md +195 -0
- package/skills/analysis/wrangling/missing-data-handling/SKILL.md +224 -0
- package/skills/analysis/wrangling/pandas-data-wrangling/SKILL.md +242 -0
- package/skills/analysis/wrangling/questionnaire-design-guide/SKILL.md +234 -0
- package/skills/analysis/wrangling/text-mining-guide/SKILL.md +225 -0
- package/skills/domains/ai-ml/computer-vision-guide/SKILL.md +213 -0
- package/skills/domains/ai-ml/deep-learning-papers-guide/SKILL.md +200 -0
- package/skills/domains/ai-ml/llm-evaluation-guide/SKILL.md +194 -0
- package/skills/domains/ai-ml/prompt-engineering-research/SKILL.md +233 -0
- package/skills/domains/ai-ml/reinforcement-learning-guide/SKILL.md +254 -0
- package/skills/domains/ai-ml/transformer-architecture-guide/SKILL.md +233 -0
- package/skills/domains/biomedical/clinical-research-guide/SKILL.md +232 -0
- package/skills/domains/biomedical/clinicaltrials-api/SKILL.md +177 -0
- package/skills/domains/biomedical/epidemiology-guide/SKILL.md +200 -0
- package/skills/domains/biomedical/genomics-analysis-guide/SKILL.md +270 -0
- package/skills/domains/business/market-analysis-guide/SKILL.md +112 -0
- package/skills/domains/business/strategic-management-guide/SKILL.md +154 -0
- package/skills/domains/chemistry/computational-chemistry-guide/SKILL.md +266 -0
- package/skills/domains/chemistry/retrosynthesis-guide/SKILL.md +215 -0
- package/skills/domains/cs/algorithms-complexity-guide/SKILL.md +194 -0
- package/skills/domains/cs/dblp-api/SKILL.md +129 -0
- package/skills/domains/cs/software-engineering-research/SKILL.md +218 -0
- package/skills/domains/ecology/biodiversity-data-guide/SKILL.md +296 -0
- package/skills/domains/ecology/conservation-biology-guide/SKILL.md +198 -0
- package/skills/domains/ecology/gbif-api/SKILL.md +158 -0
- package/skills/domains/ecology/inaturalist-api/SKILL.md +173 -0
- package/skills/domains/economics/behavioral-economics-guide/SKILL.md +239 -0
- package/skills/domains/economics/development-economics-guide/SKILL.md +181 -0
- package/skills/domains/economics/fred-api/SKILL.md +189 -0
- package/skills/domains/education/curriculum-design-guide/SKILL.md +144 -0
- package/skills/domains/education/learning-science-guide/SKILL.md +150 -0
- package/skills/domains/finance/financial-data-analysis/SKILL.md +152 -0
- package/skills/domains/finance/quantitative-finance-guide/SKILL.md +151 -0
- package/skills/domains/geoscience/climate-science-guide/SKILL.md +158 -0
- package/skills/domains/geoscience/gis-remote-sensing-guide/SKILL.md +129 -0
- package/skills/domains/humanities/digital-humanities-guide/SKILL.md +181 -0
- package/skills/domains/humanities/philosophy-research-guide/SKILL.md +148 -0
- package/skills/domains/law/courtlistener-api/SKILL.md +213 -0
- package/skills/domains/law/legal-research-guide/SKILL.md +250 -0
- package/skills/domains/math/linear-algebra-applications/SKILL.md +227 -0
- package/skills/domains/math/numerical-methods-guide/SKILL.md +236 -0
- package/skills/domains/math/oeis-api/SKILL.md +158 -0
- package/skills/domains/pharma/clinical-pharmacology-guide/SKILL.md +165 -0
- package/skills/domains/pharma/drug-development-guide/SKILL.md +177 -0
- package/skills/domains/physics/computational-physics-guide/SKILL.md +300 -0
- package/skills/domains/physics/nasa-ads-api/SKILL.md +150 -0
- package/skills/domains/physics/quantum-computing-guide/SKILL.md +234 -0
- package/skills/domains/social-science/social-research-methods/SKILL.md +194 -0
- package/skills/domains/social-science/survey-research-guide/SKILL.md +182 -0
- package/skills/literature/discovery/citation-alert-guide/SKILL.md +154 -0
- package/skills/literature/discovery/conference-proceedings-guide/SKILL.md +142 -0
- package/skills/literature/discovery/literature-mapping-guide/SKILL.md +175 -0
- package/skills/literature/discovery/paper-tracking-guide/SKILL.md +211 -0
- package/skills/literature/discovery/rss-paper-feeds/SKILL.md +214 -0
- package/skills/literature/discovery/semantic-scholar-recs-guide/SKILL.md +164 -0
- package/skills/literature/fulltext/doaj-api/SKILL.md +120 -0
- package/skills/literature/fulltext/interlibrary-loan-guide/SKILL.md +163 -0
- package/skills/literature/fulltext/open-access-guide/SKILL.md +183 -0
- package/skills/literature/fulltext/pmc-oai-api/SKILL.md +184 -0
- package/skills/literature/fulltext/preprint-servers-guide/SKILL.md +128 -0
- package/skills/literature/fulltext/repository-harvesting-guide/SKILL.md +207 -0
- package/skills/literature/fulltext/unpaywall-api/SKILL.md +113 -0
- package/skills/literature/metadata/altmetrics-guide/SKILL.md +132 -0
- package/skills/literature/metadata/citation-network-guide/SKILL.md +236 -0
- package/skills/literature/metadata/crossref-api/SKILL.md +133 -0
- package/skills/literature/metadata/datacite-api/SKILL.md +126 -0
- package/skills/literature/metadata/doi-resolution-guide/SKILL.md +168 -0
- package/skills/literature/metadata/h-index-guide/SKILL.md +183 -0
- package/skills/literature/metadata/journal-metrics-guide/SKILL.md +188 -0
- package/skills/literature/metadata/opencitations-api/SKILL.md +128 -0
- package/skills/literature/metadata/orcid-api/SKILL.md +136 -0
- package/skills/literature/metadata/orcid-integration-guide/SKILL.md +178 -0
- package/skills/literature/search/arxiv-api/SKILL.md +95 -0
- package/skills/literature/search/biorxiv-api/SKILL.md +123 -0
- package/skills/literature/search/boolean-search-guide/SKILL.md +199 -0
- package/skills/literature/search/citation-chaining-guide/SKILL.md +148 -0
- package/skills/literature/search/database-comparison-guide/SKILL.md +100 -0
- package/skills/literature/search/europe-pmc-api/SKILL.md +120 -0
- package/skills/literature/search/google-scholar-guide/SKILL.md +182 -0
- package/skills/literature/search/mesh-terms-guide/SKILL.md +164 -0
- package/skills/literature/search/openalex-api/SKILL.md +134 -0
- package/skills/literature/search/pubmed-api/SKILL.md +130 -0
- package/skills/literature/search/scientify-literature-survey/SKILL.md +203 -0
- package/skills/literature/search/semantic-scholar-api/SKILL.md +134 -0
- package/skills/literature/search/systematic-search-strategy/SKILL.md +214 -0
- package/skills/research/automation/ai-scientist-guide/SKILL.md +228 -0
- package/skills/research/automation/data-collection-automation/SKILL.md +248 -0
- package/skills/research/automation/research-workflow-automation/SKILL.md +266 -0
- package/skills/research/deep-research/meta-synthesis-guide/SKILL.md +174 -0
- package/skills/research/deep-research/research-cog/SKILL.md +153 -0
- package/skills/research/deep-research/scoping-review-guide/SKILL.md +217 -0
- package/skills/research/deep-research/systematic-review-guide/SKILL.md +250 -0
- package/skills/research/funding/figshare-api/SKILL.md +163 -0
- package/skills/research/funding/grant-writing-guide/SKILL.md +233 -0
- package/skills/research/funding/nsf-grant-guide/SKILL.md +206 -0
- package/skills/research/funding/open-science-guide/SKILL.md +255 -0
- package/skills/research/funding/zenodo-api/SKILL.md +174 -0
- package/skills/research/methodology/action-research-guide/SKILL.md +201 -0
- package/skills/research/methodology/experimental-design-guide/SKILL.md +236 -0
- package/skills/research/methodology/grad-school-guide/SKILL.md +182 -0
- package/skills/research/methodology/grounded-theory-guide/SKILL.md +171 -0
- package/skills/research/methodology/mixed-methods-guide/SKILL.md +208 -0
- package/skills/research/methodology/qualitative-research-guide/SKILL.md +234 -0
- package/skills/research/methodology/scientify-idea-generation/SKILL.md +222 -0
- package/skills/research/paper-review/paper-reading-assistant/SKILL.md +266 -0
- package/skills/research/paper-review/peer-review-guide/SKILL.md +227 -0
- package/skills/research/paper-review/rebuttal-writing-guide/SKILL.md +185 -0
- package/skills/research/paper-review/scientify-write-review-paper/SKILL.md +209 -0
- package/skills/tools/code-exec/jupyter-notebook-guide/SKILL.md +178 -0
- package/skills/tools/code-exec/python-reproducibility-guide/SKILL.md +341 -0
- package/skills/tools/code-exec/r-reproducibility-guide/SKILL.md +236 -0
- package/skills/tools/code-exec/sandbox-execution-guide/SKILL.md +221 -0
- package/skills/tools/diagram/mermaid-diagram-guide/SKILL.md +269 -0
- package/skills/tools/diagram/plantuml-guide/SKILL.md +397 -0
- package/skills/tools/diagram/scientific-illustration-guide/SKILL.md +225 -0
- package/skills/tools/document/anystyle-api/SKILL.md +199 -0
- package/skills/tools/document/grobid-pdf-parsing/SKILL.md +294 -0
- package/skills/tools/document/markdown-academic-guide/SKILL.md +217 -0
- package/skills/tools/document/pdf-extraction-guide/SKILL.md +321 -0
- package/skills/tools/knowledge-graph/knowledge-graph-construction/SKILL.md +306 -0
- package/skills/tools/knowledge-graph/ontology-design-guide/SKILL.md +214 -0
- package/skills/tools/knowledge-graph/rag-methodology-guide/SKILL.md +325 -0
- package/skills/tools/ocr-translate/formula-recognition-guide/SKILL.md +367 -0
- package/skills/tools/ocr-translate/handwriting-recognition-guide/SKILL.md +211 -0
- package/skills/tools/ocr-translate/latex-ocr-guide/SKILL.md +204 -0
- package/skills/tools/ocr-translate/multilingual-research-guide/SKILL.md +234 -0
- package/skills/tools/scraping/academic-web-scraping/SKILL.md +326 -0
- package/skills/tools/scraping/api-data-collection-guide/SKILL.md +301 -0
- package/skills/tools/scraping/web-scraping-ethics-guide/SKILL.md +250 -0
- package/skills/writing/citation/bibtex-management-guide/SKILL.md +246 -0
- package/skills/writing/citation/citation-style-guide/SKILL.md +248 -0
- package/skills/writing/citation/reference-manager-comparison/SKILL.md +208 -0
- package/skills/writing/citation/zotero-api/SKILL.md +188 -0
- package/skills/writing/composition/abstract-writing-guide/SKILL.md +188 -0
- package/skills/writing/composition/discussion-writing-guide/SKILL.md +194 -0
- package/skills/writing/composition/introduction-writing-guide/SKILL.md +194 -0
- package/skills/writing/composition/literature-review-writing/SKILL.md +196 -0
- package/skills/writing/composition/methods-section-guide/SKILL.md +185 -0
- package/skills/writing/composition/response-to-reviewers/SKILL.md +215 -0
- package/skills/writing/composition/scientific-writing-guide/SKILL.md +152 -0
- package/skills/writing/latex/bibliography-management-guide/SKILL.md +206 -0
- package/skills/writing/latex/latex-drawing-guide/SKILL.md +234 -0
- package/skills/writing/latex/latex-ecosystem-guide/SKILL.md +240 -0
- package/skills/writing/latex/math-typesetting-guide/SKILL.md +231 -0
- package/skills/writing/latex/overleaf-collaboration-guide/SKILL.md +211 -0
- package/skills/writing/latex/tikz-diagrams-guide/SKILL.md +211 -0
- package/skills/writing/polish/academic-translation-guide/SKILL.md +175 -0
- package/skills/writing/polish/academic-writing-refiner/SKILL.md +143 -0
- package/skills/writing/polish/ai-writing-humanizer/SKILL.md +178 -0
- package/skills/writing/polish/grammar-checker-guide/SKILL.md +184 -0
- package/skills/writing/polish/plagiarism-detection-guide/SKILL.md +167 -0
- package/skills/writing/templates/beamer-presentation-guide/SKILL.md +263 -0
- package/skills/writing/templates/conference-paper-template/SKILL.md +219 -0
- package/skills/writing/templates/thesis-template-guide/SKILL.md +200 -0
- package/skills/writing/templates/thesis-writing-guide/SKILL.md +220 -0
- package/src/tools/arxiv.ts +131 -0
- package/src/tools/crossref.ts +112 -0
- package/src/tools/openalex.ts +174 -0
- package/src/tools/pubmed.ts +166 -0
- package/src/tools/semantic-scholar.ts +108 -0
- package/src/tools/unpaywall.ts +58 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: epidemiology-guide
|
|
3
|
+
description: "Epidemiological study designs, measures of association, and public health ana..."
|
|
4
|
+
metadata:
|
|
5
|
+
openclaw:
|
|
6
|
+
emoji: "microscope"
|
|
7
|
+
category: "domains"
|
|
8
|
+
subcategory: "biomedical"
|
|
9
|
+
keywords: ["epidemiology", "public health", "evidence-based medicine", "clinical medicine", "disease surveillance"]
|
|
10
|
+
source: "wentor"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Epidemiology Guide
|
|
14
|
+
|
|
15
|
+
A skill for designing and analyzing epidemiological studies. Covers study design selection, measures of disease frequency and association, bias assessment, and public health data analysis methods.
|
|
16
|
+
|
|
17
|
+
## Study Design Selection
|
|
18
|
+
|
|
19
|
+
### Design Hierarchy
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
Evidence Strength
|
|
23
|
+
|
|
|
24
|
+
Systematic Review / Meta-Analysis (Highest)
|
|
25
|
+
|
|
|
26
|
+
Randomized Controlled Trial
|
|
27
|
+
|
|
|
28
|
+
Cohort Study (Prospective)
|
|
29
|
+
|
|
|
30
|
+
Case-Control Study
|
|
31
|
+
|
|
|
32
|
+
Cross-Sectional Study
|
|
33
|
+
|
|
|
34
|
+
Case Report / Case Series (Lowest)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### When to Use Each Design
|
|
38
|
+
|
|
39
|
+
| Design | Research Question | Time | Cost | Bias Risk |
|
|
40
|
+
|--------|------------------|------|------|-----------|
|
|
41
|
+
| RCT | Does intervention X prevent outcome Y? | Years | Very high | Lowest |
|
|
42
|
+
| Prospective Cohort | Does exposure X increase risk of Y? | Years | High | Moderate |
|
|
43
|
+
| Retrospective Cohort | Historical exposure-outcome relationship? | Months | Moderate | Moderate-High |
|
|
44
|
+
| Case-Control | What exposures are associated with rare disease? | Months | Low | High |
|
|
45
|
+
| Cross-Sectional | What is the prevalence of X? | Weeks | Low | High |
|
|
46
|
+
| Ecological | Do population-level factors correlate with disease? | Weeks | Very low | Very high |
|
|
47
|
+
|
|
48
|
+
## Measures of Disease Frequency
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
import numpy as np
|
|
52
|
+
|
|
53
|
+
def compute_measures(cases: int, population: int,
|
|
54
|
+
person_time: float = None,
|
|
55
|
+
period_years: float = 1.0) -> dict:
|
|
56
|
+
"""
|
|
57
|
+
Compute basic epidemiological measures.
|
|
58
|
+
|
|
59
|
+
Args:
|
|
60
|
+
cases: Number of new cases (for incidence) or existing cases (for prevalence)
|
|
61
|
+
population: Population at risk
|
|
62
|
+
person_time: Person-years of follow-up (for incidence rate)
|
|
63
|
+
period_years: Time period in years (for cumulative incidence)
|
|
64
|
+
"""
|
|
65
|
+
measures = {}
|
|
66
|
+
|
|
67
|
+
# Point prevalence
|
|
68
|
+
measures['prevalence'] = {
|
|
69
|
+
'value': cases / population,
|
|
70
|
+
'per_1000': (cases / population) * 1000,
|
|
71
|
+
'formula': 'cases / population at a point in time'
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
# Cumulative incidence (risk)
|
|
75
|
+
measures['cumulative_incidence'] = {
|
|
76
|
+
'value': cases / population,
|
|
77
|
+
'per_1000': (cases / population) * 1000,
|
|
78
|
+
'period_years': period_years,
|
|
79
|
+
'formula': 'new cases / population at risk during time period'
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
# Incidence rate (if person-time available)
|
|
83
|
+
if person_time:
|
|
84
|
+
measures['incidence_rate'] = {
|
|
85
|
+
'value': cases / person_time,
|
|
86
|
+
'per_1000_py': (cases / person_time) * 1000,
|
|
87
|
+
'formula': 'new cases / person-time at risk'
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return measures
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Measures of Association
|
|
94
|
+
|
|
95
|
+
### Risk Ratio, Odds Ratio, and Attributable Risk
|
|
96
|
+
|
|
97
|
+
```python
|
|
98
|
+
def measures_of_association(a: int, b: int, c: int, d: int) -> dict:
|
|
99
|
+
"""
|
|
100
|
+
Compute epidemiological measures of association from a 2x2 table.
|
|
101
|
+
|
|
102
|
+
Disease+ Disease-
|
|
103
|
+
Exposed+ a b a+b
|
|
104
|
+
Exposed- c d c+d
|
|
105
|
+
a+c b+d N
|
|
106
|
+
|
|
107
|
+
Args:
|
|
108
|
+
a: Exposed with disease
|
|
109
|
+
b: Exposed without disease
|
|
110
|
+
c: Unexposed with disease
|
|
111
|
+
d: Unexposed without disease
|
|
112
|
+
"""
|
|
113
|
+
# Risk in exposed and unexposed
|
|
114
|
+
risk_exposed = a / (a + b)
|
|
115
|
+
risk_unexposed = c / (c + d)
|
|
116
|
+
|
|
117
|
+
# Risk Ratio (Relative Risk)
|
|
118
|
+
rr = risk_exposed / risk_unexposed
|
|
119
|
+
ln_rr = np.log(rr)
|
|
120
|
+
se_ln_rr = np.sqrt(1/a - 1/(a+b) + 1/c - 1/(c+d))
|
|
121
|
+
rr_ci = (np.exp(ln_rr - 1.96*se_ln_rr), np.exp(ln_rr + 1.96*se_ln_rr))
|
|
122
|
+
|
|
123
|
+
# Odds Ratio
|
|
124
|
+
or_val = (a * d) / (b * c)
|
|
125
|
+
ln_or = np.log(or_val)
|
|
126
|
+
se_ln_or = np.sqrt(1/a + 1/b + 1/c + 1/d)
|
|
127
|
+
or_ci = (np.exp(ln_or - 1.96*se_ln_or), np.exp(ln_or + 1.96*se_ln_or))
|
|
128
|
+
|
|
129
|
+
# Attributable Risk (Risk Difference)
|
|
130
|
+
ar = risk_exposed - risk_unexposed
|
|
131
|
+
se_ar = np.sqrt(risk_exposed*(1-risk_exposed)/(a+b) +
|
|
132
|
+
risk_unexposed*(1-risk_unexposed)/(c+d))
|
|
133
|
+
ar_ci = (ar - 1.96*se_ar, ar + 1.96*se_ar)
|
|
134
|
+
|
|
135
|
+
# Attributable Fraction in Exposed
|
|
136
|
+
af_exposed = (rr - 1) / rr
|
|
137
|
+
|
|
138
|
+
# Population Attributable Fraction
|
|
139
|
+
prevalence_exposure = (a + b) / (a + b + c + d)
|
|
140
|
+
paf = prevalence_exposure * (rr - 1) / (prevalence_exposure * (rr - 1) + 1)
|
|
141
|
+
|
|
142
|
+
return {
|
|
143
|
+
'risk_ratio': {'value': round(rr, 3), 'ci_95': tuple(round(x, 3) for x in rr_ci)},
|
|
144
|
+
'odds_ratio': {'value': round(or_val, 3), 'ci_95': tuple(round(x, 3) for x in or_ci)},
|
|
145
|
+
'risk_difference': {'value': round(ar, 4), 'ci_95': tuple(round(x, 4) for x in ar_ci)},
|
|
146
|
+
'attributable_fraction_exposed': round(af_exposed, 3),
|
|
147
|
+
'population_attributable_fraction': round(paf, 3),
|
|
148
|
+
'number_needed_to_harm': round(1/ar, 1) if ar > 0 else None
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
# Example: smoking and lung cancer
|
|
152
|
+
result = measures_of_association(a=80, b=920, c=10, d=990)
|
|
153
|
+
print(f"RR: {result['risk_ratio']['value']} ({result['risk_ratio']['ci_95']})")
|
|
154
|
+
print(f"OR: {result['odds_ratio']['value']} ({result['odds_ratio']['ci_95']})")
|
|
155
|
+
print(f"PAF: {result['population_attributable_fraction']}")
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Bias Assessment
|
|
159
|
+
|
|
160
|
+
### Types of Bias and Mitigation
|
|
161
|
+
|
|
162
|
+
| Bias Type | Description | Mitigation Strategy |
|
|
163
|
+
|-----------|------------|-------------------|
|
|
164
|
+
| Selection bias | Non-random sample selection | Random sampling, matching |
|
|
165
|
+
| Information bias | Measurement error in exposure/outcome | Validated instruments, blinding |
|
|
166
|
+
| Recall bias | Differential recall by disease status | Use records, not self-report |
|
|
167
|
+
| Confounding | Third variable affects both exposure and outcome | Stratification, regression, matching |
|
|
168
|
+
| Lead-time bias | Earlier detection misinterpreted as longer survival | Use mortality, not survival |
|
|
169
|
+
| Healthy worker effect | Workers are healthier than general population | Use employed comparison group |
|
|
170
|
+
|
|
171
|
+
### Confounding Assessment
|
|
172
|
+
|
|
173
|
+
```python
|
|
174
|
+
def assess_confounding(crude_rr: float, adjusted_rr: float,
|
|
175
|
+
threshold: float = 0.10) -> dict:
|
|
176
|
+
"""
|
|
177
|
+
Assess whether a variable is a confounder.
|
|
178
|
+
"""
|
|
179
|
+
pct_change = abs(crude_rr - adjusted_rr) / crude_rr * 100
|
|
180
|
+
|
|
181
|
+
return {
|
|
182
|
+
'crude_RR': crude_rr,
|
|
183
|
+
'adjusted_RR': adjusted_rr,
|
|
184
|
+
'percent_change': round(pct_change, 1),
|
|
185
|
+
'is_confounder': pct_change > threshold * 100,
|
|
186
|
+
'interpretation': (
|
|
187
|
+
f"{'Confounder detected' if pct_change > threshold * 100 else 'Not a confounder'}: "
|
|
188
|
+
f"adjusting changed the RR by {pct_change:.1f}% "
|
|
189
|
+
f"(threshold: {threshold*100:.0f}%)"
|
|
190
|
+
)
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## Survival Analysis
|
|
195
|
+
|
|
196
|
+
For time-to-event data, use Kaplan-Meier estimators for descriptive analysis, log-rank tests for group comparisons, and Cox proportional hazards regression for multivariable analysis. Always check the proportional hazards assumption using Schoenfeld residuals and report median survival times with 95% confidence intervals.
|
|
197
|
+
|
|
198
|
+
## Reporting Standards
|
|
199
|
+
|
|
200
|
+
Follow STROBE (observational studies), CONSORT (trials), or RECORD (routinely collected data) reporting guidelines. Report all measures with 95% confidence intervals. Present both crude and adjusted estimates to show the impact of confounding adjustment.
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: genomics-analysis-guide
|
|
3
|
+
description: "Workflows for RNA-seq, GWAS, and variant calling in genomic research"
|
|
4
|
+
metadata:
|
|
5
|
+
openclaw:
|
|
6
|
+
emoji: "microscope"
|
|
7
|
+
category: "domains"
|
|
8
|
+
subcategory: "biomedical"
|
|
9
|
+
keywords: ["genomics", "RNA-seq", "GWAS", "molecular biology", "genetics", "bioinformatics"]
|
|
10
|
+
source: "wentor-research-plugins"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Genomics Analysis Guide
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
Genomic data analysis is the computational backbone of modern molecular biology. From identifying disease-associated variants through Genome-Wide Association Studies (GWAS) to quantifying gene expression with RNA-seq, these workflows transform raw sequencing data into biological insights that drive discoveries in medicine, agriculture, and evolutionary biology.
|
|
18
|
+
|
|
19
|
+
This guide covers the three most common genomic analysis workflows: RNA-seq differential expression analysis, GWAS for variant-trait associations, and variant calling from whole-genome sequencing (WGS) data. Each workflow is described with tool recommendations, command-line examples, and downstream analysis steps in R and Python.
|
|
20
|
+
|
|
21
|
+
The emphasis is on reproducibility and best practices. Genomic analyses involve many sequential steps, and errors in early stages propagate through the entire pipeline. Following standardized workflows -- like those from the Broad Institute, ENCODE, and Bioconductor -- reduces the risk of methodological errors.
|
|
22
|
+
|
|
23
|
+
## RNA-seq Analysis Pipeline
|
|
24
|
+
|
|
25
|
+
### Workflow Overview
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
Raw FASTQ files
|
|
29
|
+
|
|
|
30
|
+
v
|
|
31
|
+
[Quality Control] --> FastQC, MultiQC
|
|
32
|
+
|
|
|
33
|
+
v
|
|
34
|
+
[Trimming] --> Trimmomatic, fastp
|
|
35
|
+
|
|
|
36
|
+
v
|
|
37
|
+
[Alignment] --> STAR, HISAT2
|
|
38
|
+
|
|
|
39
|
+
v
|
|
40
|
+
[Quantification] --> featureCounts, Salmon
|
|
41
|
+
|
|
|
42
|
+
v
|
|
43
|
+
[Differential Expression] --> DESeq2, edgeR
|
|
44
|
+
|
|
|
45
|
+
v
|
|
46
|
+
[Pathway Analysis] --> clusterProfiler, GSEA
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Step 1: Quality Control
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Run FastQC on all FASTQ files
|
|
53
|
+
fastqc -t 8 -o qc_results/ raw_data/*.fastq.gz
|
|
54
|
+
|
|
55
|
+
# Aggregate QC reports
|
|
56
|
+
multiqc qc_results/ -o multiqc_report/
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Step 2: Read Trimming
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# fastp for quality trimming and adapter removal
|
|
63
|
+
fastp \
|
|
64
|
+
--in1 sample_R1.fastq.gz \
|
|
65
|
+
--in2 sample_R2.fastq.gz \
|
|
66
|
+
--out1 trimmed_R1.fastq.gz \
|
|
67
|
+
--out2 trimmed_R2.fastq.gz \
|
|
68
|
+
--detect_adapter_for_pe \
|
|
69
|
+
--thread 8 \
|
|
70
|
+
--html fastp_report.html
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Step 3: Alignment with STAR
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Build genome index (one time)
|
|
77
|
+
STAR --runMode genomeGenerate \
|
|
78
|
+
--genomeDir star_index/ \
|
|
79
|
+
--genomeFastaFiles genome.fa \
|
|
80
|
+
--sjdbGTFfile annotations.gtf \
|
|
81
|
+
--runThreadN 16
|
|
82
|
+
|
|
83
|
+
# Align reads
|
|
84
|
+
STAR --runMode alignReads \
|
|
85
|
+
--genomeDir star_index/ \
|
|
86
|
+
--readFilesIn trimmed_R1.fastq.gz trimmed_R2.fastq.gz \
|
|
87
|
+
--readFilesCommand zcat \
|
|
88
|
+
--outSAMtype BAM SortedByCoordinate \
|
|
89
|
+
--quantMode GeneCounts \
|
|
90
|
+
--outFileNamePrefix sample_ \
|
|
91
|
+
--runThreadN 16
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Step 4: Differential Expression with DESeq2
|
|
95
|
+
|
|
96
|
+
```r
|
|
97
|
+
library(DESeq2)
|
|
98
|
+
|
|
99
|
+
# Load count matrix and sample info
|
|
100
|
+
counts <- read.csv("gene_counts.csv", row.names = 1)
|
|
101
|
+
coldata <- read.csv("sample_info.csv", row.names = 1)
|
|
102
|
+
|
|
103
|
+
# Create DESeq2 object
|
|
104
|
+
dds <- DESeqDataSetFromMatrix(
|
|
105
|
+
countData = counts,
|
|
106
|
+
colData = coldata,
|
|
107
|
+
design = ~ condition
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
# Filter low-count genes
|
|
111
|
+
keep <- rowSums(counts(dds) >= 10) >= 3
|
|
112
|
+
dds <- dds[keep, ]
|
|
113
|
+
|
|
114
|
+
# Run differential expression
|
|
115
|
+
dds <- DESeq(dds)
|
|
116
|
+
res <- results(dds, contrast = c("condition", "treated", "control"),
|
|
117
|
+
alpha = 0.05)
|
|
118
|
+
|
|
119
|
+
# Summary
|
|
120
|
+
summary(res)
|
|
121
|
+
|
|
122
|
+
# Export significant genes
|
|
123
|
+
sig_genes <- subset(as.data.frame(res), padj < 0.05 & abs(log2FoldChange) > 1)
|
|
124
|
+
write.csv(sig_genes, "significant_genes.csv")
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## GWAS Pipeline
|
|
128
|
+
|
|
129
|
+
### Workflow Overview
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
Genotype Data (VCF/PLINK)
|
|
133
|
+
|
|
|
134
|
+
v
|
|
135
|
+
[Quality Control] --> Sample/variant filtering
|
|
136
|
+
|
|
|
137
|
+
v
|
|
138
|
+
[Population Stratification] --> PCA
|
|
139
|
+
|
|
|
140
|
+
v
|
|
141
|
+
[Association Testing] --> PLINK2, REGENIE
|
|
142
|
+
|
|
|
143
|
+
v
|
|
144
|
+
[Multiple Testing Correction] --> Bonferroni, FDR
|
|
145
|
+
|
|
|
146
|
+
v
|
|
147
|
+
[Visualization] --> Manhattan plot, QQ plot
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### QC with PLINK2
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
# Sample QC
|
|
154
|
+
plink2 \
|
|
155
|
+
--bfile dataset \
|
|
156
|
+
--mind 0.05 \ # Remove samples with >5% missing
|
|
157
|
+
--geno 0.02 \ # Remove variants with >2% missing
|
|
158
|
+
--maf 0.01 \ # Remove rare variants (MAF < 1%)
|
|
159
|
+
--hwe 1e-6 \ # HWE filter
|
|
160
|
+
--make-bed \
|
|
161
|
+
--out dataset_qc
|
|
162
|
+
|
|
163
|
+
# LD pruning for PCA
|
|
164
|
+
plink2 \
|
|
165
|
+
--bfile dataset_qc \
|
|
166
|
+
--indep-pairwise 50 5 0.2 \
|
|
167
|
+
--out pruned
|
|
168
|
+
|
|
169
|
+
# PCA for population stratification
|
|
170
|
+
plink2 \
|
|
171
|
+
--bfile dataset_qc \
|
|
172
|
+
--extract pruned.prune.in \
|
|
173
|
+
--pca 10 \
|
|
174
|
+
--out pca_results
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Association Testing
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
# Linear/logistic regression with covariates
|
|
181
|
+
plink2 \
|
|
182
|
+
--bfile dataset_qc \
|
|
183
|
+
--glm \
|
|
184
|
+
--pheno phenotypes.txt \
|
|
185
|
+
--covar pca_results.eigenvec \
|
|
186
|
+
--covar-col-nums 3-12 \
|
|
187
|
+
--out gwas_results
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Manhattan Plot in Python
|
|
191
|
+
|
|
192
|
+
```python
|
|
193
|
+
import pandas as pd
|
|
194
|
+
import matplotlib.pyplot as plt
|
|
195
|
+
import numpy as np
|
|
196
|
+
|
|
197
|
+
def manhattan_plot(gwas_file, output='manhattan.pdf'):
|
|
198
|
+
df = pd.read_csv(gwas_file, sep='\t')
|
|
199
|
+
df['-log10p'] = -np.log10(df['P'])
|
|
200
|
+
|
|
201
|
+
# Assign cumulative positions
|
|
202
|
+
df = df.sort_values(['CHR', 'BP'])
|
|
203
|
+
df['pos_cum'] = 0
|
|
204
|
+
offset = 0
|
|
205
|
+
for chrom in df['CHR'].unique():
|
|
206
|
+
mask = df['CHR'] == chrom
|
|
207
|
+
df.loc[mask, 'pos_cum'] = df.loc[mask, 'BP'] + offset
|
|
208
|
+
offset = df.loc[mask, 'pos_cum'].max()
|
|
209
|
+
|
|
210
|
+
fig, ax = plt.subplots(figsize=(16, 5))
|
|
211
|
+
colors = ['#3B82F6', '#94A3B8']
|
|
212
|
+
for i, chrom in enumerate(df['CHR'].unique()):
|
|
213
|
+
subset = df[df['CHR'] == chrom]
|
|
214
|
+
ax.scatter(subset['pos_cum'], subset['-log10p'],
|
|
215
|
+
s=2, color=colors[i % 2], alpha=0.7)
|
|
216
|
+
|
|
217
|
+
ax.axhline(-np.log10(5e-8), color='red', linestyle='--', linewidth=0.8)
|
|
218
|
+
ax.set_xlabel('Chromosome')
|
|
219
|
+
ax.set_ylabel('-log10(p-value)')
|
|
220
|
+
fig.savefig(output, dpi=300, bbox_inches='tight')
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## Variant Calling Pipeline
|
|
224
|
+
|
|
225
|
+
### GATK Best Practices
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
# Mark duplicates
|
|
229
|
+
gatk MarkDuplicates \
|
|
230
|
+
-I aligned.bam \
|
|
231
|
+
-O dedup.bam \
|
|
232
|
+
-M metrics.txt
|
|
233
|
+
|
|
234
|
+
# Base quality score recalibration
|
|
235
|
+
gatk BaseRecalibrator \
|
|
236
|
+
-I dedup.bam \
|
|
237
|
+
-R reference.fa \
|
|
238
|
+
--known-sites dbsnp.vcf \
|
|
239
|
+
-O recal_table.txt
|
|
240
|
+
|
|
241
|
+
gatk ApplyBQSR \
|
|
242
|
+
-I dedup.bam \
|
|
243
|
+
-R reference.fa \
|
|
244
|
+
--bqsr-recal-file recal_table.txt \
|
|
245
|
+
-O recal.bam
|
|
246
|
+
|
|
247
|
+
# Call variants
|
|
248
|
+
gatk HaplotypeCaller \
|
|
249
|
+
-I recal.bam \
|
|
250
|
+
-R reference.fa \
|
|
251
|
+
-O variants.g.vcf \
|
|
252
|
+
-ERC GVCF
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
## Best Practices
|
|
256
|
+
|
|
257
|
+
- **Use containerized workflows.** Nextflow + Docker/Singularity ensures reproducibility across environments.
|
|
258
|
+
- **Document every parameter.** Small changes in alignment settings can significantly affect downstream results.
|
|
259
|
+
- **Apply appropriate multiple testing corrections.** Genome-wide significance is p < 5e-8 for GWAS.
|
|
260
|
+
- **Validate findings in independent cohorts.** Replication is essential before biological interpretation.
|
|
261
|
+
- **Archive raw data and analysis scripts.** Deposit in GEO (expression) or dbGaP (genotypes) for reproducibility.
|
|
262
|
+
- **Use established pipelines (nf-core).** Community-maintained Nextflow pipelines encode best practices.
|
|
263
|
+
|
|
264
|
+
## References
|
|
265
|
+
|
|
266
|
+
- [DESeq2 Vignette](https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html) -- Differential expression analysis
|
|
267
|
+
- [GATK Best Practices](https://gatk.broadinstitute.org/hc/en-us/sections/360007226651-Best-Practices-Workflows) -- Variant calling
|
|
268
|
+
- [PLINK2 Documentation](https://www.cog-genomics.org/plink/2.0/) -- Genetic association analysis
|
|
269
|
+
- [nf-core Pipelines](https://nf-co.re/) -- Community Nextflow workflows
|
|
270
|
+
- [RNA-seq Analysis Tutorial](https://rnabio.org/) -- Griffith Lab comprehensive tutorial
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: market-analysis-guide
|
|
3
|
+
description: "Structured frameworks for market sizing, competitive analysis, and strategic ..."
|
|
4
|
+
metadata:
|
|
5
|
+
openclaw:
|
|
6
|
+
emoji: "chart_with_upwards_trend"
|
|
7
|
+
category: "domains"
|
|
8
|
+
subcategory: "business"
|
|
9
|
+
keywords: ["market analysis", "strategic management", "operations management", "competitive analysis", "market sizing"]
|
|
10
|
+
source: "wentor"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Market Analysis Guide
|
|
14
|
+
|
|
15
|
+
A comprehensive skill for conducting rigorous market analysis in academic and applied research contexts. This guide covers quantitative market sizing, competitive landscape mapping, and strategic positioning frameworks grounded in peer-reviewed methodologies.
|
|
16
|
+
|
|
17
|
+
## Market Sizing Methodologies
|
|
18
|
+
|
|
19
|
+
Market sizing is the foundation of any credible market analysis. There are two primary approaches, and robust research typically employs both for triangulation.
|
|
20
|
+
|
|
21
|
+
**Top-Down Approach (TAM/SAM/SOM)**
|
|
22
|
+
|
|
23
|
+
Start with the total addressable market and narrow systematically:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
TAM (Total Addressable Market)
|
|
27
|
+
-> SAM (Serviceable Available Market)
|
|
28
|
+
-> SOM (Serviceable Obtainable Market)
|
|
29
|
+
|
|
30
|
+
Example calculation:
|
|
31
|
+
TAM = Global higher-education EdTech spend = $340B (2025, HolonIQ)
|
|
32
|
+
SAM = AI-powered research tools segment = $12B
|
|
33
|
+
SOM = Realistic capture in Year 3 = $120M (1% of SAM)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Bottom-Up Approach**
|
|
37
|
+
|
|
38
|
+
Build estimates from unit economics:
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
# Bottom-up market sizing
|
|
42
|
+
users_in_target_segment = 8_000_000 # global PhD + postdoc researchers
|
|
43
|
+
adoption_rate = 0.05 # 5% in first 3 years
|
|
44
|
+
avg_revenue_per_user = 180 # USD/year
|
|
45
|
+
bottom_up_estimate = users_in_target_segment * adoption_rate * avg_revenue_per_user
|
|
46
|
+
# Result: $72,000,000
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Always cite the data sources for each assumption. Use government statistics (e.g., NSF, Eurostat), industry reports (Gartner, McKinsey), and published academic datasets.
|
|
50
|
+
|
|
51
|
+
## Competitive Analysis Frameworks
|
|
52
|
+
|
|
53
|
+
### Porter's Five Forces
|
|
54
|
+
|
|
55
|
+
Apply Porter's framework systematically to map industry structure:
|
|
56
|
+
|
|
57
|
+
| Force | Key Questions | Data Sources |
|
|
58
|
+
|-------|--------------|--------------|
|
|
59
|
+
| Rivalry | How many direct competitors? Market concentration (HHI)? | Crunchbase, SEC filings |
|
|
60
|
+
| New Entrants | Capital requirements? Regulatory barriers? | Patent databases, regulatory filings |
|
|
61
|
+
| Substitutes | What alternatives exist? Switching costs? | User surveys, app store data |
|
|
62
|
+
| Buyer Power | Customer concentration? Price sensitivity? | Industry reports, interviews |
|
|
63
|
+
| Supplier Power | Input scarcity? Vendor lock-in? | Supply chain databases |
|
|
64
|
+
|
|
65
|
+
### SWOT and TOWS Matrix
|
|
66
|
+
|
|
67
|
+
Go beyond basic SWOT by constructing a TOWS matrix that generates actionable strategies:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
Strengths (S) Weaknesses (W)
|
|
71
|
+
Opportunities SO strategies WO strategies
|
|
72
|
+
(O) (use S to exploit O) (overcome W via O)
|
|
73
|
+
Threats ST strategies WT strategies
|
|
74
|
+
(T) (use S to counter T) (minimize W, avoid T)
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Data Collection and Validation
|
|
78
|
+
|
|
79
|
+
Primary data collection methods for market analysis research:
|
|
80
|
+
|
|
81
|
+
1. **Structured interviews** with industry experts (N >= 12 for saturation)
|
|
82
|
+
2. **Survey instruments** validated with Cronbach's alpha >= 0.70
|
|
83
|
+
3. **Conjoint analysis** for preference and willingness-to-pay estimation
|
|
84
|
+
4. **Web scraping** of pricing pages, job postings, and product changelogs
|
|
85
|
+
|
|
86
|
+
Secondary data sources to cross-validate:
|
|
87
|
+
|
|
88
|
+
- Statista, IBISWorld, Grand View Research for market reports
|
|
89
|
+
- USPTO/EPO patent filings for technology trajectory analysis
|
|
90
|
+
- PitchBook/Crunchbase for funding and M&A activity
|
|
91
|
+
|
|
92
|
+
## Reporting and Visualization
|
|
93
|
+
|
|
94
|
+
Present findings using clear, reproducible visualizations:
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
import matplotlib.pyplot as plt
|
|
98
|
+
import numpy as np
|
|
99
|
+
|
|
100
|
+
segments = ['Segment A', 'Segment B', 'Segment C', 'Segment D']
|
|
101
|
+
sizes = [45, 28, 18, 9]
|
|
102
|
+
colors = ['#3B82F6', '#EF4444', '#10B981', '#F59E0B']
|
|
103
|
+
|
|
104
|
+
fig, ax = plt.subplots(figsize=(8, 6))
|
|
105
|
+
ax.barh(segments, sizes, color=colors)
|
|
106
|
+
ax.set_xlabel('Market Share (%)')
|
|
107
|
+
ax.set_title('Competitive Landscape by Segment')
|
|
108
|
+
plt.tight_layout()
|
|
109
|
+
plt.savefig('market_share.png', dpi=300)
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Always include confidence intervals or sensitivity ranges for quantitative estimates. A well-structured market analysis report should contain an executive summary, methodology section, findings with visualizations, and a limitations discussion.
|