Usage (Python 2.7):

fasta-dinucleotide-shuffle [options]

Usage (Python 3.x):

fasta-dinucleotide-shuffle-py3 [options]


The program fasta-dinucleotide-shuffle creates a shuffled version of a FASTA file of nucleotide sequences (other alphabets may be specified). The letters in each sequence in the input file are shuffled in such a way that dinucleotide frequencies are exactly preserved. Any alias symbols are converted to their core symbol before shuffling.

Note that the other shuffling program provided with the MEME Suite, fasta-shuffle-letters, supports all the features that fasta-dinucleotide-shuffle has and runs faster so it should be used in preference.

Two different versions of fasta-dinucleotide-shuffle are provided: fasta-dinucleotide-shuffle for Python 2.7 and fasta-dinucleotide-shuffle-py3 for Python 3.x. The random number generator has changed between Python 2.7 and Python 3.x, so results between the two verisons may differ.


Sequences in FASTA format from a file.


Writes a FASTA format file to standard output.


Option Parameter Description Default Behavior
General Options
-ffilename Name of input file (required). None.
-ttag The letters in tag are appended to the FASTA identifier of each shuffled sequence. Each shuffled sequence has the same name as the original.
-sseed Use seed as the starting seed for the random number generator. 1
-cn Make n shuffled copies of each original sequence. Make 1 shuffled copy.
-afilename Provide the alphabet definition to use for non-DNA alphabets. Sequences will be verified to be in the given alphabet. Use the standard DNA alphabet.