I know that PLINK and HapMap files show the same information, but can you give a thorough explanation of how exactly they differ.
1 Answer
According to http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml#ped:
The PED file is a white-space (space or tab) delimited file: the first six columns are mandatory:
Family ID Individual ID Paternal ID Maternal ID Sex (1=male; 2=female; other=unknown) Phenotype
[...]
Genotypes (column 7 onwards) should also be white-space delimited; they can be any character (e.g. 1,2,3,4 or A,C,G,T or anything else) except 0 which is, by default, the missing genotype character. All markers should be biallelic. All SNPs (whether haploid or not) must have two alleles specified. Either Both alleles should be missing (i.e. 0) or neither. No header row should be given. For example, here are two individuals typed for 3 SNPs (one row = one person):
FAM001 1 0 0 1 2 A A G G A C FAM001 2 0 0 1 2 A A A G 0 0 ...
And here is what I find in the begining of a HapMap .ped file I got a few years ago (hapmap3_r2_b36_fwd.YRI.qc.poly.ped):
Y001 NA18488 0 0 2 -9 C C T T ... Y014 NA18519 0 0 1 -9 C C T T ... ...
So far, it seems to me than this is plain .ped format: the number of "header" columns is the same, and seems to conform to the specifications given in the above-mentioned web page.
Now let's have a look at the .map files.
By default, each line of the MAP file describes a single marker and must contain exactly 4 columns:
chromosome (1-22, X, Y or 0 if unplaced) rs# or snp identifier Genetic distance (morgans) Base-pair position (bp units)
[...]
Note: Most analyses do not require a genetic map to be specified in any case; specifying a genetic (cM) map is most crucial for a set of analyses that look for shared segments between individuals. For basic association testing, the genetic distance column can be set at 0.
[...]
The autosomes should be coded 1 through 22. The following other codes can be used to specify other chromosome types:
X X chromosome -> 23 Y Y chromosome -> 24 XY Pseudo-autosomal region of X -> 25 MT Mitochondrial -> 26
The numbers on the right represent PLINK's internal numeric coding of these chromosomes: these will appear in all output rather than the original chromosome codes.
Here we have something that may be different. The end of the .map file corresponding to the HapMap .ped file looks like this:
26 rs28357376 0 15825 26 rs2853510 0 15925 26 rs2854125 0 16149
The HapMap .map file uses "plink's internal numeric coding" for the chromosome instead of the letter code (MT).
Otherwise, it looks a pretty standard .map file, with no genetic distance indicated.
-
$\begingroup$ I should have specified, I meant the HapMap phased/legend/sample files as compared to map/ped files $\endgroup$– higgs241Jun 25, 2013 at 13:57