SAK(1)

πŸ“¦
version 2.5.2 Β· 2 versions
, in ubuntu stonking

πŸ’– SAK(1) β€” the slicing & dicing era πŸ’–

okay so bestie, buckle UP, because sak is about to change your whole FASTA/FASTQ workflow and I'm not even being dramatic. this is the manual page for sak, a tool for slicing and dicing of FASTA/FASTQ files ✨

"It slices, it dices and it makes the laundry!"

Original SAK tool by David Weese. Rewrite by Manuel Holtgrewe. kings fr πŸ‘‘


🌈 SYNOPSIS 🌈

sak [OPTIONS] [-o OUT.{fa,fq}] IN.{fa,fq}

πŸŽ€ DESCRIPTION πŸŽ€

literally what it says on the tin. you feed it sequences, it slices them, it dices them, it makes the laundry. no cap.


πŸ¦‹ REQUIRED ARGUMENTS πŸ¦‹

  • IN INPUT_FILE β€” bestie you HAVE to give it a file. valid filetypes are: .sam[.*], .raw[.*], .gbk[.*], .frn[.*], .fq[.*], .fna[.*], .ffn[.*], .fastq[.*], .fasta[.*], .fas[.*], .faa[.*], .fa[.*], .embl[.*], and .bam, where * is any of the following extensions: gz, bz2, and bgzf for transparent (de)compression. so basically compressed files just Work, slay πŸ’…

✨ OPTIONS ✨

  • -h, --help β€” display the help message. your lil safety net 🫢
  • --version β€” display version information. for when you need to know the lore.

🌸 Output Options: 🌸

  • -o, --out-path OUTPUT_FILE β€” path to the resulting file. if you omit it, the result is printed to stdout in FastQ format. valid filetypes are: .sam[.*], .raw[.*], .frn[.*], .fq[.*], .fna[.*], .ffn[.*], .fastq[.*], .fasta[.*], .fas[.*], .faa[.*], .fa[.*], and .bam, where * is any of the following extensions: gz, bz2, and bgzf for transparent (de)compression. (yes, the embl one is missing here, that's just how it is, don't come for me πŸ™ˆ)
  • -rc, --revcomp β€” reverse-complement output. flip the whole vibe, iconic.
  • -l, --max-length INTEGER β€” maximal number of sequence characters to write out. like a lil trim, but for characters.

πŸ’œ Filter Options: πŸ’œ

  • -s, --sequence List of INTEGER's β€” select the given sequence for extraction by 0-based index.
  • -sn, --sequence-name List of STRING's β€” select sequence with name prefix being NAME.
  • -ss, --sequences List of STRING's β€” select sequences from-to where from and to are 0-based indices.
  • -i, --infix List of STRING's β€” select characters from-to where from and to are 0-based indices.
  • -ll, --line-length INTEGER β€” set line length in output file. see the Line Length section for the deets. in range [-1..inf].

🧚 LINE LENGTH 🧚

okay so you can use the setting --line-length for setting the resulting line length. by default, sequences in FASTA files are written with at most 70 characters per line, and sequences in FASTQ files are written without any line breaks (chaotic but valid). the quality sequence in a FASTQ file is written in the same way as the residue sequence.

the default is selected with a --line-length value of -1, and line breaks can be disabled with a value of 0.

so like: -1 = the default behavior, 0 = no line breaks at all. remember that πŸ’–

⭐ USAGE EXAMPLES ⭐

  • sak -s 10 IN.fa β€” cut out the 11th sequence from IN.fa and write it to stdout as FASTA. (yes, 10 is 0-based so it's the 11th. the math is mathing.)
  • sak -ss 10-12 -ss 100-200 IN.fq β€” cut out the 11th up to and including the 12th, and the 101th up to and including the 199th sequence from IN.fq and write to stdout as FASTA.
sak -s 10 IN.fa
sak -ss 10-12 -ss 100-200 IN.fq

ngl, those index ranges are lowkey a lot, but the from-to inclusivity is right there in the text, so trust it fr fr 😭

and that's the whole page, bestie!! this was sak 0.4.12 from the tarball distribution, and the page itself is dated SAK(1). go slice something, you absolute main character πŸŽ€πŸ’…βœ¨

πŸ“¦ where this page comes from