File size: 3,279 Bytes
e0036c5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/usr/bin/env python3
"""Check status of data files required for reproducibility."""

import os
from pathlib import Path

def check_data_status():
    repo_root = Path(__file__).parent.parent.parent

    print("=" * 70)
    print("Squidiff Reproducibility - Data Status Check")
    print("=" * 70)

    data_checks = [
        # (description, path, required_for_figure)
        ("Fig 2: Differentiation", "datasets/ipsc_diff/log_normalised_counts.csv", "Fig 2"),
        ("Fig 3a-c: Gene Perturbation", "datasets/gears_train_data.h5ad", "Fig 3a-c"),
        ("Fig 3a-c: Gene Perturbation (test)", "datasets/gears_test_data.h5ad", "Fig 3a-c"),
        ("Fig 3d-g: GBM Drug Screening", "squidward_study/public_01/pub_all_data.h5ad", "Fig 3d-g"),
        ("Fig 4-6: Supplementary", "datasets/adata_norm.h5ad", "Fig 1 & Fig 3"),
    ]

    status_symbols = {
        'present': '✓',
        'missing': '✗',
        'partial': '⚠',
    }

    print("\nDATA FILE STATUS:\n")

    total = len(data_checks)
    available = 0
    missing = []

    for desc, path, figure in data_checks:
        full_path = repo_root / path

        if full_path.exists():
            size = os.path.getsize(full_path) / (1024**3)  # Convert to GB
            symbol = status_symbols['present']
            status = "Present"
            available += 1
            print(f"{symbol} {desc}")
            print(f"  → {path} ({size:.2f} GB)")
        else:
            symbol = status_symbols['missing']
            status = "Missing"
            missing.append((desc, path, figure))
            print(f"{symbol} {desc}")
            print(f"  → {path}")
        print()

    # Summary
    print("=" * 70)
    print(f"SUMMARY: {available}/{total} datasets available")
    print("=" * 70)

    if missing:
        print(f"\nMISSING DATA ({len(missing)} files):\n")
        for desc, path, figure in missing:
            print(f"• {desc} ({figure})")
            print(f"  Path: {path}")

            if "GBM" in desc or "Fig 3d-g" in figure:
                print(f"  Download: See GBM_DATA_DOWNLOAD_GUIDE.md")
                print(f"  Source: GEO accession GSE148842")
                print(f"  Size: ~2.7 GB (compressed from series matrix)")
            print()

    # Recommendations
    print("=" * 70)
    print("RECOMMENDATIONS:\n")

    if any("GBM" in d for d, _, _ in missing):
        print("1. Download GBM data:")
        print("   - Read: GBM_DATA_DOWNLOAD_GUIDE.md")
        print("   - Run: python3 convert_series_matrix_to_h5ad.py (after download)")
        print("   - Source: https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE148842")
        print()

    if available > 0:
        print(f"2. You can run figures that have complete data:")
        available_figures = []
        if (repo_root / "datasets/ipsc_diff/log_normalised_counts.csv").exists():
            available_figures.append("Fig 2")
        if (repo_root / "datasets/gears_train_data.h5ad").exists():
            available_figures.append("Fig 3a-c")
        if available_figures:
            print(f"   → {', '.join(available_figures)}")
        print()

    print("=" * 70)

    return len(missing) == 0

if __name__ == "__main__":
    all_present = check_data_status()
    exit(0 if all_present else 1)