Additional file 3. Code and environment README Project ------- Fetal sex confounds placental transcriptomic signatures of gestational diabetes: a six-cohort audit of public data. Code availability ----------------- The analysis scripts and the full QC chain (C1-C17) are archived at: Zenodo DOI: 10.5281/zenodo.23857573 https://doi.org/10.5281/zenodo.23857573 Corresponding author ORCID: Songming He, 0009-0000-0104-4433 (https://orcid.org/0009-0000-0104-4433) Data sources ------------ GSE249311 bulk RNA-seq, 54 placental samples (30 with annotated subtype) GSE263483 bulk RNA-seq, 8 GDM vs 8 control GSE267340 10x scRNA-seq, 4 samples (GDMM1, GDMM2, GDMMINS, control) GSE173193 10x scRNA-seq, 8 samples in 4 groups (control, GDM, preeclampsia, advanced age) GSE222987 Visium spatial transcriptomics, 16 samples; 4 control villous samples used GSE70493 Affymetrix HTA-2.0 array, 55 independent samples (30 GDM vs 25 control) GTEx v8 whole-blood cis-eQTL (GTEx Portal) FinnGen R11 GEST_DIABETES (16,802 cases / 237,816 controls) Environment ----------- Python 3.13.12 numpy, pandas, scipy, matplotlib, seaborn scanpy, harmonypy, anndata, leidenalg pydeseq2 0.5.4 gseapy (Enrichr) openpyxl python-docx Run order --------- 01_bulk_qc.py QC and count filtering for GSE249311 02_bulk_deg.py subtype DE with PyDESeq2 03_decoupling.py original (v1) decoupling analysis, retained for audit 03b_decoupling_v2.py corrected decoupling (true CPM, +1-CPM pseudocount, two-arm filter, Y/CNV/segmental-duplication exclusion, sex inference, threshold and leave-one-out sensitivity) 04_sc_qc.py single-cell QC for GSE267340 04b_sc_cluster_annot.py Leiden clusters and marker-based annotation 04c_curated_annot.py curated cell-type annotation and composition 05_gse173193_validation.py original (v1) GSE173193 validation, retained for audit 05b_gse173193_v2.py corrected four-group GSE173193 analysis 06_spatial_projection.py original (v1) spatial projection, retained for audit 06b_spatial_v2.py corrected spatial analysis (4 control villous samples, within-sample Fisher-z pooling, no p values) 07_validation.py GSE263483 recomputation and cross-cohort discordance 08_mr_analysis.py candidate gene selection 08b_mr_gtex.py GTEx v8 x FinnGen R11 cis-MR 09_publication_figures.py original (v1) figures, retained for audit 09b_publication_figures_v2.py corrected figures (v2.1, 300 dpi) 10_gse70493_validation.py GSE70493 probe mapping and module scores QC records ---------- C1-C13 original pipeline checks and external validations C14 corrected decoupling analysis (normalization, pseudocount, filter, artifacts, sex) C15 corrected GSE173193 four-group analysis C16 corrected spatial analysis (control villi, within-sample) C17 figure regeneration and figure-text consistency Notes ----- - The v1 scripts and tables are retained because the manuscript reports the corrections. - Permutation counts: 1,000 for genome-wide rank correlations; 5,000 for GSE70493 module scores. - The GSE173193 'GL' group is the advanced-age group, not GDM or LGA. - Spatial correlations are descriptive; no p values are reported because spatial autocorrelation was not modeled.