Dude, your enthusiasm is contagious, being from a bioinformatics background, however, I can't follow what you're trying to say. You plotted this similarity matrix, there're 4 pieces of data and the matrix has 25 elements is obvious from the context but what is the weight function for each of these nucleotides, since you said pairwise, which two segments are aligned against each other and which pair score is assigned to each nucleotide pairs in the combination. You "wrote a program that extracts the coordinates and corresponding values of the matrix when this value is greater than 60", show us some relevant excerpts from it.

"the data for sequence 4 in this example is not in the table above"
Don't you think it might be imperative that the table has representations of the sequences you've provided instead of showing us the sequences but showing a different table of perhaps different similarity scores. I tried mapping the sequences to the matrix to get the scores associated with each nucleotide but without the scoring weight I can't of course know how two nucleotides evaluation is assigned values representing the strength of the pairwise similarity checks.

You said there're two clusters, please shed light into how these clusters are deduced. I am asking all these questions so I can help clarifying the problem because probably someone can come with a more optimal approach than the one you're following or can guide you to what the right thing to do is.

Finally, "I am doing my best to explain my problem".
And no doubt that we'd do our best to understand and help solve the problem each in our own capacities. Check these ( First link, recursive formula.), and maybe this one More efficient way to lookup with 2 AoA's. for some initial warm-up.

Welcome to Perl Monks and have a happy Perl journey.

Update: subroutines and references are easy concepts to pick, if you give yourself 10 days to sit for them., you would know another definition for the sentence "Powerful Fun".


Excellence is an Endeavor of Persistence. Chance Favors a Prepared Mind.

In reply to Re^3: Pair-Wise Clustering by biohisham
in thread Pair-Wise Clustering by cutcopy11

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.