<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 3/2/2012 2:11 PM, Hs Hs wrote:
<blockquote
cite="mid:1330715490.17262.YahooMailNeo@web111210.mail.gq1.yahoo.com"
type="cite">
<div style="color:#000; background-color:#fff; font-family:times
new roman, new york, times, serif;font-size:12pt">
<div style="font-family: 'times new roman', 'new york', times,
serif; font-size: 12pt; ">Hi:</div>
<div style="font-family: 'times new roman', 'new york', times,
serif; font-size: 12pt; "><span style="font-size: 12pt; ">I
have the following table and I am interested in calculating
mismatch ratio. I am not completely clear how to do this and
any help is deeply appreciated. </span></div>
<div style="font-family: 'times new roman', 'new york', times,
serif; font-size: 12pt; "><span style="font-size: 12pt; "><br>
</span></div>
<div style="font-family: 'times new roman', 'new york', times,
serif; font-size: 12pt; ">Length Matches</div>
<div><span><font face="'times new roman', 'new york', times,
serif">77 24A0T9T36</font><br>
</span></div>
<div><span><font face="'times new roman', 'new york', times,
serif">71 25^T9^T37<br>
</font></span></div>
<div><span><font face="'times new roman', 'new york', times,
serif">60 25^T9^T26</font></span></div>
<div><span><font face="'times new roman', 'new york', times,
serif">62 42A19<br>
</font></span></div>
<div><span><font face="'times new roman', 'new york', times,
serif"><br>
</font></span></div>
<div><span><font face="'times new roman', 'new york', times,
serif"><br>
</font></span></div>
<div><span><font face="'times new roman', 'new york', times,
serif">In length column I have length of the character
string. </font></span></div>
<div><span><font face="'times new roman', 'new york', times,
serif">In the second column I have the matches my
reference string. </font></span></div>
<div><span><font face="'times new roman', 'new york', times,
serif"><br>
</font></span></div>
<div><span><font face="'times new roman', 'new york', times,
serif"><br>
</font></span></div>
<div><span><font face="'times new roman', 'new york', times,
serif">In fist case, where 77 is length, in matches from
left to right, first 24 matched my reference string
following by a extra character A, a null (does not account
to proble) and extra T, 9 matches, extra T and 36 matches.
Totally there are 3 mismatches</font></span></div>
<div><span><font face="'times new roman', 'new york', times,
serif"><br>
</font></span></div>
<div><span><font face="'times new roman', 'new york', times,
serif">In case 2, I lost 2 characters (^ = loss of
character compared to reference sentence) - </font></span></div>
<div><span><font face="'times new roman', 'new york', times,
serif"><br>
</font></span></div>
<div><span><font face="'times new roman', 'new york', times,
serif">TOMISAGOODBOY</font></span></div>
<div><span><font face="'times new roman', 'new york', times,
serif">T^MISAGOOD^OY (here I lost 2 characters) = I
have 2 mismatches</font></span></div>
<div><span><font face="'times new roman', 'new york', times,
serif">TOMISAGOOODBOOY (here I have 2 extra characters O
and O) = I have two mismatches</font></span></div>
<div><span><font face="'times new roman', 'new york', times,
serif"><br>
</font></span></div>
<div><span><font face="'times new roman', 'new york', times,
serif"><br>
</font></span></div>
<div><font face="'times new roman', 'new york', times, serif">In
case 4: I have 42 matches, extra A and 19 matches = so I
have 1 mismatch</font></div>
<div><font face="'times new roman', 'new york', times, serif"><br>
</font></div>
<div><font face="'times new roman', 'new york', times, serif"><br>
</font></div>
<div><font face="'times new roman', 'new york', times, serif">How
can that mismatch number from matches string.</font></div>
<div><font face="'times new roman', 'new york', times, serif">1.
I have to count how many A or T or G or C (believe me only
these 4 letters will appear in this, i will not see Z or B
or K etc)</font></div>
<div><font face="'times new roman', 'new york', times, serif">2.
^T or ^A or ^G or ^C will also be a mismatch</font></div>
<div><font face="'times new roman', 'new york', times, serif"><br>
</font></div>
<div><font face="'times new roman', 'new york', times, serif"><br>
</font></div>
<div><font face="'times new roman', 'new york', times, serif">desired
output:</font></div>
<div><font face="'times new roman', 'new york', times, serif"><br>
</font></div>
<div><font face="'times new roman', 'new york', times, serif">
<div style="font-size: 12pt; ">Length Matches
mismatches</div>
<div style="font-family: 'Times New Roman'; "><span><font
face="'times new roman', 'new york', times, serif">77
24A0T9T36 3 </font><br>
</span></div>
<div style="font-family: 'Times New Roman'; "><font
face="'times new roman', 'new york', times, serif">71
25^T9^T37 2<br>
</font></div>
<div style="font-family: 'Times New Roman'; "><font
face="'times new roman', 'new york', times, serif">60
25^T9^T26 2</font></div>
<div style="font-family: 'Times New Roman'; "><font
face="'times new roman', 'new york', times, serif">62
42A19 1</font></div>
<div style="font-family: 'Times New Roman'; "><font
face="'times new roman', 'new york', times, serif">10
6^TTT1 3</font></div>
</font><br>
</div>
</div>
</blockquote>
<font face="'times new roman', 'new york', times, serif"><br>
I am sorry but I do not understand, and do not have the patience
to wade through all the above in the hopes of gaining insight.<br>
<br>
Perhaps you could restate the problem in a way that makes it
crystal clear.<br>
</font>
<pre class="moz-signature" cols="72">--
Bob Gailer
919-636-4239
Chapel Hill NC</pre>
</body>
</html>