LEAFF(1)
π¦ NAME π¦
okay so, bestie, meet leaff β sequence library utilities and applications π. This is the LEAFF(1) page from the General Commands Manual, and we're gonna read it together like it's a group chat, no cap β¨.
πΈ SYNOPSIS πΈ
leaff [-f fasta-file] [options]
β¨ DESCRIPTION β¨
LEAFF stands for Let's Extract Anything From Fasta (yes, the name is literally iconic π
) and it's a utility program for working with multi-fasta files. Not only does it give you random access to the base level, it also comes with a whole little friend group of analysis functions π«Ά. It's giving swiss army knife. It's giving main character energy π₯.
π OPTIONS π
π SOURCE FILES
-ffile β use the sequence in file. (-Fis also allowed, for historical reasons, so if you see-Fdon't panic, it's the same vibe π)-Afile β read actions from file
π§ SOURCE FILE EXAMINATION
-dβ print the number of sequences in the fasta-iname β print an index, labelling the source name
π OUTPUT OPTIONS
-6<#>β insert a newline every 60 letters. If the next arg is a number, newlines are inserted every n letters, e.g.,-6 80. Disable line breaks with-6 0, or just don't use-6at all, queen π-ebeg end β Print only the bases from position beg to position end (space based, relative to the FORWARD sequence!). If beg == end, then the entire sequence is printed. It is an error to specify beg > end, or beg > len, or end > len β so pls don't, it will simply not slay π-endsn β Print n bases from each end of the sequence. One input sequence generates two output sequences, with_5or_3appended to the ID. If2n>= length of the sequence, the sequence itself is printed, no ends are extracted (they overlap) π«-Cβ complement the sequences-Hβ DON'T print the defline-hβ Use the next word as the defline (-H -Hwill reset to the original defline)-Rβ reverse the sequences-uβ uppercase all bases
π SEQUENCE SELECTION
-Gn s l β print n randomly generated sequences,0 < s <= length <= l-Ls l β print all sequences such thats <= length < l-Nl h β print all sequences such thatl <= % N composition < h- (NOTE
0.0 <= l < h < 100.0) - (NOTE that you cannot print sequences with 100% N. This is a useful bug ππ)
- (NOTE
-qfile β print sequences from the seqid list in file-rnum β print num randomly picked sequences-sseqid β print the single sequence seqid-Sf l β print all the sequences from ID f to l (inclusive)-Wβ print all sequences (do the whole file)
π LONGER HELP
-help analysis-help examples
π ANALYSIS FUNCTIONS
--findduplicatesa.fasta β Reports sequences that are present more than once. Output is a list of pairs of deflines, separated by a newline.--mapduplicatesa.fasta b.fasta β Builds a map of IIDs from a.fasta and b.fasta that have identical sequences. Format is"IIDa <-> IIDb"--md5a.fasta β Don't print the sequence, but print the md5 checksum (of the entire sequence) followed by the entire defline.--partitionprefix[ n[gmk]bp | n ]a.fasta--partitionmap[ n[gmk]bp | n ]a.fasta
Partition the sequences into roughly equal size pieces of size nbp, nkbp, nmbp or ngbp; or into n roughly equal sized partitions. Sequences larger that the partition size are in a partition by themself. --partitionmap writes a description of the partition to stdout; --partiton creates a fasta file prefix-###.fasta for each partition.
Example:
-F some.fasta --partition parts 130mbp
-F some.fasta --partition parts 16
--segmentprefix n a.fasta β Splits the sequences into n files,prefix-###.fasta. Sequences are not reordered; the first n sequences are in the first file, the next n in the second file, etc.--gccontenta.fasta β Reports the GC content over a sliding window of3, 5, 11, 51, 101, 201, 501, 1001, 2001bp.--testindexa.fasta β Test the index of file. If the index is up-to-date, leaff exits successfully, else, leaff exits with code1. If an index file is supplied, that one is tested, otherwise, the default index file name is used.--dumpblocksa.fasta β Generates a list of the blocks of N and non-N. Output format is'base seq# beg end len'.'N 84 483 485 2'means that a block of 2 N's starts at space-based position483in sequence ordinal84. A.is the end of sequence marker.--errorsL N C P a.fasta β For every sequence in the input file, generate new sequences including simulated sequencing errors.- L β length of the new sequence. If zero, the length of the original sequence will be used.
- N β number of subsequences to generate. If
L=0, all subsequences will be the same, and you should use C instead. - C β number of copies to generate. Each of the N subsequences will have C copies, each with different errors.
- P β probability of an error.
HINT: to simulate ESTs from genes, use L=500, N=10, C=10
- make
C=10sequencer runs ofN=10EST sequences of length500bpeach.
to simulate mRNA from genes, use L=0, N=10, C=10
to simulate reads from genomes, use L=800, N=10, C=1
- of course,
N=should be increased to give the appropriate depth of coverage
--statsa.fasta β Reports size statistics; number, N50, sum, largest.--seqstoreout.seqStore β Converts the input file (-f) to a seqStore file (for instance, for use with the Celera assembler or sim4db).
π NOTES π
Please note that options are ORDER DEPENDENT. Sequences are printed whenever a SEQUENCE SELECTION option occurs on the command line. OUTPUT OPTIONS are not reset when a sequence is printed.
And the one that gets everybody: SEQUENCES are numbered starting at ZERO, not one! fr fr, zero. not one. zero π«
π EXAMPLES π
- Print the first 10 bases of the fourth sequence in file
genes:
leaff -f genes -e 0 10 -s 3
- Print the first 10 bases of the fourth and fifth sequences:
leaff -f genes -e 0 10 -s 3 -s 4
- Print the fourth and fifth sequences reverse complemented, and the sixth sequence forward. The second set of
-R -Ctoggle off reverse-complement:
leaff -f genes -R -C -s 3 -s 4 -R -C -s 5
- Convert file
genesto a seqStoregenes.seqStore:
leaff -f genes --seqstore genes.seqStore
π SEE ALSO π
README.leaffhttp://kmer.sourceforge.net/wiki/index.php/LEAFF_User%27s_Guidehttp://kmer.sourceforge.net/wiki/index.php/LEAFF_Programming_Example
and that's the whole page, bestie π this was the LEAFF(1) manual from January 2016 β go extract literally anything from fasta, you got this π
β¨
π¦ where this page comes from
- debian bookworm: leaff 0~20150903+r2013-8+b3 Β· GPL-2.0-or-later
- debian trixie: leaff 0~20150903+r2013-9+b1 Β· GPL-2.0-or-later
- ubuntu jammy: leaff 0~20150903+r2013-8build2 Β· GPL-2.0-or-later
- ubuntu noble: leaff 0~20150903+r2013-8build4 Β· GPL-2.0-or-later
- ubuntu questing: leaff 0~20150903+r2013-9build1
- ubuntu resolute: leaff 0~20150903+r2013-10build1 Β· GPL-2.0-or-later
- ubuntu stonking: leaff 0~20150903+r2013-10build1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms