text: user2504: I'm looking for some software that can "efficiently" (time and memory) compute the exact percentage of non-unique k-mers in a genome for given k. I don't need the k-mers or the abundances itself, I just need the percentage.
  Alternatively, the result could be:
  
  the number of different k-mers observed in the genome
  the number of unique k-mers, i.e. k-mers that occur only once in the genome, or the number of non-unique k-mers, i.e., k-mers that occur more than once in the genome.
  
  which can be easily used to compute the requested percentage.
  Requested features:
  
  don't count k-mers with ambiguous nucleotides
  count a k-mer and its reverse complement together
  k upto 50 or 100
  for large genomes (upto some GB)  
  efficiency
  
  For the study in mind, I like to vary k. Hence, I will run the software several times with different k.
  Any help is welcome.
  
  user77: You can do all of that with khmer. For example, abundance-dist-single.py produces a file with columns: k-mer abundance, k-mer count, cumulative count, and fraction of total distinct k-mers. So for question 1 you would sum column 2. For question 2 you would just get thek-mer countassociated with ak-mer abundance` of 1.
  That package also provides a python API (see the read the docs link above) if you need to customize things more.
  
original_text: 2504: <p>I'm looking for some software that can "efficiently" (time and memory) compute the exact percentage of non-unique k-mers in a genome for given k. I don't need the k-mers or the abundances itself, I just need the percentage.</p>
  
  <p>Alternatively, the result could be:</p>
  
  <ol>
  <li>the number of different k-mers observed in the genome</li>
  <li>the number of unique k-mers, i.e. k-mers that occur only once in the genome, <strong>or</strong> the number of non-unique k-mers, i.e., k-mers that occur more than once in the genome.</li>
  </ol>
  
  <p>which can be easily used to compute the requested percentage.</p>
  
  <p><strong>Requested features:</strong></p>
  
  <ul>
  <li>don't count k-mers with ambiguous nucleotides</li>
  <li>count a k-mer and its reverse complement together</li>
  <li>k upto 50 or 100</li>
  <li>for large genomes (upto some GB)  </li>
  <li>efficiency</li>
  </ul>
  
  <p>For the study in mind, I like to vary k. Hence, I will run the software several times with different k.</p>
  
  <p>Any help is welcome.</p>
   77: <p>You can do all of that with <a href="http://khmer.readthedocs.io/en/v2.1.1/" rel="noreferrer">khmer</a>. For example, <code>abundance-dist-single.py</code> produces a file with columns: <code>k-mer abundance</code>, <code>k-mer count</code>, <code>cumulative count</code>, and fraction of total distinct k-mers<code>. So for question 1 you would sum column 2. For question 2 you would just get the</code>k-mer count<code>associated with a</code>k-mer abundance` of 1.</p>
  
  <p>That package also provides a python API (see the read the docs link above) if you need to customize things more.</p>
  