From 0b3b449c81ff791202b825bdf95823f9a380343e Mon Sep 17 00:00:00 2001
From: Graham McVicker <mcvicker@sanger.ac.uk>
Date: Mon, 19 May 2003 09:19:49 +0000
Subject: [PATCH] non-intuitive map_weight calculation script

---
 misc-scripts/markers/map_weight.pl | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 misc-scripts/markers/map_weight.pl

diff --git a/misc-scripts/markers/map_weight.pl b/misc-scripts/markers/map_weight.pl
new file mode 100644
index 0000000000..9e5280d6e2
--- /dev/null
+++ b/misc-scripts/markers/map_weight.pl
@@ -0,0 +1,24 @@
+use strict;
+
+my $marker_feature_in = shift;
+my $marker_hits_in = shift;
+
+open MARKER_FEATURES, $marker_feature_in or die;
+open MARKER_HITS, $marker_hits_in or die;
+
+my %marker_hit_hash;
+while(<MARKER_HITS>) {
+	my ($id, $count) = split;
+	$marker_hit_hash{$id} = $count;
+}
+
+close MARKER_HITS;
+
+while(<MARKER_FEATURES>) {
+	chomp;
+	my @row = split;
+	$row[-1] = $marker_hit_hash{$row[1]};
+	print join("\t", @row) . "\n";
+}
+
+close MARKER_FEATURES;
-- 
GitLab