Core functional nodes and sex-specific pathways in human ischaemic and dilated cardiomyopathy