diff --git a/ACCESSORY_SCRIPTS/ldmap_to_csv.pl b/ACCESSORY_SCRIPTS/ldmap_to_csv.pl new file mode 100644 index 0000000000000000000000000000000000000000..ab7914d426ec6ede2f92e98cc753f271a7ab6eb4 --- /dev/null +++ b/ACCESSORY_SCRIPTS/ldmap_to_csv.pl @@ -0,0 +1,16 @@ +use warnings; use strict; + +## Script to convert LDmap output to CSV +## RJPengelly, 2014, r.j.pengelly@soton.ac.uk + +open FILE, $ARGV[0]; +open OUT, ">$ARGV[0]" . '.csv'; + +print OUT 'N,Locus,KBmap,LDUmap'; +while (<FILE>) { + if ($_ =~ /#/) {next;} + $_ =~ s/^\s+//; + $_ =~ s/\s+$//; + $_ =~ s/\s+/\,/g; + print OUT "$_\n"; +}