| |
| """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 = [ |
| |
| ("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) |
| 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() |
|
|
| |
| 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() |
|
|
| |
| 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) |
|
|