<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Dear Ensembl developers,
<div><br>
</div>
<div>I'm interested in identifying the best pairwise LASTZ alignment within a list of genomic_align_blocks (mouse v human).  I'm using a modified version of the example provided at :</div>
<div><br>
</div>
<div><a href="http://useast.ensembl.org/info/docs/api/compara/compara_tutorial.html">http://useast.ensembl.org/info/docs/api/compara/compara_tutorial.html</a></div>
<div><br>
</div>
<div>1) The score() method is not particularly useful as it does not appear to take the alignment length into account. Is there another method that returns something similar to an E-value? </div>
<div><br>
</div>
<div>2) Based on crude metrics (% nucleotides aligned and eyeballing), the alignments appear to be ordered in the list from best to worst . Can anyone confirm how/if the alignments are ordered?</div>
<div><br>
</div>
<div><br>
</div>
<div>Thanks,<br>
<div apple-content-edited="true">
<div>Daniel <br>
<br>
</div>
<div>command line options (API V73):</div>
--seq_region X --seq_region_start 105500254 --seq_region_end 105500638 --output_file out.aln --species mouse
</div>
<div apple-content-edited="true"><br>
</div>
<div apple-content-edited="true"><br>
</div>
<div apple-content-edited="true"><br>
</div>
Relevant code snippet:</div>
<div><br>
</div>
<div>
<div>foreach my $this_genomic_align_block (@$genomic_align_blocks) {</div>
<div>    my $restricted_gab = $this_genomic_align_block->restrict_between_reference_positions($seq_region_start, $seq_region_end);    </div>
<div>   my  $this_align = $restricted_gab->get_SimpleAlign;</div>
<div>    print $alignIO  $this_align;</div>
<div>    #my $pid= $this_align->percentage_identity; #non-gap columns</div>
<div>    my $overallPid= $this_align->overall_percentage_identity; #all columns</div>
<div>    my $seq1=$this_align->get_seq_by_pos(1);</div>
<div>    my $seq2=$this_align->get_seq_by_pos(2);</div>
<div>    my $seqName2=$seq2->display_id();</div>
<div>    my $start=$seq2->start();</div>
<div>    my $end=$seq2->end();</div>
<div><br>
</div>
<div>    my $seqStr1=$seq1->seq();</div>
<div>    my $seqStr2=$seq2->seq();</div>
<div>    my $length=length($seqStr1);</div>
<div>    my $aligned=0;</div>
<div>    for (my $i=0;$i<$length;$i++){</div>
<div>        my $nuc1=substr($seqStr1,$i,1);</div>
<div>        my $nuc2=substr($seqStr2,$i,1);</div>
<div>        if ($nuc1 ne '-' && $nuc2 ne '-'){</div>
<div>        $aligned++;</div>
<div>        }</div>
<div>    }</div>
<div>    my $score=$this_genomic_align_block->score();</div>
<div>    my $rscore=$restricted_gab->score();</div>
<div>    my $percentAligned=$aligned/$sliceLength;</div>
<div>    print STDERR "$seqName2 $start $end $aligned $sliceLength perceAligned:$percentAligned score:$score restricted score:$rscore\n";</div>
<div>}</div>
</div>
<div><br>
</div>
<div>STDERR:</div>
<div><br>
</div>
<div>
<div>homo_sapiens/X 150684357 150684616 236 385 perceAligned:0.612987012987013 score:13262 restricted score:</div>
<div>homo_sapiens/X 145891632 145891730 99 385 perceAligned:0.257142857142857 score:29716 restricted score:</div>
<div>homo_sapiens/X 145895821 145895919 99 385 perceAligned:0.257142857142857 score:29716 restricted score:</div>
<div>homo_sapiens/HG1459_PATCH 145896018 145896116 99 385 perceAligned:0.257142857142857 score:29716 restricted score:</div>
<div>homo_sapiens/HG1459_PATCH 145891829 145891927 99 385 perceAligned:0.257142857142857 score:29716 restricted score:</div>
<div>homo_sapiens/X 145891846 145891927 80 385 perceAligned:0.207792207792208 score:29716 restricted score:</div>
<div>homo_sapiens/X 145895624 145895705 80 385 perceAligned:0.207792207792208 score:29716 restricted score:</div>
<div>homo_sapiens/HG1459_PATCH 145895821 145895902 80 385 perceAligned:0.207792207792208 score:29716 restricted score:</div>
<div>homo_sapiens/HG1459_PATCH 145892043 145892124 80 385 perceAligned:0.207792207792208 score:29716 restricted score:</div>
<div>homo_sapiens/X 150684688 150684739 52 385 perceAligned:0.135064935064935 score:13262 restricted score:</div>
</div>
<div><br>
</div>
</body>
</html>