File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,25 @@ task MultiomeLabelTransfer {
128128 LOCALIZE_FLAG = "--localize"
129129 fi
130130
131+ # Ensure GEX h5ad has 'star_IsCell' column (required by the script).
132+ # If missing, add it with all True so the filter is a no-op.
133+ python3 -c "
134+ import scanpy as sc
135+ import os
136+
137+ gex_path = '$GEX_FILE '
138+ # Only patch local files (not GCS paths handled by --localize)
139+ if not gex_path.startswith('gs://') and os.path.exists(gex_path):
140+ adata = sc.read_h5ad(gex_path)
141+ if 'star_IsCell' not in adata.obs.columns:
142+ print('Adding missing star_IsCell column (all True) to GEX h5ad')
143+ adata.obs['star_IsCell'] = True
144+ adata.write(gex_path)
145+ print('Patched GEX h5ad saved')
146+ else:
147+ print('star_IsCell column already present')
148+ "
149+
131150 python3 /usr/local/multiome_label_transfer.py \
132151 --gex-file "$GEX_FILE " \
133152 --atac-file "$ATAC_FILE " \
You can’t perform that action at this time.
0 commit comments