#These files contain all markers from 1 bp to 10.000.000 bp of chromosome 1 of HapMap 3, release.
#The format is plink's PED and MAP.

#These files where generated by running the following commands:

#Fetch HapMap3, release 2
curl ftp://ftp.ncbi.nlm.nih.gov/hapmap/genotypes/2009-01_phaseIII/plink_format/hapmap3_r2_b36_fwd.consensus.qc.poly.map.bz2 > hapmap3_r2_b36_fwd.consensus.qc.poly.map.bz2
curl ftp://ftp.ncbi.nlm.nih.gov/hapmap/genotypes/2009-01_phaseIII/plink_format/hapmap3_r2_b36_fwd.consensus.qc.poly.ped.bz2 > hapmap3_r2_b36_fwd.consensus.qc.poly.ped.bz2 

#Unzip data
bunzip2 hapmap3_r2_b36_fwd.consensus.qc.poly.map.bz2 
bunzip2 hapmap3_r2_b36_fwd.consensus.qc.poly.ped.bz2 

#Get first 10.000.000 bp in chromosome 1
#Save in chr1.ped chr1.map files
plink --file hapmap3_r2_b36_fwd.consensus.qc.poly --recode --chr 1 --from-bp 1 --to-bp 10000000 --noweb --out chr1_temp

#Select only the first 10 samples
head -n 100 chr1_temp.ped > chr1.ped
cp chr1_temp.map  chr1.map

rm chr1_temp.*


