Skip to content

Commit 55e6234

Browse files
UPdate modality counts
1 parent e2a93f4 commit 55e6234

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,10 @@ The **GDSC** aims to facilitate advanced bioinformatic, computational, and stati
9292

9393
| Modality | Count |
9494
|----------|-------|
95-
| 1 | 9 |
9695
| Bulk-Transcriptomics | 3 |
9796
| 10x Multiome | 1 |
9897
| 10x Visium | 1 |
9998
| 10x Xenium | 1 |
100-
| Count | 1 |
10199
| Epigenetics | 1 |
102100
| Metagenomics | 1 |
103101
| ResolveOME | 1 |

scripts/tallyModalities.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,35 @@ def normalize(modality: str) -> str:
5757

5858
def extract_modalities_from_markdown(md_text: str) -> List[str]:
5959
modalities: List[str] = []
60+
in_counts_section = False
61+
6062
for line in md_text.splitlines():
63+
# Skip the generated counts section entirely
64+
if START in line:
65+
in_counts_section = True
66+
continue
67+
if END in line:
68+
in_counts_section = False
69+
continue
70+
if in_counts_section:
71+
continue
72+
6173
if not line.startswith("|"):
6274
continue
6375
if re.match(r"^\|\s*Project\s*\|", line):
6476
continue
6577
if re.match(r"^\|\s*-+\s*\|", line):
6678
continue
79+
6780
cells = [c.strip() for c in line.split("|")]
68-
# Expect at least 4 cells: leading empty, Project, Modality, Repo, Date, trailing empty
81+
# Expect at least 4 cells: leading empty, Project, Modality, Repo/Count, trailing empty
6982
if len(cells) < 4:
7083
continue
84+
7185
modality_cell = cells[2] # Modality is the second visible column
7286
if not modality_cell:
7387
continue
88+
7489
parts = re.split(r"\s*,\s*", modality_cell)
7590
for p in parts:
7691
n = normalize(p)

0 commit comments

Comments
 (0)