@genobank/biofs 1.2.6 → 1.2.8
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/ANNOTATOR_RECOMMENDATIONS_API.md +490 -0
- package/BIOFS_V1.2.7_PUBLISHED.md +317 -0
- package/BIOOS_CLI_IMPLEMENTATION_COMPLETE.md +422 -0
- package/BIOOS_JOB_MANAGEMENT.md +681 -0
- package/INSTALL_V1.2.7_ON_MAC.md +306 -0
- package/OPENCRAVAT_ANNOTATORS_REFERENCE.md +340 -0
- package/OPENCRAVAT_ANNOTATOR_INTELLIGENCE_COMPLETE.md +479 -0
- package/README.md +27 -0
- package/RELEASE_SUMMARY_V1.2.7.md +479 -0
- package/dist/commands/job/create.d.ts +7 -0
- package/dist/commands/job/create.d.ts.map +1 -0
- package/dist/commands/job/create.js +108 -0
- package/dist/commands/job/create.js.map +1 -0
- package/dist/commands/job/list.d.ts +7 -0
- package/dist/commands/job/list.d.ts.map +1 -0
- package/dist/commands/job/list.js +135 -0
- package/dist/commands/job/list.js.map +1 -0
- package/dist/commands/job/pipelines.d.ts +5 -0
- package/dist/commands/job/pipelines.d.ts.map +1 -0
- package/dist/commands/job/pipelines.js +77 -0
- package/dist/commands/job/pipelines.js.map +1 -0
- package/dist/commands/job/results.d.ts +6 -0
- package/dist/commands/job/results.d.ts.map +1 -0
- package/dist/commands/job/results.js +101 -0
- package/dist/commands/job/results.js.map +1 -0
- package/dist/commands/job/status.d.ts +6 -0
- package/dist/commands/job/status.d.ts.map +1 -0
- package/dist/commands/job/status.js +139 -0
- package/dist/commands/job/status.js.map +1 -0
- package/dist/index.js +94 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/api/client.d.ts +9 -0
- package/dist/lib/api/client.d.ts.map +1 -1
- package/dist/lib/api/client.js +58 -0
- package/dist/lib/api/client.js.map +1 -1
- package/opencravat_annotators_dictionary.json +2356 -0
- package/package.json +1 -1
- package/scripts/build_annotator_dictionary.py +352 -0
package/package.json
CHANGED
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Build OpenCRAVAT Annotator Dictionary
|
|
4
|
+
Creates a comprehensive JSON dictionary of all available annotators for Claude API
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
import yaml
|
|
9
|
+
import json
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
|
|
12
|
+
MODULES_DIR = "/apps/opencravat_modules/annotators"
|
|
13
|
+
|
|
14
|
+
def extract_annotator_metadata(annotator_name):
|
|
15
|
+
"""Extract metadata from annotator YAML file"""
|
|
16
|
+
yml_path = Path(MODULES_DIR) / annotator_name / f"{annotator_name}.yml"
|
|
17
|
+
|
|
18
|
+
if not yml_path.exists():
|
|
19
|
+
return None
|
|
20
|
+
|
|
21
|
+
try:
|
|
22
|
+
with open(yml_path, 'r') as f:
|
|
23
|
+
data = yaml.safe_load(f)
|
|
24
|
+
|
|
25
|
+
# Extract key metadata
|
|
26
|
+
metadata = {
|
|
27
|
+
"name": annotator_name,
|
|
28
|
+
"title": data.get("title", annotator_name),
|
|
29
|
+
"description": data.get("description", ""),
|
|
30
|
+
"tags": data.get("tags", []),
|
|
31
|
+
"level": data.get("level", "variant"),
|
|
32
|
+
"version": data.get("version", ""),
|
|
33
|
+
"developer": data.get("developer", {}).get("organization", ""),
|
|
34
|
+
"citation": data.get("developer", {}).get("citation", ""),
|
|
35
|
+
"website": data.get("developer", {}).get("website", "")
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return metadata
|
|
39
|
+
except Exception as e:
|
|
40
|
+
print(f"Error processing {annotator_name}: {e}")
|
|
41
|
+
return None
|
|
42
|
+
|
|
43
|
+
def categorize_by_tags(annotators):
|
|
44
|
+
"""Categorize annotators by their tags"""
|
|
45
|
+
categories = {
|
|
46
|
+
"clinical_significance": [],
|
|
47
|
+
"cancer": [],
|
|
48
|
+
"population_frequency": [],
|
|
49
|
+
"variant_effect_prediction": [],
|
|
50
|
+
"pharmacogenomics": [],
|
|
51
|
+
"mendelian_disease": [],
|
|
52
|
+
"splicing": [],
|
|
53
|
+
"regulatory": [],
|
|
54
|
+
"conservation": [],
|
|
55
|
+
"pathways": [],
|
|
56
|
+
"protein_function": [],
|
|
57
|
+
"other": []
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
for ann in annotators:
|
|
61
|
+
tags = [t.lower().replace(" ", "_") for t in ann.get("tags", [])]
|
|
62
|
+
|
|
63
|
+
categorized = False
|
|
64
|
+
|
|
65
|
+
# Clinical significance
|
|
66
|
+
if any(t in tags for t in ["clinical_relevance", "mendelian_disease", "variants"]):
|
|
67
|
+
if "clinvar" in ann["name"] or "omim" in ann["name"] or "acmg" in ann["name"]:
|
|
68
|
+
categories["clinical_significance"].append(ann)
|
|
69
|
+
categorized = True
|
|
70
|
+
|
|
71
|
+
# Cancer
|
|
72
|
+
if "cancer" in tags or "cosmic" in ann["name"] or "oncokb" in ann["name"]:
|
|
73
|
+
categories["cancer"].append(ann)
|
|
74
|
+
categorized = True
|
|
75
|
+
|
|
76
|
+
# Population frequency
|
|
77
|
+
if "allele_frequency" in tags or any(x in ann["name"] for x in ["gnomad", "exac", "esp", "1000g", "thousandgenomes"]):
|
|
78
|
+
categories["population_frequency"].append(ann)
|
|
79
|
+
categorized = True
|
|
80
|
+
|
|
81
|
+
# Variant effect prediction
|
|
82
|
+
if "variant_effect_prediction" in tags or any(x in ann["name"] for x in ["sift", "polyphen", "cadd", "revel", "vest", "chasm", "alpha"]):
|
|
83
|
+
categories["variant_effect_prediction"].append(ann)
|
|
84
|
+
categorized = True
|
|
85
|
+
|
|
86
|
+
# Pharmacogenomics
|
|
87
|
+
if "drugs" in tags or "pharmgkb" in ann["name"] or "dgi" in ann["name"]:
|
|
88
|
+
categories["pharmacogenomics"].append(ann)
|
|
89
|
+
categorized = True
|
|
90
|
+
|
|
91
|
+
# Mendelian disease
|
|
92
|
+
if "mendelian_disease" in tags or "omim" in ann["name"] or "hpo" in ann["name"]:
|
|
93
|
+
categories["mendelian_disease"].append(ann)
|
|
94
|
+
categorized = True
|
|
95
|
+
|
|
96
|
+
# Splicing
|
|
97
|
+
if any(x in ann["name"] for x in ["splice", "dbscsnv"]):
|
|
98
|
+
categories["splicing"].append(ann)
|
|
99
|
+
categorized = True
|
|
100
|
+
|
|
101
|
+
# Regulatory
|
|
102
|
+
if any(x in tags for x in ["regulation", "regulatory"]) or any(x in ann["name"] for x in ["encode", "regulome", "enhancer"]):
|
|
103
|
+
categories["regulatory"].append(ann)
|
|
104
|
+
categorized = True
|
|
105
|
+
|
|
106
|
+
# Conservation
|
|
107
|
+
if any(x in ann["name"] for x in ["gerp", "phylop", "phastcons", "siphy"]):
|
|
108
|
+
categories["conservation"].append(ann)
|
|
109
|
+
categorized = True
|
|
110
|
+
|
|
111
|
+
# Pathways
|
|
112
|
+
if "pathways" in tags or any(x in ann["name"] for x in ["kegg", "reactome", "biogrid", "intact"]):
|
|
113
|
+
categories["pathways"].append(ann)
|
|
114
|
+
categorized = True
|
|
115
|
+
|
|
116
|
+
# Protein function
|
|
117
|
+
if any(x in ann["name"] for x in ["uniprot", "pfam", "interpro", "swissprot"]):
|
|
118
|
+
categories["protein_function"].append(ann)
|
|
119
|
+
categorized = True
|
|
120
|
+
|
|
121
|
+
if not categorized:
|
|
122
|
+
categories["other"].append(ann)
|
|
123
|
+
|
|
124
|
+
return categories
|
|
125
|
+
|
|
126
|
+
def build_recommendations():
|
|
127
|
+
"""Build recommendation rules for Claude API"""
|
|
128
|
+
recommendations = {
|
|
129
|
+
"phenotypes": {
|
|
130
|
+
"cancer": {
|
|
131
|
+
"description": "Cancer-related analysis",
|
|
132
|
+
"recommended_annotators": [
|
|
133
|
+
"clinvar",
|
|
134
|
+
"cosmic",
|
|
135
|
+
"cancer_genome_interpreter",
|
|
136
|
+
"cancer_hotspots",
|
|
137
|
+
"civic",
|
|
138
|
+
"oncokb",
|
|
139
|
+
"chasmplus",
|
|
140
|
+
"gnomad",
|
|
141
|
+
"alphamissense",
|
|
142
|
+
"revel"
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
"cardiovascular": {
|
|
146
|
+
"description": "Cardiovascular disease analysis",
|
|
147
|
+
"recommended_annotators": [
|
|
148
|
+
"clinvar",
|
|
149
|
+
"cardioboost",
|
|
150
|
+
"cvdkp",
|
|
151
|
+
"gnomad",
|
|
152
|
+
"alphamissense",
|
|
153
|
+
"sift",
|
|
154
|
+
"polyphen2"
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
"hereditary_cancer": {
|
|
158
|
+
"description": "Hereditary cancer predisposition",
|
|
159
|
+
"recommended_annotators": [
|
|
160
|
+
"clinvar",
|
|
161
|
+
"brca1_func_assay",
|
|
162
|
+
"cgc",
|
|
163
|
+
"cosmic",
|
|
164
|
+
"gnomad",
|
|
165
|
+
"alphamissense",
|
|
166
|
+
"revel"
|
|
167
|
+
]
|
|
168
|
+
},
|
|
169
|
+
"rare_disease": {
|
|
170
|
+
"description": "Rare Mendelian disease",
|
|
171
|
+
"recommended_annotators": [
|
|
172
|
+
"clinvar",
|
|
173
|
+
"clinvar_acmg",
|
|
174
|
+
"omim",
|
|
175
|
+
"hpo",
|
|
176
|
+
"gnomad",
|
|
177
|
+
"alphamissense",
|
|
178
|
+
"cadd",
|
|
179
|
+
"sift",
|
|
180
|
+
"polyphen2",
|
|
181
|
+
"spliceai"
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
"pharmacogenomics": {
|
|
185
|
+
"description": "Drug response prediction",
|
|
186
|
+
"recommended_annotators": [
|
|
187
|
+
"pharmgkb",
|
|
188
|
+
"dgi",
|
|
189
|
+
"clinvar",
|
|
190
|
+
"gnomad"
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
"autism": {
|
|
194
|
+
"description": "Autism spectrum disorder",
|
|
195
|
+
"recommended_annotators": [
|
|
196
|
+
"clinvar",
|
|
197
|
+
"omim",
|
|
198
|
+
"hpo",
|
|
199
|
+
"gnomad",
|
|
200
|
+
"denovo",
|
|
201
|
+
"alphamissense",
|
|
202
|
+
"cadd"
|
|
203
|
+
]
|
|
204
|
+
},
|
|
205
|
+
"developmental_delay": {
|
|
206
|
+
"description": "Developmental delay and intellectual disability",
|
|
207
|
+
"recommended_annotators": [
|
|
208
|
+
"clinvar",
|
|
209
|
+
"omim",
|
|
210
|
+
"hpo",
|
|
211
|
+
"gnomad",
|
|
212
|
+
"denovo",
|
|
213
|
+
"alphamissense",
|
|
214
|
+
"spliceai"
|
|
215
|
+
]
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"analysis_types": {
|
|
219
|
+
"rare_coding": {
|
|
220
|
+
"description": "Rare coding variant analysis",
|
|
221
|
+
"recommended_annotators": [
|
|
222
|
+
"clinvar",
|
|
223
|
+
"gnomad",
|
|
224
|
+
"alphamissense",
|
|
225
|
+
"revel",
|
|
226
|
+
"cadd",
|
|
227
|
+
"sift",
|
|
228
|
+
"polyphen2",
|
|
229
|
+
"vest"
|
|
230
|
+
]
|
|
231
|
+
},
|
|
232
|
+
"splicing": {
|
|
233
|
+
"description": "Splicing variant analysis",
|
|
234
|
+
"recommended_annotators": [
|
|
235
|
+
"clinvar",
|
|
236
|
+
"spliceai",
|
|
237
|
+
"dbscsnv",
|
|
238
|
+
"gnomad"
|
|
239
|
+
]
|
|
240
|
+
},
|
|
241
|
+
"regulatory": {
|
|
242
|
+
"description": "Regulatory variant analysis",
|
|
243
|
+
"recommended_annotators": [
|
|
244
|
+
"encode_tfbs",
|
|
245
|
+
"ensembl_regulatory_build",
|
|
246
|
+
"regulomedb",
|
|
247
|
+
"vista_enhancer",
|
|
248
|
+
"gnomad"
|
|
249
|
+
]
|
|
250
|
+
},
|
|
251
|
+
"de_novo": {
|
|
252
|
+
"description": "De novo variant analysis",
|
|
253
|
+
"recommended_annotators": [
|
|
254
|
+
"clinvar",
|
|
255
|
+
"denovo",
|
|
256
|
+
"gnomad",
|
|
257
|
+
"alphamissense",
|
|
258
|
+
"cadd"
|
|
259
|
+
]
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
return recommendations
|
|
265
|
+
|
|
266
|
+
def main():
|
|
267
|
+
# Get all annotators
|
|
268
|
+
annotator_dirs = [d for d in os.listdir(MODULES_DIR)
|
|
269
|
+
if os.path.isdir(os.path.join(MODULES_DIR, d))]
|
|
270
|
+
|
|
271
|
+
print(f"Found {len(annotator_dirs)} annotators")
|
|
272
|
+
|
|
273
|
+
# Extract metadata
|
|
274
|
+
annotators = []
|
|
275
|
+
for name in sorted(annotator_dirs):
|
|
276
|
+
metadata = extract_annotator_metadata(name)
|
|
277
|
+
if metadata:
|
|
278
|
+
annotators.append(metadata)
|
|
279
|
+
|
|
280
|
+
print(f"Successfully parsed {len(annotators)} annotators")
|
|
281
|
+
|
|
282
|
+
# Categorize
|
|
283
|
+
categories = categorize_by_tags(annotators)
|
|
284
|
+
|
|
285
|
+
# Build recommendations
|
|
286
|
+
recommendations = build_recommendations()
|
|
287
|
+
|
|
288
|
+
# Create final dictionary
|
|
289
|
+
categories_names = {k: [a["name"] for a in v] for k, v in categories.items()}
|
|
290
|
+
dictionary = {
|
|
291
|
+
"version": "1.0.0",
|
|
292
|
+
"total_annotators": len(annotators),
|
|
293
|
+
"last_updated": "2025-10-07",
|
|
294
|
+
"annotators": annotators,
|
|
295
|
+
"categories": categories_names,
|
|
296
|
+
"recommendations": recommendations
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
# Save to JSON
|
|
300
|
+
output_path = "/home/ubuntu/genobank-cli/opencravat_annotators_dictionary.json"
|
|
301
|
+
with open(output_path, 'w') as f:
|
|
302
|
+
json.dump(dictionary, f, indent=2)
|
|
303
|
+
|
|
304
|
+
print(f"\n✅ Dictionary saved to: {output_path}")
|
|
305
|
+
print(f"\nCategory breakdown:")
|
|
306
|
+
for category, annotators_list in categories.items():
|
|
307
|
+
print(f" {category}: {len(annotators_list)} annotators")
|
|
308
|
+
|
|
309
|
+
# Create a quick reference markdown
|
|
310
|
+
create_markdown_reference(dictionary, categories_names)
|
|
311
|
+
|
|
312
|
+
def create_markdown_reference(dictionary, categories):
|
|
313
|
+
"""Create a markdown quick reference"""
|
|
314
|
+
md_path = "/home/ubuntu/genobank-cli/OPENCRAVAT_ANNOTATORS_REFERENCE.md"
|
|
315
|
+
|
|
316
|
+
with open(md_path, 'w') as f:
|
|
317
|
+
f.write("# OpenCRAVAT Annotators Quick Reference\n\n")
|
|
318
|
+
f.write(f"**Total Annotators**: {dictionary['total_annotators']}\n")
|
|
319
|
+
f.write(f"**Last Updated**: {dictionary['last_updated']}\n\n")
|
|
320
|
+
|
|
321
|
+
f.write("## Categories\n\n")
|
|
322
|
+
for category, annotator_names in categories.items():
|
|
323
|
+
if annotator_names:
|
|
324
|
+
f.write(f"### {category.replace('_', ' ').title()} ({len(annotator_names)})\n\n")
|
|
325
|
+
for name in sorted(annotator_names):
|
|
326
|
+
ann = next((a for a in dictionary['annotators'] if a['name'] == name), None)
|
|
327
|
+
if ann:
|
|
328
|
+
f.write(f"- **{ann['title']}** (`{ann['name']}`): {ann['description'][:100]}...\n")
|
|
329
|
+
f.write("\n")
|
|
330
|
+
|
|
331
|
+
f.write("## Phenotype-Based Recommendations\n\n")
|
|
332
|
+
for phenotype, info in dictionary['recommendations']['phenotypes'].items():
|
|
333
|
+
f.write(f"### {phenotype.replace('_', ' ').title()}\n")
|
|
334
|
+
f.write(f"{info['description']}\n\n")
|
|
335
|
+
f.write("**Recommended annotators**:\n")
|
|
336
|
+
for ann_name in info['recommended_annotators']:
|
|
337
|
+
f.write(f"- `{ann_name}`\n")
|
|
338
|
+
f.write("\n")
|
|
339
|
+
|
|
340
|
+
f.write("## Analysis Type Recommendations\n\n")
|
|
341
|
+
for analysis_type, info in dictionary['recommendations']['analysis_types'].items():
|
|
342
|
+
f.write(f"### {analysis_type.replace('_', ' ').title()}\n")
|
|
343
|
+
f.write(f"{info['description']}\n\n")
|
|
344
|
+
f.write("**Recommended annotators**:\n")
|
|
345
|
+
for ann_name in info['recommended_annotators']:
|
|
346
|
+
f.write(f"- `{ann_name}`\n")
|
|
347
|
+
f.write("\n")
|
|
348
|
+
|
|
349
|
+
print(f"✅ Markdown reference saved to: {md_path}")
|
|
350
|
+
|
|
351
|
+
if __name__ == "__main__":
|
|
352
|
+
main()
|