| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| echo "=== Tier 2: Core Biology Embedding Analysis ===" |
| echo "Started: $(date)" |
| echo "Node: $(hostname)" |
|
|
| cd /work/ratul1/supantha/glycan-SD-VS/bert_training_v3/v3.1_cluster_training |
| source /work/ratul1/supantha/miniconda3/etc/profile.d/conda.sh |
| conda activate glycan_bert 2>/dev/null || source activate glycan_bert 2>/dev/null || true |
| pip install -q scipy 2>/dev/null |
|
|
| echo "" |
| echo "=== Step 1: Analyze V6 (Tier 2) ===" |
| python3 bert_v6_contrastive/scripts/analyze_core_biology.py --model v6 |
|
|
| echo "" |
| echo "=== Step 2: Analyze V5 (Tier 2) ===" |
| python3 bert_v6_contrastive/scripts/analyze_core_biology.py --model v5 |
|
|
| echo "" |
| echo "=== Step 3: V5 vs V6 Tier 2 Comparison ===" |
| python3 -c " |
| import json |
| v5 = json.load(open('bert_v6_contrastive/analysis/tier2_metrics_v5.json')) |
| v6 = json.load(open('bert_v6_contrastive/analysis/tier2_metrics_v6.json')) |
| print('=== Tier 2 Comparison Summary ===') |
| for key in sorted(set(list(v5.keys()) + list(v6.keys()))): |
| if key in ('model', 'tier', 'structural_type_counts', 'branching_distribution', 'linkage_distribution'): |
| continue |
| v5v = v5.get(key, 'N/A') |
| v6v = v6.get(key, 'N/A') |
| if isinstance(v5v, (int, float)) and isinstance(v6v, (int, float)): |
| delta = v6v - v5v |
| print(f' {key}: V5={v5v}, V6={v6v}, D={delta:+.4f}') |
| else: |
| print(f' {key}: V5={v5v}, V6={v6v}') |
| " |
|
|
| echo "" |
| echo "=== Output Files ===" |
| ls -la bert_v6_contrastive/analysis/tier2_* bert_v6_contrastive/analysis/*structural* bert_v6_contrastive/analysis/*composition* bert_v6_contrastive/analysis/*branching* bert_v6_contrastive/analysis/*linkage* bert_v6_contrastive/analysis/*decoration* bert_v6_contrastive/analysis/*plantae* 2>/dev/null |
|
|
| echo "" |
| echo "Done! $(date)" |
|
|