The present invention provides methods of determination of a global DNA methylation index (GDMI) in a sample from a subject, using a variety of methods which can detect global, genome-wide, and gene-specific DNA methylation to create methylation portraits that can be used for early detection, diagnosis, and clinical management in the personalized medicine space. Further, the invention provides methods of diagnosis of cancer, including gastric cancer and hepatocellular cancer in a subject, by comparing the GDMI in a sample obtained from a subject to the methylation index of standard controls. These methods allow diagnosis of gastric carcinoma and liver cancer in patients who may be asymptomatic or have inconclusive pathology, and allowing earlier treatment of the subject.