title: list of short text, want to choose lines that are at least 2 letters different
body: <p>I have a list of 8 letter DNA sequences, for example:</p>
  
  <pre><code>    GGAGACAA  
      GGATACAA 
      AATCAGTC 
      ACACCTGG 
  </code></pre>
  
  <p>I want to select all of the lines that are <strong>positionally</strong> at least 2 letters different than every other line. Ideally I'd want to keep lines 3,4 and 1 OR 2 (but don't care which). But at a minimum, I want to keep 3 and 4. Most important is that there are no lines included that have only one positional base difference from any other retained line.</p>
  
  <p>How would you do it? R, grep/gawk are my usual tools but I can't figure out how to do what seems like a simple task using those. </p>
  
  <p>ETA-lines one and two are only one letter different from each other (G vs T in the fourth position). Which is why I don't want to retain both of them.  There are ~65,000 possible combinations of 8 bases so most of my (~4000 line) list should meet this 2 letters different from all other lines criteria.  I'm having a hard time figure out how to find those few that don't.</p>