DelimetedFileTransformer
This java program was designed to convert the HapMart output so that it would be easier to compare to my genotyping results. 

1) Get Genotype file from HapMart (one for each population).
The tab delimited output from HapMart on the HapMap page looks like this:

chromosome	position	strand	marker id	alleles	 reference allele	POP:CEU [NA06985 NA06991 NA06993 NA06994 NA07000 NA07019 NA07022 NA07029 NA07034 NA07048 NA07055 NA07056 NA07345 NA07348 NA07357 NA10830 NA10831 NA10835 NA10838 NA10839 NA10846 NA10847 NA10851 NA10854 NA10855 NA10856 NA10857 NA10859 NA10860 NA10861 NA10863 NA11829 NA11830 NA11831 NA11832 NA11839 NA11840 NA11881 NA11882 NA11992 NA11993 NA11994 NA11995 NA12003 NA12004 NA12005 NA12006 NA12043 NA12044 NA12056 NA12057 NA12144 NA12145 NA12146 NA12154 NA12155 NA12156 NA12234 NA12236 NA12239 NA12248 NA12249 NA12264 NA12707 NA12716 NA12717 NA12740 NA12750 NA12751 NA12752 NA12753 NA12760 NA12761 NA12762 NA12763 NA12801 NA12802 NA12812 NA12813 NA12814 NA12815 NA12864 NA12865 NA12872 NA12873 NA12874 NA12875 NA12878 NA12891 NA12892]
chr4	130250213	+	rs10009430	C/T	C	CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC NN CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC NN CC CC NN CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC
chr22	41000237	-	rs1001586	A/C	C	CC AC AC CC CC AC AC CC CC AC AA AC CC CC CC AC AC CC AC CC AC CC AC AC AC CC CC CC AC AC CC AC AC CC AC CC AC CC CC AA CC AC CC AC CC CC CC CC AC AC CC CC AC AC AC CC AC CC AC CC CC CC CC CC CC CC CC CC CC AA CC AC AC CC CC AC CC CC AC CC CC CC CC CC CC CC AC AC AC CC
chr4	87775454	+	rs10025433	A/G	G	GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG NN GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG
chr5	41097472	+	rs1023840	C/T	C	CT CC CC CT CC CC CC CC CC CC CT CT CT CT TT CC CC CC CC CC CC CC CC CC CC CT CT CT CC CC CT CC CT CC CC CC CC CC CT CT CT CC CC CC CC CC CC CT CT CT CC CC CC CT CC CC CC CT CC CC CT CC CC CC CC CC CT CT CC CC CC CC CC CT CC CT CC TT CT CC CC CC CC CC CT CC CC CT CC CT
chr7	44071421	+	rs10250779	C/T	C	CC CC CC NN CC NN CC CC CC CC CC CC CC CC CT CC CC CC CC CC CC CC NN CC CC CC CC CC CC CC CC NN CC CC CC CC NN CC CC CC NN CC CC CC CC CC CC CC CC CC CC NN CC CC NN CC CC CC CC CC CC CC CT CC NN NN CC CC CC CC CC CC CC NN NN CC CC CC CC CC CC CC CC CC CC NN CC CC CC CC
chr15	29130036	+	rs1035705	C/T	C	TT CT CC TT NN CT CT CT CT CC CT TT CT CC CT CT CT CT CT CC CT TT CT CT CT CT CT CT CT CC CT CT CT TT CT CT CT CT CT CT CT CC CC CC TT CC CC CT CC CT TT CT TT CT CT CT CT CT CC TT TT CT TT TT CT CT CC CC CT CT CT CT CC CT CT TT TT TT TT TT TT CT TT CC CT CT CT TT CT TT
chr19	54137586	+	rs10423255	C/T	C	CT CC CC CC CT CC CC NN CC CC CC CT CC CC NN CC CC CC CC CT CC CC CC CC CC CC CC CC CC CT CC CC CC CC CC CC CC CC CC CC CC CC CT CC CC CC CT CC CC CT CC CT CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC
chr1	158066432	+	rs10430458	C/T	C	CC CC CT CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC NN CC CC CC CC CC NN CC CC NN NN CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC NN CC CC NN NN CC CC CC CC CC CC CC CC CC NN CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC
chr3	53874316	+	rs1043261	C/T	C	CC CT CT CC CC CC CC CC CT CT CC CC CT CT CC CC CC CC CC CC CC CC CC CC CC CC CC CT CC CC CC CC CC CC CT CC CC CC CT CC CC CC CC CC CC CC CT CC CC CC CC CC CC CC CC CT CC CC CC CC CC CC CC CC CT CC CC CC CC CC CC CC CC CC CC CC CT CC CT CC CT CC CC CC CC CC CC CC CT CC
chr12	68273055	+	rs1043434	A/G	A	AA AA AA AA AA AA AG AA AA AA AA AA AA AA AA AG AA AA AG AA AA AG AA AA AA AA AG AA AA AA AA AA AA AA AG AA AA AA AA AG AA AG AG AA GG AA AA AG AA AA AA AA AG AG AG AA AG AG AA AA AA AA AA AA AG AA AA AA AA AA AA AA AA AA AA AA AG AA AA AG AA AA AG AA AG AA AG AA AA AG
chr17	70528216	+	rs1044228	C/T	C	TT TT TT CC CT CT CC CC CT CC CT CT CT CT CT TT CC CC CC CT CC CT CT CT CT CC CT CC CT CC CC CC CC CC CT TT CT CC CC CC TT CC CT CC CC CT TT CT CT CT CC CT CT CT TT CC CC CC CT CT CC CC CC CC CT CT CC CT CC CT CT TT CT CT CT CC CC CT CT CC CC CC CT CT CT CC TT CC CC CT


2) Change a few things in the output file before running the program: 
#Put underscore between marker & id, and between reference & allele
#Delete Pop:CEU and both [ and ] on each side of the sample line
#Use regular expressions in textpad and do find space (" ") replace with \t so that the genptypes and samples are tab rather than space delimited
#There might also be an extra space before reference_allele, get rid of this manually so that there is only one tab!
The file should now look like this: 

chromosome	position	strand	marker_id	alleles	reference_allele	NA06985	NA06991	NA06993	NA06994	NA07000	NA07019	NA07022	NA07029	NA07034	NA07048	NA07055	NA07056	NA07345	NA07348	NA07357	NA10830	NA10831	NA10835	NA10838	NA10839	NA10846	NA10847	NA10851	NA10854	NA10855	NA10856	NA10857	NA10859	NA10860	NA10861	NA10863	NA11829	NA11830	NA11831	NA11832	NA11839	NA11840	NA11881	NA11882	NA11992	NA11993	NA11994	NA11995	NA12003	NA12004	NA12005	NA12006	NA12043	NA12044	NA12056	NA12057	NA12144	NA12145	NA12146	NA12154	NA12155	NA12156	NA12234	NA12236	NA12239	NA12248	NA12249	NA12264	NA12707	NA12716	NA12717	NA12740	NA12750	NA12751	NA12752	NA12753	NA12760	NA12761	NA12762	NA12763	NA12801	NA12802	NA12812	NA12813	NA12814	NA12815	NA12864	NA12865	NA12872	NA12873	NA12874	NA12875	NA12878	NA12891	NA12892
chr4	130250213	+	rs10009430	C/T	C	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	NN	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	NN	CC	CC	NN	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC
chr22	41000237	-	rs1001586	A/C	C	CC	AC	AC	CC	CC	AC	AC	CC	CC	AC	AA	AC	CC	CC	CC	AC	AC	CC	AC	CC	AC	CC	AC	AC	AC	CC	CC	CC	AC	AC	CC	AC	AC	CC	AC	CC	AC	CC	CC	AA	CC	AC	CC	AC	CC	CC	CC	CC	AC	AC	CC	CC	AC	AC	AC	CC	AC	CC	AC	CC	CC	CC	CC	CC	CC	CC	CC	CC	CC	AA	CC	AC	AC	CC	CC	AC	CC	CC	AC	CC	CC	CC	CC	CC	CC	CC	AC	AC	AC	CC
chr4	87775454	+	rs10025433	A/G	G	GG	GG	GG	GG	GG	GG	GG	GG	GG	GG	GG	GG	GG	GG	GG	GG	GG	GG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AA	AA	AG	AA	AA	AA	AA	AG	AA	AA	AA	AA	AA	AA	AA	AG	AA	AA	AA	AA	AG	AA	AG	AG	AA	GG	AA	AA	AG	AA	AA	AA	AA	AG	AG	AG	AA	AG	AG	AA	AA	AA	AA	AA	AA	AG	AA	AA	AA	AA	AA	AA	AA	AA	AA	AA	AA	AG	AA	AA	AG	AA	AA	AG	AA	AG	AA	AG	AA	AA	AG
chr17	70528216	+	rs1044228	C/T	C	TT	TT	TT	CC	CT	CT	CC	CC	CT	CC	CT	CT	CT	CT	CT	TT	CC	CC	CC	CT	CC	CT	CT	CT	CT	CC	CT	CC	CT	CC	CC	CC	CC	CC	CT	TT	CT	CC	CC	CC	TT	CC	CT	CC	CC	CT	TT	CT	CT	CT	CC	CT	CT	CT	TT	CC	CC	CC	CT	CT	CC	CC	CC	CC	CT	CT	CC	CT	CC	CT	CT	TT	CT	CT	CT	CC	CC	CT	CT	CC	CC	CC	CT	CT	CT	CC	TT	CC	CC	CT

3) You need 3 files to run the program: DelimetedFileTransformer.java, DelimetedFileTransformer.class and input file (e.g. CEU_input.txt - file above)
Put all 3 files in a temporary location that is easily navigated to (e.g. U:/)

4) Go to command prompt (START - Run - cmd)

5) Make sure your Java class path is correctly configured: Type: set classpath=.;%classpath%.

6) Type: java DelimetedFileTransformer CEU_input.txt 6 Sample Genotype
This gives you an output file (CEU_input.out) that looks like this: 
chromosome	position	strand	marker_id	alleles	reference_allele	Sample	Genotype
chr4	130250213	+	rs10009430	C/T	C	NA06985	CC
chr4	130250213	+	rs10009430	C/T	C	NA06991	CC
chr4	130250213	+	rs10009430	C/T	C	NA06993	CC
chr4	130250213	+	rs10009430	C/T	C	NA06994	CC
chr4	130250213	+	rs10009430	C/T	C	NA07000	CC
chr4	130250213	+	rs10009430	C/T	C	NA07019	CC
chr4	130250213	+	rs10009430	C/T	C	NA07022	CC
chr4	130250213	+	rs10009430	C/T	C	NA07029	CC
chr4	130250213	+	rs10009430	C/T	C	NA07034	CC
chr4	130250213	+	rs10009430	C/T	C	NA07048	CC
chr4	130250213	+	rs10009430	C/T	C	NA07055	CC
chr4	130250213	+	rs10009430	C/T	C	NA07056	CC
chr4	130250213	+	rs10009430	C/T	C	NA07345	CC
chr4	130250213	+	rs10009430	C/T	C	NA07348	CC
chr4	130250213	+	rs10009430	C/T	C	NA07357	CC
chr4	130250213	+	rs10009430	C/T	C	NA10830	CC
chr4	130250213	+	rs10009430	C/T	C	NA10831	CC
chr4	130250213	+	rs10009430	C/T	C	NA10835	CC
chr4	130250213	+	rs10009430	C/T	C	NA10838	CC

