| 1 |
.TH LEAFF 1 "January 2016" |
| 2 |
.SH NAME |
| 3 |
leaff \- sequence library utilities and applications |
| 4 |
.SH SYNOPSIS |
| 5 |
.B leaff |
| 6 |
[-f fasta-file] [options] |
| 7 |
.SH DESCRIPTION |
| 8 |
LEAFF (Let's Extract Anything From Fasta) is a utility program for |
| 9 |
working with multi-fasta files. In addition to providing random access |
| 10 |
to the base level, it includes several analysis functions. |
| 11 |
.SH OPTIONS |
| 12 |
SOURCE FILES |
| 13 |
-f file: use sequence in 'file' (-F is also allowed for historical reasons) |
| 14 |
-A file: read actions from 'file' |
| 15 |
|
| 16 |
SOURCE FILE EXAMINATION |
| 17 |
-d: print the number of sequences in the fasta |
| 18 |
-i name: print an index, labelling the source 'name' |
| 19 |
|
| 20 |
OUTPUT OPTIONS |
| 21 |
-6 <#>: insert a newline every 60 letters |
| 22 |
(if the next arg is a number, newlines are inserted every |
| 23 |
n letters, e.g., -6 80. Disable line breaks with -6 0, |
| 24 |
or just don't use -6!) |
| 25 |
-e beg end: Print only the bases from position 'beg' to position 'end' |
| 26 |
(space based, relative to the FORWARD sequence!) If |
| 27 |
beg == end, then the entire sequence is printed. It is an |
| 28 |
error to specify beg > end, or beg > len, or end > len. |
| 29 |
-ends n Print n bases from each end of the sequence. One input |
| 30 |
sequence generates two output sequences, with '_5' or '_3' |
| 31 |
appended to the ID. If 2n >= length of the sequence, the |
| 32 |
sequence itself is printed, no ends are extracted (they |
| 33 |
overlap). |
| 34 |
-C: complement the sequences |
| 35 |
-H: DON'T print the defline |
| 36 |
-h: Use the next word as the defline ("-H -H" will reset to the |
| 37 |
original defline |
| 38 |
-R: reverse the sequences |
| 39 |
-u: uppercase all bases |
| 40 |
|
| 41 |
SEQUENCE SELECTION |
| 42 |
-G n s l: print n randomly generated sequences, 0 < s <= length <= l |
| 43 |
-L s l: print all sequences such that s <= length < l |
| 44 |
-N l h: print all sequences such that l <= % N composition < h |
| 45 |
(NOTE 0.0 <= l < h < 100.0) |
| 46 |
(NOTE that you cannot print sequences with 100% N |
| 47 |
This is a useful bug). |
| 48 |
-q file: print sequences from the seqid list in 'file' |
| 49 |
-r num: print 'num' randomly picked sequences |
| 50 |
-s seqid: print the single sequence 'seqid' |
| 51 |
-S f l: print all the sequences from ID 'f' to 'l' (inclusive) |
| 52 |
-W: print all sequences (do the whole file) |
| 53 |
|
| 54 |
LONGER HELP |
| 55 |
-help analysis |
| 56 |
-help examples |
| 57 |
|
| 58 |
ANALYSIS FUNCTIONS |
| 59 |
--findduplicates a.fasta |
| 60 |
Reports sequences that are present more than once. Output |
| 61 |
is a list of pairs of deflines, separated by a newline. |
| 62 |
|
| 63 |
--mapduplicates a.fasta b.fasta |
| 64 |
Builds a map of IIDs from a.fasta and b.fasta that have |
| 65 |
identical sequences. Format is "IIDa <-> IIDb" |
| 66 |
|
| 67 |
--md5 a.fasta: |
| 68 |
Don't print the sequence, but print the md5 checksum |
| 69 |
(of the entire sequence) followed by the entire defline. |
| 70 |
|
| 71 |
--partition prefix [ n[gmk]bp | n ] a.fasta |
| 72 |
--partitionmap [ n[gmk]bp | n ] a.fasta |
| 73 |
Partition the sequences into roughly equal size pieces of |
| 74 |
size nbp, nkbp, nmbp or ngbp; or into n roughly equal sized |
| 75 |
partitions. Sequences larger that the partition size are |
| 76 |
in a partition by themself. --partitionmap writes a |
| 77 |
description of the partition to stdout; --partiton creates |
| 78 |
a fasta file 'prefix-###.fasta' for each partition. |
| 79 |
Example: -F some.fasta --partition parts 130mbp |
| 80 |
-F some.fasta --partition parts 16 |
| 81 |
|
| 82 |
--segment prefix n a.fasta |
| 83 |
Splits the sequences into n files, prefix-###.fasta. |
| 84 |
Sequences are not reordered; the first n sequences are in |
| 85 |
the first file, the next n in the second file, etc. |
| 86 |
|
| 87 |
--gccontent a.fasta |
| 88 |
Reports the GC content over a sliding window of |
| 89 |
3, 5, 11, 51, 101, 201, 501, 1001, 2001 bp. |
| 90 |
|
| 91 |
--testindex a.fasta |
| 92 |
Test the index of 'file'. If index is up-to-date, leaff |
| 93 |
exits successfully, else, leaff exits with code 1. If an |
| 94 |
index file is supplied, that one is tested, otherwise, the |
| 95 |
default index file name is used. |
| 96 |
|
| 97 |
--dumpblocks a.fasta |
| 98 |
Generates a list of the blocks of N and non-N. Output |
| 99 |
format is 'base seq# beg end len'. 'N 84 483 485 2' means |
| 100 |
that a block of 2 N's starts at space-based position 483 |
| 101 |
in sequence ordinal 84. A '.' is the end of sequence |
| 102 |
marker. |
| 103 |
|
| 104 |
--errors L N C P a.fasta |
| 105 |
For every sequence in the input file, generate new |
| 106 |
sequences including simulated sequencing errors. |
| 107 |
L -- length of the new sequence. If zero, the length |
| 108 |
of the original sequence will be used. |
| 109 |
N -- number of subsequences to generate. If L=0, all |
| 110 |
subsequences will be the same, and you should use |
| 111 |
C instead. |
| 112 |
C -- number of copies to generate. Each of the N |
| 113 |
subsequences will have C copies, each with different |
| 114 |
errors. |
| 115 |
P -- probability of an error. |
| 116 |
|
| 117 |
HINT: to simulate ESTs from genes, use L=500, N=10, C=10 |
| 118 |
-- make C=10 sequencer runs of N=10 EST sequences |
| 119 |
of length 500bp each. |
| 120 |
to simulate mRNA from genes, use L=0, N=10, C=10 |
| 121 |
to simulate reads from genomes, use L=800, N=10, C=1 |
| 122 |
-- of course, N= should be increased to give the |
| 123 |
appropriate depth of coverage |
| 124 |
|
| 125 |
--stats a.fasta |
| 126 |
Reports size statistics; number, N50, sum, largest. |
| 127 |
|
| 128 |
--seqstore out.seqStore |
| 129 |
Converts the input file (-f) to a seqStore file (for instance, |
| 130 |
for use with the Celera assembler or sim4db). |
| 131 |
.SH NOTES |
| 132 |
Please note that options are ORDER DEPENDENT. Sequences are printed |
| 133 |
whenever a SEQUENCE SELECTION option occurs on the command line. OUTPUT |
| 134 |
OPTIONS are not reset when a sequence is printed. |
| 135 |
.PP |
| 136 |
SEQUENCES are numbered starting at ZERO, not one! |
| 137 |
.SH EXAMPLES |
| 138 |
1. Print the first 10 bases of the fourth sequence in file 'genes': |
| 139 |
.br |
| 140 |
leaff -f genes -e 0 10 -s 3 |
| 141 |
|
| 142 |
2. Print the first 10 bases of the fourth and fifth sequences: |
| 143 |
.br |
| 144 |
leaff -f genes -e 0 10 -s 3 -s 4 |
| 145 |
|
| 146 |
3. Print the fourth and fifth sequences reverse complemented, and the sixth |
| 147 |
sequence forward. The second set of -R -C toggle off reverse-complement: |
| 148 |
.br |
| 149 |
leaff -f genes -R -C -s 3 -s 4 -R -C -s 5 |
| 150 |
|
| 151 |
4. Convert file 'genes' to a seqStore 'genes.seqStore'. |
| 152 |
.br |
| 153 |
leaff -f genes --seqstore genes.seqStore |
| 154 |
.SH SEE ALSO |
| 155 |
README.leaff |
| 156 |
.br |
| 157 |
http://kmer.sourceforge.net/wiki/index.php/LEAFF_User%27s_Guide |
| 158 |
.br |
| 159 |
http://kmer.sourceforge.net/wiki/index.php/LEAFF_Programming_Example |