When geneticists want to see how closely related two genes are, they have two main ways of doing so: linkage analysis and association mapping.
Linkage analyses use observation of phenotypes, or traits that can be observed, that are built into pedigrees, where the inheritance of specific traits are tracked in a family over time. Linkage refers to the fact that genetic markers or alleles of a gene that are close to each other on a chromosome generally segregate together. When alleles recombine (shuffle over) during meiosis, they are able to be inherited with a different chromosome, but this happens less often if the genes are closer to each other on the same chromosome. So, genetic markers (or alleles) that lie relatively far apart on a chromosome will undergo recombination more frequently than genetic markers that lie close to each other. These data are then made into genetic maps that correspond to the distance between different genes on a chromosome.
Unlike linkage mapping, association mapping uses the newer technologies of DNA sequencing that allow scientists to identify many specific markers on a chromosome. Doing this over and over, and associating it with information from pedigrees, we can use our sequencing information to connect specific traits with a given sequence of DNA. Association mapping is generally carried out in the context of a whole genome, and this kind of study is called a Genome Wide Association Study (GWAS). Sequencing an entire genome is expensive, so instead, single nucleotide polymorphisms (SNPs) are used as molecular markers. SNPs are single sequence differences in DNA that are associated with a trait. For example, having an adenine at a given position in your DNA can be a SNP for having sickle cell anemia. Doing this thousands of times, with patients and controls, geneticists can identify individual or multiple genes responsible for traits, and start to find the locations of those genes on the chromosome. Unlike linkage analysis, which gives relative distances of genes, association mapping allows us to find the absolute position of genetic information.