| 1 |
.\" PatMaN DNA pattern matcher |
| 2 |
.\" (C) 2007 Kay Pruefer, Udo Stenzel |
| 3 |
.\" |
| 4 |
.\" This program is free software; you can redistribute it and/or modify |
| 5 |
.\" it under the terms of the GNU General Public License as published by |
| 6 |
.\" the Free Software Foundation; either version 2 of the License, or (at |
| 7 |
.\" your option) any later version. See the LICENSE file for details. |
| 8 |
|
| 9 |
.\" Process this file with |
| 10 |
.\" groff -man -Tascii patman.1 |
| 11 |
.\" |
| 12 |
.TH PATMAN 1 "JANUARY 2008" Applications "User Manuals" |
| 13 |
.SH NAME |
| 14 |
PatMaN \- search for approximate patterns in DNA libraries |
| 15 |
.SH SYNOPSIS |
| 16 |
.B patman [ |
| 17 |
.I option |
| 18 |
.B | |
| 19 |
.I file |
| 20 |
.B ... ] |
| 21 |
.SH DESCRIPTION |
| 22 |
.B PatMaN |
| 23 |
searches for (small) |
| 24 |
.I patterns |
| 25 |
in (huge) DNA |
| 26 |
.IR databases , |
| 27 |
allowing for some mismatches and optionally gaps. |
| 28 |
.I Patterns |
| 29 |
and |
| 30 |
.I databases |
| 31 |
are read from one or more |
| 32 |
.BR fasta (5) |
| 33 |
files listed as non-option arguments, depending on whether the |
| 34 |
.I -D |
| 35 |
or |
| 36 |
.I -P |
| 37 |
option last preceeded them, and matched against each other. The output |
| 38 |
of |
| 39 |
.B PatMaN |
| 40 |
is a table containing one line for each match, consisting of |
| 41 |
tab-separated fields: |
| 42 |
.IP \(bu 4 |
| 43 |
name of database sequence, |
| 44 |
.IP \(bu 4 |
| 45 |
name of pattern, |
| 46 |
.IP \(bu 4 |
| 47 |
position of first matched base in database sequence, the sequence's |
| 48 |
beginning has position 1, |
| 49 |
.IP \(bu 4 |
| 50 |
position of last matched base in database sequence, |
| 51 |
.IP \(bu 4 |
| 52 |
strand (+ for literal match, - for reverse complement), |
| 53 |
.IP \(bu 4 |
| 54 |
edit distance (number of mismatches plus number of gaps). |
| 55 |
|
| 56 |
.SH OPTIONS |
| 57 |
.IP "-V, --version" |
| 58 |
Print version number and exit. |
| 59 |
|
| 60 |
.IP "-e num, --edits num" |
| 61 |
Allow up to |
| 62 |
.I num |
| 63 |
mismatches and/or gaps per match. |
| 64 |
|
| 65 |
.IP "-g num, --gaps num" |
| 66 |
Allow up to |
| 67 |
.I num |
| 68 |
gaps per match. Note that gaps count as mismatches, too, so the |
| 69 |
.I -e |
| 70 |
option should always be set at least as high as the |
| 71 |
.I -g |
| 72 |
option. Allowing many gaps can incur a considerable computational cost. |
| 73 |
|
| 74 |
.IP "-D, --databases" |
| 75 |
Treat the following files as |
| 76 |
.IR database . |
| 77 |
Databases must be in |
| 78 |
.BR fasta (5) |
| 79 |
format. Multiple |
| 80 |
.I database |
| 81 |
files, including "-" for standard input, are allowed and are read in |
| 82 |
turn. |
| 83 |
|
| 84 |
.IP "-P, --patterns" |
| 85 |
Treat the following files as |
| 86 |
.IR patterns . |
| 87 |
Pattern files must be in |
| 88 |
.BR fasta (5) |
| 89 |
format. Multiple |
| 90 |
.I pattern |
| 91 |
files, including "-" for standard input, are allowed and are all read before |
| 92 |
touching the |
| 93 |
.I databases. |
| 94 |
|
| 95 |
.IP "-o file, --output file" |
| 96 |
Redirect output to |
| 97 |
.IR file . |
| 98 |
The file name "-" causes output to be written to stdout, which is also |
| 99 |
the default |
| 100 |
|
| 101 |
.IP "-a, --ambicodes" |
| 102 |
Activate the interpretation of ambiguity codes in patterns. This |
| 103 |
results in the expansion of any |
| 104 |
.I pattern |
| 105 |
with ambiguity codes into multiple patterns which can match |
| 106 |
independently. Compare |
| 107 |
.B Unknown Nucleotides |
| 108 |
below. |
| 109 |
|
| 110 |
.IP "-s, --singlestrand" |
| 111 |
Deactivate matching of reverse-complements. Normally, |
| 112 |
.B PatMaN |
| 113 |
will try to match patterns both literally and after |
| 114 |
reverse-complementing them, with this option set, only straight forward |
| 115 |
matches are considered. |
| 116 |
|
| 117 |
.IP "-p num, --prefetch num" |
| 118 |
Causes |
| 119 |
.I num |
| 120 |
pointers to be prefetched in advance. This feature can improve |
| 121 |
performance, if |
| 122 |
.B PatMaN |
| 123 |
has been compiled for a processor architecture that supports |
| 124 |
prefetching. The optimum value for your particular setup has to be |
| 125 |
determined empirically, but the default should be reasonably good. |
| 126 |
|
| 127 |
.IP "-l len, --min-length len" |
| 128 |
Only consider patterns with a length of at least |
| 129 |
.IR len . |
| 130 |
Use this if your |
| 131 |
.I pattern |
| 132 |
collection contains short sequences that you don't want lots of possible |
| 133 |
matches reported for. |
| 134 |
|
| 135 |
.IP "-x num, --chop3 num" |
| 136 |
Cut off |
| 137 |
.I num |
| 138 |
bases from the 3' end of each |
| 139 |
.I pattern. |
| 140 |
Use this for |
| 141 |
.I patterns |
| 142 |
with damaged, edited, etc. 3' ends that should be ignored. The chopped |
| 143 |
bases are neither matched nor included in the reported match regions. |
| 144 |
|
| 145 |
.IP "-X num, --chop5 num" |
| 146 |
Cut off |
| 147 |
.I num |
| 148 |
bases from the 5' end of each |
| 149 |
.I pattern. |
| 150 |
Use this for |
| 151 |
.I patterns |
| 152 |
with damaged, edited, etc. 5' ends that should be ignored. The chopped |
| 153 |
bases are neither matched nor included in the reported match regions. |
| 154 |
|
| 155 |
.IP "-A, --adenine-hack" |
| 156 |
Allow adenine to be ignored in patterns. This is essentially equivalent |
| 157 |
to not counting gaps in the |
| 158 |
.I database, |
| 159 |
as long as it was an A that was gapped. Using |
| 160 |
.I -A |
| 161 |
can be computationally extremely expensive, both in terms of memory and |
| 162 |
time consumed. |
| 163 |
|
| 164 |
.IP "-q, --quiet" |
| 165 |
Suppress warnings (about unrecognized characters in input sequences or |
| 166 |
missing input files). Even without |
| 167 |
.IR -q , |
| 168 |
at most one such warning is given per run. |
| 169 |
|
| 170 |
.IP "-v, --verbose" |
| 171 |
Prints additional progress information to stderr. |
| 172 |
|
| 173 |
.IP "-d flags, --debug flags" |
| 174 |
Sets debugging flags to |
| 175 |
.IR flags . Flags |
| 176 |
may be the logical |
| 177 |
.I OR |
| 178 |
of any of the following values, each of which causes some output to |
| 179 |
appear on |
| 180 |
.IR stderr . |
| 181 |
Some of the values may only work if |
| 182 |
.B PatMaN |
| 183 |
has been compiled in debug mode. The default value is 1. |
| 184 |
|
| 185 |
.IP 1 |
| 186 |
Print warnings. Equivalent to not setting |
| 187 |
.IR -q . |
| 188 |
|
| 189 |
.IP 2 |
| 190 |
Print progress information. Equivalent to setting |
| 191 |
.IR -v . |
| 192 |
|
| 193 |
.IP 4 |
| 194 |
Dump the suffix trie of the |
| 195 |
.IR patterns . |
| 196 |
Only available in debug build. |
| 197 |
|
| 198 |
.IP 8 |
| 199 |
Count number of visited nodes and print that number in each iteration. |
| 200 |
Only available in debug build. |
| 201 |
|
| 202 |
.IP 16 |
| 203 |
Print total number of nodes fetched from memory after completing all |
| 204 |
.IR databases . |
| 205 |
|
| 206 |
.IP 32 |
| 207 |
Output |
| 208 |
.I database |
| 209 |
sequence while it is being matched. |
| 210 |
|
| 211 |
.SH NOTES |
| 212 |
.SS Non-Option Arguments |
| 213 |
Non-option arguments (bare filenames) are either treated as |
| 214 |
.I database |
| 215 |
or |
| 216 |
.I pattern |
| 217 |
files, depending on whether the |
| 218 |
.I -D |
| 219 |
or |
| 220 |
.I -P |
| 221 |
option was the the last that occured before the filename. If neither |
| 222 |
.I -D |
| 223 |
nor |
| 224 |
.I -P |
| 225 |
was given, file names are treated as |
| 226 |
.I pattern |
| 227 |
files. If no |
| 228 |
.I database |
| 229 |
was given, it is instead read from standard input. Standard input can |
| 230 |
be explicitly given as either a |
| 231 |
.I database |
| 232 |
or a |
| 233 |
.I pattern |
| 234 |
file by using the filename "-". A warning is given if standard input is |
| 235 |
selected implicitly as |
| 236 |
.I database, |
| 237 |
an error message is given if no |
| 238 |
.I pattern |
| 239 |
files have been named at all. |
| 240 |
|
| 241 |
|
| 242 |
.SS Gapped Matching |
| 243 |
Allowing gaps often causes overlapping matches of single |
| 244 |
.I patterns |
| 245 |
at almost the same position. |
| 246 |
.B PatMaN |
| 247 |
makes no attempt to filter these redundant matches. Also note that |
| 248 |
allowing many gaps, and especially allowing an arbitrary amount of gaps |
| 249 |
through the |
| 250 |
.I -A |
| 251 |
hack can slow down |
| 252 |
.B PatMaN |
| 253 |
considerably and cause it to produce enormous amounts of output. The |
| 254 |
use of some sorty of post-processor to filter these is highly |
| 255 |
recommended. |
| 256 |
|
| 257 |
.SS Unknown Nucleotides |
| 258 |
Unknown nucleotides are most often encoded by the letter |
| 259 |
.BR N . |
| 260 |
If the |
| 261 |
.I --ambicodes |
| 262 |
option is not given, Ns in patterns are interpreted as unknown |
| 263 |
nucleotides and can never match without penalty. If |
| 264 |
.I --ambicodes |
| 265 |
is given, Ns in |
| 266 |
.I patterns |
| 267 |
are expanded just like the other amibuguity codes, and effectively work |
| 268 |
as wildcards. Unknown nucleotides can still be encoded by an |
| 269 |
.B X |
| 270 |
and will never match anything. The database is treated differently in |
| 271 |
that anything other than |
| 272 |
.IR A ", " C ", " G ", " T " and " U , |
| 273 |
including ambiguity codes, is treated as unknown and can never match |
| 274 |
without penalty. |
| 275 |
|
| 276 |
.SH FILES |
| 277 |
.I /etc/popt |
| 278 |
.RS |
| 279 |
The system wide configuration file for |
| 280 |
.BR popt (3). |
| 281 |
.B PatMaN |
| 282 |
identifies itself as "patman" to popt. |
| 283 |
.RE |
| 284 |
|
| 285 |
.I ~/.popt |
| 286 |
.RS |
| 287 |
Per user configuration file for |
| 288 |
.BR popt (3). |
| 289 |
.RE |
| 290 |
|
| 291 |
.SH BUGS |
| 292 |
None known. |
| 293 |
|
| 294 |
.SH AUTHOR |
| 295 |
Kay Pruefer <[email protected]> |
| 296 |
.br |
| 297 |
Udo Stenzel <[email protected]> |
| 298 |
|
| 299 |
.SH "SEE ALSO" |
| 300 |
.BR popt (3), fasta (5) |
| 301 |
|