lh3/seqtk — pull request #25 by kdmurray91 (2014-02-05 04:49:38+00:00)
Title: Add oversample option to seqtk sample

This will permit sampling exactly N sequences, even if N is greater than
the number of sequences in the input file.

It reads all sequences into a buffer, then copies a random sequence from the original section.

The only issue with this strategy I can see is that the first (num reads in file) sequences will be in input order. I can add code to shuffle the buffer before copying reads to make up the required N ouput sequences if you'd like.