|
478 | 478 | // ============================================================ |
479 | 479 | // INITIALIZATION — Render all sprites on load |
480 | 480 | // ============================================================ |
481 | | - document.addEventListener("DOMContentLoaded", () => { |
| 481 | + document.addEventListener("DOMContentLoaded", async () => { |
482 | 482 | const S = window.LabSprites; |
483 | 483 | if (!S) return console.error("LabSprites not loaded"); |
484 | 484 |
|
| 485 | + // Load characters from registry before rendering marketplace |
| 486 | + await fetchCharacters(); |
| 487 | + |
485 | 488 | // Hero sprites |
486 | 489 | S.renderPI(document.getElementById("hero-pi-sprite")); |
487 | 490 | S.renderTrainee(document.getElementById("hero-trainee-sprite")); |
|
1031 | 1034 | // Users fork the template, create their character, |
1032 | 1035 | // and list their repo. Ranked by GitHub stars. |
1033 | 1036 | // Official characters from albert-ying get a badge. |
| 1037 | + // Now loaded dynamically from characters/index.json |
1034 | 1038 | // ============================================================ |
1035 | | - const CHARACTERS = [ |
1036 | | - { |
1037 | | - id: "maria-chen", |
1038 | | - name: "Dr. Maria Chen", |
1039 | | - role: "pi", |
1040 | | - avatar: "neuroscientist", |
1041 | | - title: "Computational Biology PI", |
1042 | | - expertise: "Single-cell genomics, machine learning, and multi-modal data integration", |
1043 | | - goal: "Discover cell-type-specific gene regulatory programs using multi-modal single-cell data", |
1044 | | - skills: ["scanpy", "scvi-tools", "pytorch-lightning", "scientific-writing", "scientific-visualization", "statistical-analysis"], |
1045 | | - personality: [ |
1046 | | - "Visionary: identifies novel biological questions from data patterns", |
1047 | | - "Rigorous: demands reproducible computational pipelines with version control", |
1048 | | - "Collaborative: bridges wet lab and dry lab teams effectively" |
1049 | | - ], |
1050 | | - github: "albert-ying/autolab-char-compbio-pi", |
1051 | | - stars: 342, |
1052 | | - official: true |
1053 | | - }, |
1054 | | - { |
1055 | | - id: "alex-kumar", |
1056 | | - name: "Alex Kumar", |
1057 | | - role: "trainee", |
1058 | | - avatar: "bioinformatician", |
1059 | | - title: "Bioinformatics Postdoc", |
1060 | | - expertise: "NGS data analysis, pipeline development, and statistical genomics", |
1061 | | - goal: "Build clean, reproducible analysis pipelines and generate publication-quality figures", |
1062 | | - skills: ["scanpy", "pydeseq2", "pysam", "matplotlib", "seaborn", "scikit-learn", "deeptools"], |
1063 | | - personality: [ |
1064 | | - "Dedicated: completes tasks thoroughly with comprehensive documentation", |
1065 | | - "Technical: writes self-contained, reproducible code with proper testing", |
1066 | | - "Proactive: identifies additional analyses that strengthen the narrative" |
1067 | | - ], |
1068 | | - github: "albert-ying/autolab-char-bioinfo-trainee", |
1069 | | - stars: 256, |
1070 | | - official: true |
1071 | | - }, |
1072 | | - { |
1073 | | - id: "sarah-oconnor", |
1074 | | - name: "Dr. Sarah O'Connor", |
1075 | | - role: "pi", |
1076 | | - avatar: "chemist", |
1077 | | - title: "Medicinal Chemistry PI", |
1078 | | - expertise: "Drug discovery, QSAR modeling, and lead optimization", |
1079 | | - goal: "Identify and optimize novel small molecule inhibitors through computational screening", |
1080 | | - skills: ["rdkit", "datamol", "deepchem", "pytdc", "medchem", "pubchem-database"], |
1081 | | - personality: [ |
1082 | | - "Strategic: prioritizes compounds with drug-like properties early", |
1083 | | - "Data-driven: demands SAR analysis before advancing any lead series", |
1084 | | - "Publication-savvy: structures work for high-impact medicinal chemistry journals" |
1085 | | - ], |
1086 | | - github: "albert-ying/autolab-char-medchem-pi", |
1087 | | - stars: 189, |
1088 | | - official: false |
1089 | | - }, |
1090 | | - { |
1091 | | - id: "james-park", |
1092 | | - name: "James Park", |
1093 | | - role: "trainee", |
1094 | | - avatar: "ml_engineer", |
1095 | | - title: "ML Research Engineer", |
1096 | | - expertise: "Deep learning, model training, and inference optimization", |
1097 | | - goal: "Implement and benchmark state-of-the-art models with clean, efficient code", |
1098 | | - skills: ["pytorch-lightning", "transformers", "accelerate", "weights-and-biases", "vllm", "flash-attention"], |
1099 | | - personality: [ |
1100 | | - "Efficient: writes highly optimized code with proper GPU utilization", |
1101 | | - "Systematic: benchmarks every change with rigorous ablation studies", |
1102 | | - "Clear communicator: documents architecture decisions and trade-offs" |
1103 | | - ], |
1104 | | - github: "albert-ying/autolab-char-ml-engineer", |
1105 | | - stars: 198, |
1106 | | - official: false |
1107 | | - }, |
1108 | | - { |
1109 | | - id: "elena-vasquez", |
1110 | | - name: "Dr. Elena Vasquez", |
1111 | | - role: "collaborator", |
1112 | | - avatar: "epidemiologist", |
1113 | | - title: "Clinical Epidemiologist", |
1114 | | - expertise: "Clinical trial design, survival analysis, and real-world evidence", |
1115 | | - goal: "Ensure robust clinical study designs and proper statistical interpretation", |
1116 | | - skills: ["scikit-survival", "statistical-analysis", "statsmodels", "clinical-reports", "clinicaltrials-database"], |
1117 | | - personality: [ |
1118 | | - "Methodical: insists on pre-registered analysis plans", |
1119 | | - "Critical: identifies confounders and biases in study designs", |
1120 | | - "Translational: connects statistical findings to clinical implications" |
1121 | | - ], |
1122 | | - github: "albert-ying/autolab-char-clinical-epi", |
1123 | | - stars: 145, |
1124 | | - official: false |
1125 | | - }, |
1126 | | - { |
1127 | | - id: "wei-zhang", |
1128 | | - name: "Dr. Wei Zhang", |
1129 | | - role: "collaborator", |
1130 | | - avatar: "statistician", |
1131 | | - title: "Biostatistician", |
1132 | | - expertise: "Bayesian modeling, causal inference, and high-dimensional statistics", |
1133 | | - goal: "Provide rigorous statistical frameworks and validate analytical approaches", |
1134 | | - skills: ["pymc", "statistical-analysis", "statsmodels", "scikit-learn", "shap", "scientific-visualization"], |
1135 | | - personality: [ |
1136 | | - "Precise: never allows hand-waving about statistical assumptions", |
1137 | | - "Educational: explains complex methods in accessible terms", |
1138 | | - "Conservative: prefers well-validated methods over trendy approaches" |
1139 | | - ], |
1140 | | - github: "albert-ying/autolab-char-biostatistician", |
1141 | | - stars: 267, |
1142 | | - official: true |
1143 | | - }, |
1144 | | - ]; |
| 1039 | + let CHARACTERS = []; // populated by fetchCharacters() |
| 1040 | + |
| 1041 | + async function fetchCharacters() { |
| 1042 | + try { |
| 1043 | + const resp = await fetch("characters/index.json"); |
| 1044 | + const data = await resp.json(); |
| 1045 | + CHARACTERS = data.characters || []; |
| 1046 | + } catch (e) { |
| 1047 | + console.warn("Failed to load characters/index.json, using empty list:", e); |
| 1048 | + CHARACTERS = []; |
| 1049 | + } |
| 1050 | + } |
1145 | 1051 |
|
1146 | 1052 | function initMarketplace() { |
1147 | 1053 | const grid = document.getElementById("mp-grid"); |
|
0 commit comments