Pan-cancer and single-cell modelling of genomic alterations through gene expression