shuffle(1)

πŸ“¦
version 1.9g+cvs20050121 Β· 2 versions
  • 1.9g+cvs20050121 Β· debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 1.6 Β· arch rolling
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– shuffle(1) β€” the Biosquid Manual's most chaotic little bestie πŸ’–

ok so. you know how sometimes you just need to scramble a sequence? like, shake it up, keep all the same pieces, but ✨rearranged✨? that's literally this whole program. welcome to shuffle, a page from the Biosquid Manual, and she's here to randomize ur sequences and never once forget a single letter. periodt. πŸŽ€


🌸 NAME 🌸

shuffle β€” randomize the sequences in a sequence file πŸ¦‹


✨ SYNOPSIS ✨

shuffle [options] seqfile

that's it. that's the whole summoning ritual, bestie. πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

ok so here's the vibe: shuffle reads a sequence file called seqfile, randomizes each sequence in it, and prints all the randomized sequences out in FASTA format on standard output. 🫢

and here's the part that lowkey saves your life: the sequence names are unchanged. so if you ever need to track down which randomized sequence came from which original sequence? you can. iykyk. πŸ”₯

by default it just shuffles each input sequence, preserving monosymbol composition exactly. like, same letters, same counts, different order. iconic.

if you want to shuffle while preserving both monosymbol and disymbol composition exactly, use the -d option. that's the fancy one. πŸ’…

now, the -0 and -1 options are a whole different beast β€” they let you generate sequences with the same Markov properties as each input sequence:

  • with -0, for each input sequence, 0th order Markov statistics are collected (e.g. symbol composition), and a new sequence is generated with the same composition.
  • with -1, the generated sequence has the same 1st order Markov properties as the input sequence (e.g. the same disymbol frequencies).
okay bestie pay attention here bc this is a real distinction and not me being dramatic: note that the default and -0, or -d and -1, are similar β€” but the shuffling algorithms preserve composition exactly, while the Markov algorithms only expect to generate a sequence of similar composition on average. exact vs. on-average. that's the whole tea. πŸ“

other shuffling algorithms are also available, and they're all documented below in the options. slay. 🌈


πŸŽ€ OPTIONS πŸŽ€

  • -0 β€” Calculate 0th order Markov frequencies of each input sequence (e.g. residue composition); generate output sequence using the same 0th order Markov frequencies. ✨
  • -1 β€” Calculate 1st order Markov frequencies for each input sequence (e.g. diresidue composition); generate output sequence using the same 1st order Markov frequencies. The first residue of the output sequence is always the same as the first residue of the input sequence. (yes, always. she's committed.) πŸ’–
  • -d β€” Shuffle the input sequence while preserving both monosymbol and disymbol composition exactly. Uses an algorithm published by S.F. Altschul and B.W. Erickson, Mol. Biol. Evol. 2:526-538, 1985. (academic citation but make it cute πŸ“š)
  • -h β€” Print brief help; includes version number and summary of all options, including expert options. ur little map. πŸ—ΊοΈ
  • -l β€” Look only at the length of each input sequence; generate an i.i.d. output protein sequence of that length, using monoresidue frequencies typical of proteins (taken from Swissprot 35). πŸ‘‘
  • -n <n> β€” Make <n> different randomizations of each input sequence in seqfile, rather than the default of one. more is more, bestie. ✨
  • -r β€” Generate the output sequence by reversing the input sequence. (Therefore only one "randomization" per input sequence is possible, so it's not worth using -n if you use reversal.) πŸ™ˆ
  • -t <n> β€” Truncate each input sequence to a fixed length of exactly <n> residues. If the input sequence is shorter than <n> it is discarded (therefore the output file may contain fewer sequences than the input file). If the input sequence is longer than <n> a contiguous subsequence is randomly chosen. πŸ’€ (yes the discard thing is real, don't come for me)
  • -w <n> β€” Regionally shuffle each input sequence in window sizes of <n>, preserving local residue composition in each window. Probably a better shuffling algorithm for biosequences with nonstationary residue composition (e.g. composition that is varying along the sequence, such as between different isochores in human genome sequence). 🧚
  • -B β€” (Babelfish). Autodetect and read a sequence file format other than the default (FASTA). Almost any common sequence file format is recognized (including Genbank, EMBL, SWISS-PROT, PIR, and GCG unaligned sequence formats, and Stockholm, GCG MSF, and Clustal alignment formats). See the printed documentation for a complete list of supported formats. 🐠

🌟 EXPERT OPTIONS 🌟

ok these ones are for when you're feeling like the main character of bioinformatics. no cap. πŸ’…

  • --informat <s> β€” Specify that the sequence file is in format <s>, rather than the default FASTA format. Common examples include Genbank, EMBL, GCG, PIR, Stockholm, Clustal, MSF, or PHYLIP; see the printed documentation for a complete list of accepted format names. This option overrides the default expected format (FASTA) and the -B Babelfish autodetection option. πŸ‘‘
  • --nodesc β€” Do not output any sequence description in the output file, only the sequence names. minimalism. πŸŽ€
  • --seed <s> β€” Set the random number seed to <s>. If you want reproducible results, use the same seed each time. By default, shuffle uses a different seed each time, so it does not generate the same output in subsequent runs with the same input. (so if ur results keep changing, that's not a bug bestie that's literally the design 😭)

πŸ¦‹ SEE ALSO πŸ¦‹

afetch(1), alistat(1), compalign(1), compstruct(1), revcomp(1), seqsplit(1), seqstat(1), sfetch(1), sindex(1), sreformat(1), stranslate(1), weight(1).

the whole squad. go say hi. πŸ’–


🌸 AUTHOR 🌸

Biosquid and its documentation are Copyright (C) 1992-2003 HHMI/Washington University School of Medicine. Freely distributed under the GNU General Public License (GPL). See COPYING in the source code distribution for more details, or contact me. πŸ’Œ

Sean Eddy
HHMI/Department of Genetics
Washington University School of Medicine
4444 Forest Park Blvd., Box 8510
St Louis, MO 63108 USA
Phone: 1-314-362-7666
FAX  : 1-314-362-2157
Email: eddy@genetics.wustl.edu

and that's the whole page, bestie!! 🫢 this was Biosquid 1.9g, dated January 2003, and honestly she aged like fine wine. now go forth and scramble some sequences responsibly. mwah. πŸ’…βœ¨πŸŽ€