title: Cluster analysis of barcoded DNA
body: <p>I am using barcodes to tag mitochondrial DNA strands previous to PCR. The barcode sequences are not known, but they are 18 nucleotides long and directly proceed a known sequence (either CATCAT or TACTAC). Each DNA molecule will get a unique barcode identifier. Once the molecules undergo PCR, I need to cluster the sequences based on their 18 nucleotide barcode, and then subsequently align the sequences, per barcode.<br>
  To use an overly simple example, lets say I have 2 molecules that are going into a PCR reaction:</p>
  
  <pre><code>     CATCATBARCODE1SEQUENCE1
       TACTACBARCODE2SEQUENCE2 
  </code></pre>
  
  <p>After amplification I have:</p>
  
  <pre><code>     CATCATBARCODE1SEQUENCE1
       CATCATBARCODE1SEQUENCE1 
       TACTACBARCODE2SEQUENCE2
       TACTACBARCODE2SEQUENCE2 
  </code></pre>
  
  <p>I then want to search the section of sequence at position 6-13 and cluster them based on that window of sequence without changing the rest of the sequence, which would actually just look like what I have above. Then I could perform the alignment on the adjacent sequences.<br>
  Any ideas on how I could accomplish this clustering of a window of sequence, without taking into account the rest of the sequence? Thanks. </p>