Thanks for the input Andy. Now responding a bit belatedly to this since I just wrestled with the question....
>>
if you find a procedure for transforming the METAL file… or have thoughts on a good fast validator… I’d be happy to add that info to our FAQ to help other users,
Here's my best understanding (which you may want to add to FAQ if you agree):
In order to get the output of a METAL meta-analysis to play well in LocusZoom, there are three problems that need to be resolved:
1. Row Order: LZ needs the input to be in chrom/position order. METAL produces output that is in absolutely no order whatsoever.
2. Allele Order: LZ needs you to supply a column with genomic REF and the ALT. METAL produces output with two alleles in no particular order - it has no concept of a 'genome reference'. METAL could just as happily output alleles A/B with a positive BETA as alleles B/A with a negative BETA.
3. CHR:POS: LZ needs you to supply CHR and POS as distinct columns. METAL has no such columns - METAL combines multiple input files in a meta-analysis based on matching on a single "MARKER" column in each input. The contents of that MARKER are totally user/study dependent. the column could be filled with any values in any format whatsoever - but most likely something like "3:12345", or "chr3:12345" or "chr3:12345_G/T" or "rs987654321" or "my_private_id_1234" or literally whatever...
Note that solving #1 requires first solving #3. And solving #2 will require use of a genome reference dataset.
I have a python script that solves these three problems for case of MARKER values in the form "CHR:POS_...". I'd be happy to donate it, FWIW. This forum does not appear to allow me to attach files, but I'd be happy to email it. Minor change would be required if one's MARKER names contain <chr> and <pos> values, but in a slightly different format. More serious changes would be required if MARKER names are "rs####" - in that case, the code would need to be enhanced to look up all the rs#s in dbSNP database (which one would need to download).
-Matt