-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
197 lines (171 loc) · 4.36 KB
/
Copy pathtypes.ts
File metadata and controls
197 lines (171 loc) · 4.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
export interface SequenceInfo {
length_bp: number;
gc_content: number;
notes: string;
}
export interface Motif {
family: string;
position_start: number;
position_end: number;
strand: '+' | '-';
role: 'activator' | 'repressor' | 'cofactor' | 'unknown';
}
export interface ElementAnnotation {
element_type: 'promoter' | 'enhancer' | 'insulator' | 'utr' | 'intron' | 'intergenic' | 'ambiguous';
rationale: string;
motifs: Motif[];
baseline_effect?: string;
}
export interface VariantImpact {
variant_id: string;
position: number;
ref: string;
alt: string;
motif_effect: 'motif_gain' | 'motif_loss' | 'motif_shift' | 'neutral_or_uncertain';
affected_motif_families: string[];
predicted_direction: 'up' | 'down' | 'ambiguous';
confidence: 'high' | 'medium' | 'low';
confidence_rationale: string;
impact_summary: string;
}
export interface TFNetworkNode {
id: string;
type: 'tf' | 'element' | 'gene';
}
export interface TFNetworkEdge {
source: string;
target: string;
interaction: 'activates' | 'represses' | 'modulates';
}
export interface TFNetwork {
nodes: TFNetworkNode[];
edges: TFNetworkEdge[];
network_summary: string;
}
export interface QuizQuestion {
question: string;
options: string[];
correctAnswerIndex: number;
explanation: string;
}
export interface TeachingContent {
enabled: boolean;
explanation: string;
quiz_questions?: QuizQuestion[];
}
export interface Citation {
id: string;
authors: string;
year: number;
title: string;
journal: string;
relevance: string;
}
export interface RegulatoryAnalysisResult {
sequence_info: SequenceInfo;
element_annotation: ElementAnnotation;
variant_impacts: VariantImpact[];
tf_network: TFNetwork;
teaching: TeachingContent;
image_context?: {
tracks_identified: string[];
observations: string;
correlation_with_sequence: string;
};
citations: Citation[];
}
export interface RegulatoryInput {
sequence: string;
coordinates: string;
variants: string; // Line separated or CSV
mode: 'mechanistic' | 'teaching';
browserImage: File | null;
}
export interface AnalysisInput {
imageFile: File | null;
genomicText: string;
clinicalText: string;
}
export type AnalysisResult = RegulatoryAnalysisResult;
// Perturbation Sandbox Types
export interface MotifDelta {
family: string;
change_type: 'loss' | 'gain' | 'retained';
significance: 'high' | 'medium' | 'low';
}
export interface PerturbationResult {
wt_regulatory_score: number; // 0-100
mutant_regulatory_score: number; // 0-100
score_rationale: string;
motif_deltas: MotifDelta[];
functional_consequence: string; // The "Diagnosis" of the mutation
network_impact: {
lost_edges: string[];
gained_edges: string[];
};
}
// Evolution Viewer Types
export interface EvolutionaryRegion {
start_index: number;
end_index: number;
conservation_score: number; // 0.0 to 1.0 (1.0 = highly conserved)
evolutionary_logic: string; // e.g., "Purifying selection on E-Box core"
}
export interface EvolutionaryScenario {
title: string;
prompt: string; // "What if this motif evolved?"
prediction: string;
}
export interface EvolutionaryAnalysisResult {
regions: EvolutionaryRegion[];
motif_ages: {
family: string;
age_category: 'Ancient (Vertebrate)' | 'Intermediate (Mammalian)' | 'Recent (Primate/Specific)';
rationale: string;
}[];
scenarios: EvolutionaryScenario[];
evolutionary_narrative: string;
}
export interface ClinicalTrial {
id: string;
title: string;
phase: string;
matchScore: number;
institution: string;
location: string;
rationale: string;
}
// Sketch Interpretation Types
export interface SketchInteraction {
source: string;
target: string;
type: 'activation' | 'repression';
}
export interface SketchVariantSensitivity {
position: number;
effect: string;
}
export interface SketchInferredMotif {
tf_family: string;
confidence: string;
}
export interface SketchAnalysisResult {
regulatory_class: string;
reasoning: string;
motifs: SketchInferredMotif[];
chromatin_state: string;
interactions: SketchInteraction[];
prototype_sequence: string;
sensitive_positions: SketchVariantSensitivity[];
}
// Regulatory Remix Types
export interface RemixDesign {
label: string;
new_sequence: string;
predicted_class: string;
explanation: string;
motif_changes: {
gained: string[];
lost: string[];
};
}