Changes

From Biolecture.org

7) Aligning two protein sequences

1,503 bytes added, 18:47, 13 June 2017
no edit summary
<p>Aligned <strong>This one compares two tumor protein using MEGA7 programsequence, which user input.But is not designed for global alignment.&nbsp;</strong></p>
<p>Tumor protein p53 and tumor protien&nbsp#!/usr/bin/perl<br />use strict;<br />use warnings;p73.</p>
<p>Could not upload mas &nbsp; <strong>my $dna1 = &lt;STDIN&gt;;</strong><br />&nbsp; chomp($dna1);<br />&nbsp; &nbsp;my @string1 = split (&#39;&#39;, $dna1);<br />&nbsp; &nbsp;<strong>my $len1 = length $dna1;</strong></p> <p>&nbsp; <strong>my $dna2 = &lt;STDIN&gt;;</strong><br />&nbsp; chomp ($dna2);<br />&nbsp; my @string2 = split (&#39;&#39;, $dna2);<br />&nbsp; <strong>my $len2 = length $dna2;</strong></p> <p>sub max {<br />&nbsp; &nbsp; my ($max, @vars) = @_;<br />&nbsp; for (@vars) {<br />&nbsp; &nbsp;<strong> &nbsp;$max = $_ if $_ &gt; $max;</strong><br />&nbsp; &nbsp; }<br />&nbsp;return $max;<br />}</p> <p><strong>&nbsp;my $stlen = max ($len1, $len2);</strong></p> <p>&nbsp; <strong>foreach (my $i =0; $i &lt; $stlen; $i++) </strong>{<br />&nbsp; &nbsp; &nbsp; if ( $string1[$i] eq $string2[$i] ) {<br />&nbsp; &nbsp; &nbsp;print &quot; $string1[$i] = $string2[$i]\n&quot;;}<br />&nbsp; &nbsp;else<br />&nbsp; &nbsp; &nbsp; &nbsp; { print &quot;$string1[$i] x $string2[$i]\n&quot;; }<br />}<br />&nbsp;</p> <p><strong>The output file.result sample is:</strong>&nbsp;</p> <p>MKRRRLLYYILEUGNMCG<br />KKKRRLLYVILEUGNNNG<br />&nbsp;M x K<br />&nbsp;K = K<br />&nbsp;R x K<br />&nbsp;R = R<br />&nbsp;R = R<br />&nbsp;L = L<br />&nbsp;L = L<br />&nbsp;Y = Y<br />&nbsp;Y x V<br />&nbsp;I = I<br />&nbsp;L = L<br />&nbsp;E = E<br />&nbsp;U = U<br />&nbsp;G = G<br />&nbsp;N = N<br />&nbsp;M x N<br />&nbsp;C x N<br />&nbsp;G = G<br />&nbsp;</p>
Anonymous user

Navigation menu