These results not only elucidate the temporal dynamics of prostate cancer progression but also identify trajectory-dependent genes, such as ASCL1 and WDFY4, as potential biomarkers for NEPC. This evidence concerns the gene WDFY4 and prostate carcinoma.