File: lastal.html

package info (click to toggle)
last-align 963-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,380 kB
  • sloc: cpp: 41,136; python: 2,744; ansic: 1,240; makefile: 383; sh: 255
file content (961 lines) | stat: -rw-r--r-- 36,772 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.6: http://docutils.sourceforge.net/" />
<title>lastal</title>
<style type="text/css">

/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 5951 2009-05-18 18:03:10Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.

See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/

/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
  border: 0 }

table.borderless td, table.borderless th {
  /* Override padding for "table.docutils td" with "! important".
     The right padding separates the table cells. */
  padding: 0 0.5em 0 0 ! important }

.first {
  /* Override more specific margin styles with "! important". */
  margin-top: 0 ! important }

.last, .with-subtitle {
  margin-bottom: 0 ! important }

.hidden {
  display: none }

a.toc-backref {
  text-decoration: none ;
  color: black }

blockquote.epigraph {
  margin: 2em 5em ; }

dl.docutils dd {
  margin-bottom: 0.5em }

/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
  font-weight: bold }
*/

div.abstract {
  margin: 2em 5em }

div.abstract p.topic-title {
  font-weight: bold ;
  text-align: center }

div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
  margin: 2em ;
  border: medium outset ;
  padding: 1em }

div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
  font-weight: bold ;
  font-family: sans-serif }

div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title {
  color: red ;
  font-weight: bold ;
  font-family: sans-serif }

/* Uncomment (and remove this text!) to get reduced vertical space in
   compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
  margin-bottom: 0.5em }

div.compound .compound-last, div.compound .compound-middle {
  margin-top: 0.5em }
*/

div.dedication {
  margin: 2em 5em ;
  text-align: center ;
  font-style: italic }

div.dedication p.topic-title {
  font-weight: bold ;
  font-style: normal }

div.figure {
  margin-left: 2em ;
  margin-right: 2em }

div.footer, div.header {
  clear: both;
  font-size: smaller }

div.line-block {
  display: block ;
  margin-top: 1em ;
  margin-bottom: 1em }

div.line-block div.line-block {
  margin-top: 0 ;
  margin-bottom: 0 ;
  margin-left: 1.5em }

div.sidebar {
  margin: 0 0 0.5em 1em ;
  border: medium outset ;
  padding: 1em ;
  background-color: #ffffee ;
  width: 40% ;
  float: right ;
  clear: right }

div.sidebar p.rubric {
  font-family: sans-serif ;
  font-size: medium }

div.system-messages {
  margin: 5em }

div.system-messages h1 {
  color: red }

div.system-message {
  border: medium outset ;
  padding: 1em }

div.system-message p.system-message-title {
  color: red ;
  font-weight: bold }

div.topic {
  margin: 2em }

h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
  margin-top: 0.4em }

h1.title {
  text-align: center }

h2.subtitle {
  text-align: center }

hr.docutils {
  width: 75% }

img.align-left, .figure.align-left{
  clear: left ;
  float: left ;
  margin-right: 1em }

img.align-right, .figure.align-right {
  clear: right ;
  float: right ;
  margin-left: 1em }

.align-left {
  text-align: left }

.align-center {
  clear: both ;
  text-align: center }

.align-right {
  text-align: right }

/* reset inner alignment in figures */
div.align-right {
  text-align: left }

/* div.align-center * { */
/*   text-align: left } */

ol.simple, ul.simple {
  margin-bottom: 1em }

ol.arabic {
  list-style: decimal }

ol.loweralpha {
  list-style: lower-alpha }

ol.upperalpha {
  list-style: upper-alpha }

ol.lowerroman {
  list-style: lower-roman }

ol.upperroman {
  list-style: upper-roman }

p.attribution {
  text-align: right ;
  margin-left: 50% }

p.caption {
  font-style: italic }

p.credits {
  font-style: italic ;
  font-size: smaller }

p.label {
  white-space: nowrap }

p.rubric {
  font-weight: bold ;
  font-size: larger ;
  color: maroon ;
  text-align: center }

p.sidebar-title {
  font-family: sans-serif ;
  font-weight: bold ;
  font-size: larger }

p.sidebar-subtitle {
  font-family: sans-serif ;
  font-weight: bold }

p.topic-title {
  font-weight: bold }

pre.address {
  margin-bottom: 0 ;
  margin-top: 0 ;
  font: inherit }

pre.literal-block, pre.doctest-block {
  margin-left: 2em ;
  margin-right: 2em }

span.classifier {
  font-family: sans-serif ;
  font-style: oblique }

span.classifier-delimiter {
  font-family: sans-serif ;
  font-weight: bold }

span.interpreted {
  font-family: sans-serif }

span.option {
  white-space: nowrap }

span.pre {
  white-space: pre }

span.problematic {
  color: red }

span.section-subtitle {
  /* font-size relative to parent (h1..h6 element) */
  font-size: 80% }

table.citation {
  border-left: solid 1px gray;
  margin-left: 1px }

table.docinfo {
  margin: 2em 4em }

table.docutils {
  margin-top: 0.5em ;
  margin-bottom: 0.5em }

table.footnote {
  border-left: solid 1px black;
  margin-left: 1px }

table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
  padding-left: 0.5em ;
  padding-right: 0.5em ;
  vertical-align: top }

table.docutils th.field-name, table.docinfo th.docinfo-name {
  font-weight: bold ;
  text-align: left ;
  white-space: nowrap ;
  padding-left: 0 }

h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
  font-size: 100% }

ul.auto-toc {
  list-style-type: none }

</style>
<style type="text/css">

/* Style sheet for LAST HTML documents */
h1 { color: navy }
h2 { color: teal }
div.document { margin-left: auto; margin-right: auto; max-width: 45em }
strong { color: red }
.option-list td { padding-bottom: 1em }
table.field-list { border: thin solid green }

</style>
</head>
<body>
<div class="document" id="lastal">
<h1 class="title">lastal</h1>

<p>This program finds local alignments between query sequences, and
reference sequences that have been prepared using lastdb.  You can use
it like this:</p>
<pre class="literal-block">
lastdb humanDb humanChromosome*.fasta
lastal humanDb dna*.fasta &gt; myalns.maf
</pre>
<p>The lastdb command reads files called <tt class="docutils literal"><span class="pre">humanChromosome*.fasta</span></tt> and
writes several files whose names begin with <tt class="docutils literal">humanDb</tt>.  The lastal
command reads files called <tt class="docutils literal"><span class="pre">dna*.fasta</span></tt>, compares them to
<tt class="docutils literal">humanDb</tt>, and writes alignments to a file called <tt class="docutils literal">myalns.maf</tt>.</p>
<p>You can use gzip (.gz) compressed query files.  You can also pipe
query sequences into lastal, for example:</p>
<pre class="literal-block">
bzcat seqs.fasta.bz2 | lastal humanDb &gt; myalns.maf
</pre>
<div class="section" id="steps-in-lastal">
<h2>Steps in lastal</h2>
<ol class="arabic">
<li><p class="first">Find initial matches.  For each possible start position in the
query: find the shortest match with length ≥ l that <em>either</em> occurs
≤ m times in the reference, <em>or</em> has length L.</p>
</li>
<li><p class="first">Extend a gapless alignment from each initial match, and keep those
with score ≥ d.</p>
</li>
<li><p class="first">Define cores: find the longest run of identical matches in each
gapless alignment.</p>
</li>
<li><p class="first">Extend a gapped alignment from either side of each core, and keep
those with score ≥ e.</p>
</li>
<li><p class="first">Non-redundantize the alignments: if several alignments share an
endpoint (same coordinates in both sequences), remove all but one
highest-scoring one.</p>
</li>
<li><p class="first">Estimate the ambiguity of each aligned column (OFF by default).</p>
</li>
<li><p class="first">Redo the alignments to minimize column ambiguity, using either
gamma-centroid or LAMA (OFF by default).</p>
</li>
</ol>
</div>
<div class="section" id="options">
<h2>Options</h2>
<div class="section" id="cosmetic-options">
<h3>Cosmetic options</h3>
<blockquote>
<table class="docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group">
<kbd><span class="option">-h</span>, <span class="option">--help</span></kbd></td>
<td>Show all options and their default settings, and exit.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-V</span>, <span class="option">--version</span></kbd></td>
<td>Show version information, and exit.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-v</span></kbd></td>
<td>Be verbose: write messages about what lastal is doing.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-f <var>NAME</var></span></kbd></td>
<td><p class="first">Choose the output format.  The NAME is not case-sensitive.</p>
<p><strong>MAF</strong> format looks like this:</p>
<pre class="literal-block">
a score=15 EG2=4.7e+04 E=2.6e-05
s chr3 9 23 + 939557 TTTGGGAGTTGAAGTTTTCGCCC
s seqA 2 21 +     25 TTTGGGAGTTGAAGGTT--GCCC
</pre>
<p>Lines starting with &quot;s&quot; contain: the sequence name, the start
coordinate of the alignment, the number of sequence letters
spanned by the alignment, the strand, the sequence length, and
the aligned letters.  The start coordinates are zero-based.  If
the strand is &quot;-&quot;, the start coordinate is in the reverse
strand.</p>
<p>The same alignment in <strong>TAB</strong> format looks like this:</p>
<pre class="literal-block">
15 chr3 9 23 + 939557 seqA 2 21 + 25 17,2:0,4 EG2=4.7e+04 E=2.6e-05
</pre>
<p>The &quot;17,2:0,4&quot; shows the sizes and offsets of gapless blocks in
the alignment.  In this case, we have a block of size 17, then
an offset of size 2 in the upper sequence and 0 in the lower
sequence, then a block of size 4.</p>
<p>The same alignment in <strong>BlastTab</strong> format looks like this:</p>
<pre class="literal-block">
seqA chr3 86.96 23 1 1 3 23 10 32 2.6e-05 44.3
</pre>
<p>The fields are: query name, reference name, percent identity,
alignment length, mismatches, gap opens, query start, query end,
reference start, reference end, E-value, bit score.  The start
coordinates are one-based.  <em>Warning:</em> this is a lossy format,
because it does not show gap positions.  <em>Warning:</em> the other
LAST programs cannot read this format.  <em>Warning:</em> <a class="reference external" href="last-evalues.html">&quot;bit score&quot;
is not the same as &quot;score&quot;</a>.</p>
<p><strong>BlastTab+</strong> format is the same as BlastTab, with 3 extra
columns at the end: length of query sequence, length of
reference sequence, and (raw) score.  More columns might be
added in future.</p>
<p class="last">For backwards compatibility, a NAME of 0 means TAB and 1 means
MAF.</p>
</td></tr>
</tbody>
</table>
</blockquote>
</div>
<div class="section" id="e-value-options">
<h3>E-value options</h3>
<blockquote>
<table class="docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group">
<kbd><span class="option">-D <var>LENGTH</var></span></kbd></td>
<td>Report alignments that are expected by chance at most once per
LENGTH query letters.  This option only affects the default
value of -E, so if you specify -E then -D has no effect.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-E <var>THRESHOLD</var></span></kbd></td>
<td>Maximum EG2 (<a class="reference external" href="last-evalues.html">expected alignments per square giga</a>).  This option only affects the default
value of -e, so if you specify -e then -E has no effect.</td></tr>
</tbody>
</table>
</blockquote>
</div>
<div class="section" id="score-options">
<h3>Score options</h3>
<blockquote>
<table class="docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group">
<kbd><span class="option">-r <var>SCORE</var></span></kbd></td>
<td>Match score.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-q <var>COST</var></span></kbd></td>
<td>Mismatch cost.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-p <var>NAME</var></span></kbd></td>
<td><p class="first">Specify a match/mismatch score matrix.  Options -r and -q will
be ignored.  The built-in matrices are described in
<a class="reference external" href="last-matrices.html">last-matrices.html</a>.</p>
<p>Any other NAME is assumed to be a file name.  For an example of
the format, see the matrix files in the data directory.
Asymmetric scores are allowed: query letters correspond to
columns and reference letters correspond to rows.</p>
<p>Any letters that aren't in the matrix get default match/mismatch
scores.  For doubly- and triply-ambiguous bases (such as &quot;W&quot;
meaning A or T), these default scores are derived from the ACGT
scores, and are shown in the header of lastal's output.  Any
other letters get the lowest score in the matrix when aligned to
anything.</p>
<p class="last">Other options can be specified on lines starting with &quot;#last&quot;,
but command line options override them.</p>
</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-a <var>COST</var></span></kbd></td>
<td>Gap existence cost.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-b <var>COST</var></span></kbd></td>
<td>Gap extension cost.  A gap of size k costs: a + (b × k).</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-A <var>COST</var></span></kbd></td>
<td>Insertion existence cost.  This refers to insertions in the
query relative to the reference.  If -A is not used, the
insertion existence cost will equal the deletion existence cost,
which is set by -a.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-B <var>COST</var></span></kbd></td>
<td>Insertion extension cost.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-c <var>COST</var></span></kbd></td>
<td>This option allows use of &quot;generalized affine gap costs&quot; (SF
Altschul 1998, Proteins 32(1):88-96).  Here, a &quot;gap&quot; may consist
of unaligned regions of both sequences.  If these unaligned
regions have sizes j and k, where j ≤ k, the cost is: a +
b⋅(k-j) + c⋅j.  If c ≥ a + 2b (the default), it reduces to
standard affine gaps.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-F <var>COST</var></span></kbd></td>
<td><p class="first">Align DNA queries to protein reference sequences, using the
specified frameshift cost.  A value of 15 seems to be
reasonable.  (As a special case, -F0 means DNA-versus-protein
alignment without frameshifts, which is faster.)  The output
looks like this:</p>
<pre class="literal-block">
a score=108
s prot 2  40 + 649 FLLQAVKLQDP-STPHQIVPSP-VSDLIATHTLCPRMKYQDD
s dna  8 117 + 999 FFLQ-IKLWDP\STPH*IVSSP/PSDLISAHTLCPRMKSQDN
</pre>
<p>The <tt class="docutils literal">\</tt> indicates a forward shift by one nucleotide, and the
<tt class="docutils literal">/</tt> indicates a reverse shift by one nucleotide.  The <tt class="docutils literal">*</tt>
indicates a stop codon.  The same alignment in tabular format
looks like this:</p>
<pre class="literal-block">
108 prot 2 40 + 649 dna 8 117 + 999 4,1:0,6,0:1,10,0:-1,19
</pre>
<p class="last">The &quot;-1&quot; indicates the reverse frameshift.</p>
</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-z <var>DROP</var></span></kbd></td>
<td><p class="first">Maximum score drop for gapped alignments.  Gapped alignments are
forbidden from having any internal region with score &lt; -DROP.
The default value is e-1, which arguably produces the best
alignments.  Lower values improve speed, by quitting unpromising
extensions sooner.  You can specify this parameter in 3 ways:</p>
<ul class="last">
<li><p class="first">A score (e.g. -z20).</p>
</li>
<li><p class="first">A percentage.  For example, -z50% specifies 50% of the default
value (rounded down to the nearest integer).</p>
</li>
<li><p class="first">A maximum gap length.  For example, -z8g sets the maximum
score drop to: min[a+8b, A+8B].  However, this never increases
the value above the default.</p>
</li>
</ul>
</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-x <var>DROP</var></span></kbd></td>
<td>This option makes lastal extend gapped alignments twice.  First,
it extends gapped alignments with a maximum score drop of x, and
discards those with score &lt; e.  The surviving alignments are
redone with a (presumably higher) maximum score drop of z.  This
aims to improve speed with minimal effect on the final
alignments.  You can specify -x in the same ways as -z (with the
default value of x being z).</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-y <var>DROP</var></span></kbd></td>
<td>Maximum score drop for gapless alignments.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-d <var>SCORE</var></span></kbd></td>
<td>Minimum score for gapless alignments.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-e <var>SCORE</var></span></kbd></td>
<td>Minimum alignment score.  (If you do gapless alignment with
option -j1, then -d and -e mean the same thing.  If you set
both, -e will prevail.)</td></tr>
</tbody>
</table>
</blockquote>
</div>
<div class="section" id="initial-match-options">
<h3>Initial-match options</h3>
<blockquote>
<table class="docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group">
<kbd><span class="option">-m <var>MULTIPLICITY</var></span></kbd></td>
<td><p class="first">Maximum multiplicity for initial matches.  Each initial match is
lengthened until it occurs at most this many times in the
reference.</p>
<p class="last">If the reference was split into volumes by lastdb, then lastal
uses one volume at a time.  The maximum multiplicity then
applies to each volume, not the whole reference.  This is why
voluming changes the results.</p>
</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-l <var>LENGTH</var></span></kbd></td>
<td>Minimum length for initial matches.  Length means the number of
letters spanned by the match.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-L <var>LENGTH</var></span></kbd></td>
<td>Maximum length for initial matches.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-k <var>STEP</var></span></kbd></td>
<td>Look for initial matches starting only at every STEP-th position
in each query (positions 0, STEP, 2×STEP, etc).  This makes
lastal faster but less sensitive.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-W <var>SIZE</var></span></kbd></td>
<td>Look for initial matches starting only at query positions that
are &quot;minimum&quot; in any window of SIZE consecutive positions (see
<a class="reference external" href="lastdb.html">lastdb.html</a>).  By default, this parameter takes the same
value as was used for lastdb -W.</td></tr>
</tbody>
</table>
</blockquote>
</div>
<div class="section" id="miscellaneous-options">
<h3>Miscellaneous options</h3>
<blockquote>
<table class="docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group">
<kbd><span class="option">-s <var>STRAND</var></span></kbd></td>
<td>Specify which query strand should be used: 0 means reverse only,
1 means forward only, and 2 means both.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-S <var>NUMBER</var></span></kbd></td>
<td>Specify how to use the substitution score matrix for reverse
strands.  This matters only for unusual matrices that lack
strand symmetry (e.g. if the a:g score differs from the t:c
score).  &quot;0&quot; means that the matrix is used as-is for all
alignments.  &quot;1&quot; means that the matrix is used as-is for
alignments of query sequence forward strands, and the
complemented matrix is used for query sequence reverse strands.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-K <var>LIMIT</var></span></kbd></td>
<td>Omit any alignment whose query range lies in LIMIT or more other
alignments with higher score (and on the same strand).  This is
a useful way to get just the top few hits to each part of each
query (P Berman et al. 2000, J Comput Biol 7:293-302).</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-C <var>LIMIT</var></span></kbd></td>
<td>Before extending gapped alignments, discard any gapless
alignment whose query range lies in LIMIT or more others (for
the same strand and volume) with higher score-per-length.  This
can reduce run time and output size (MC Frith &amp; R Kawaguchi
2015, Genome Biol 16:106).</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-P <var>THREADS</var></span></kbd></td>
<td>Divide the work between this number of threads running in
parallel.  0 means use as many threads as your computer claims
it can handle simultaneously.  Single query sequences are not
divided between threads, so you need multiple queries per batch
for this option to take effect.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-i <var>BYTES</var></span></kbd></td>
<td><p class="first">Search queries in batches of at most this many bytes.  If a
single sequence exceeds this amount, however, it is not split.
You can use suffixes K, M, and G to specify KibiBytes,
MebiBytes, and GibiBytes.  This option has no effect on the
results (apart from their order).</p>
<p class="last">If the reference was split into volumes by lastdb, then each
volume will be read into memory once per query batch.</p>
</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-M</span></kbd></td>
<td><p class="first">Find minimum-difference alignments, which is faster but cruder.
This treats all matches the same, and minimizes the number of
differences (mismatches plus gaps).</p>
<ul class="last">
<li><p class="first">Any substitution score matrix will be ignored.  The
substitution scores are set by the match score (r) and the
mismatch cost (q).</p>
</li>
<li><p class="first">The gap cost parameters will be ignored.  The gap existence
cost will be 0 and the gap extension cost will be q + r/2.</p>
</li>
<li><p class="first">The match score (r) must be an even number.</p>
</li>
<li><p class="first">Any sequence quality data (e.g. fastq) will be ignored.</p>
</li>
</ul>
</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-T <var>NUMBER</var></span></kbd></td>
<td><p class="first">Type of alignment: 0 means &quot;local alignment&quot; and 1 means
&quot;overlap alignment&quot;.  Local alignments can end anywhere in the
middle or at the ends of the sequences.  Overlap alignments must
extend to the left until they hit the end of a sequence (either
query or reference), and to the right until they hit the end of
a sequence.</p>
<p class="last"><strong>Warning:</strong> it's often a bad idea to use -T1.  This setting
does not change the maximum score drop allowed inside
alignments, so if an alignment cannot be extended to the end of
a sequence without exceeding this drop, it will be discarded.</p>
</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-n <var>COUNT</var></span></kbd></td>
<td>Maximum number of gapless alignments per query position.  When
lastal extends gapless alignments from initial matches that
start at one query position, if it gets COUNT successful
extensions, it skips any remaining initial matches starting at
that position.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-N <var>COUNT</var></span></kbd></td>
<td>Stop after finding COUNT alignments per query strand.  This
makes lastal faster: it quits gapless and gapped extensions as
soon as it finds COUNT alignments with score ≥ e.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-R <var>DIGITS</var></span></kbd></td>
<td><p class="first">Specify lowercase-marking of repeats, by two digits (e.g. &quot;-R 01&quot;),
with the following meanings.</p>
<p>First digit:</p>
<ol class="arabic" start="0">
<li><p class="first">Convert the input sequences to uppercase while reading them.</p>
</li>
<li><p class="first">Keep any lowercase in the input sequences.</p>
</li>
</ol>
<p>Second digit:</p>
<ol class="arabic" start="0">
<li><p class="first">Do not check for simple repeats.</p>
</li>
<li><p class="first">Convert simple repeats (e.g. cacacacacacacacac) to lowercase.</p>
</li>
<li><p class="first">Convert simple repeats, within AT-rich DNA, to lowercase.</p>
</li>
</ol>
<p class="last">Details: Tantan is applied separately to forward and reverse
strands.  For DNA-versus-protein alignment (option -F), it is
applied to the DNA after translation, at the protein level.</p>
</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-u <var>NUMBER</var></span></kbd></td>
<td><p class="first">Specify treatment of lowercase letters when extending
alignments:</p>
<ol class="arabic" start="0">
<li><p class="first">Mask them for neither gapless nor gapped extensions.</p>
</li>
<li><p class="first">Mask them for gapless but not gapped extensions.</p>
</li>
<li><p class="first">Mask them for gapless but not gapped extensions, and then
discard alignments that lack any segment with score ≥ e when
lowercase is masked.</p>
</li>
<li><p class="first">Mask them for gapless and gapped extensions.</p>
</li>
</ol>
<p>&quot;Mask&quot; means change their match/mismatch scores to min(unmasked
score, 0), a.k.a. <a class="reference external" href="https://doi.org/10.1371/journal.pone.0028819">gentle masking</a>.</p>
<p class="last">This option does not affect treatment of lowercase for initial
matches.</p>
</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-w <var>DISTANCE</var></span></kbd></td>
<td><p class="first">This option is a kludge to avoid catastrophic time and memory
usage when self-comparing a large sequence.  If the sequence
contains a tandem repeat, we may get a gapless alignment that is
slightly offset from the main self-alignment.  In that case, the
gapped extension might &quot;discover&quot; the main self-alignment and
extend over the entire length of the sequence.</p>
<p>To avoid this problem, gapped alignments are not triggered from
any gapless alignment that:</p>
<ul>
<li><p class="first">is contained, in both sequences, in the &quot;core&quot; of another
alignment</p>
</li>
<li><p class="first">has start coordinates offset by DISTANCE or less relative to
this core</p>
</li>
</ul>
<p class="last">Use -w0 to turn this off.</p>
</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-G <var>FILE</var></span></kbd></td>
<td>Use an alternative genetic code in the specified file.  For an
example of the format, see vertebrateMito.gc in the examples
directory.  By default, the standard genetic code is used.  This
option has no effect unless DNA-versus-protein alignment is
selected with option -F.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-t <var>TEMPERATURE</var></span></kbd></td>
<td>Parameter for converting between scores and likelihood ratios.
This affects the column ambiguity estimates.  A score is
converted to a likelihood ratio by this formula: exp(score /
TEMPERATURE).  The default value is 1/lambda, where lambda is
the scale factor of the scoring matrix, which is calculated by
the method of Yu and Altschul (YK Yu et al. 2003, PNAS
100(26):15688-93).</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-g <var>GAMMA</var></span></kbd></td>
<td><p class="first">This option affects gamma-centroid and LAMA alignment only.</p>
<p>Gamma-centroid alignments minimize the ambiguity of paired
letters.  In fact, this method aligns letters whose column error
probability is less than GAMMA/(GAMMA+1).  When GAMMA is low, it
aligns confidently-paired letters only, so there tend to be many
unaligned letters.  When GAMMA is high, it aligns letters more
liberally.</p>
<p>LAMA (Local Alignment Metric Accuracy) alignments minimize the
ambiguity of columns (both paired letters and gap columns).
When GAMMA is low, this method produces shorter alignments with
more-confident columns, and when GAMMA is high it produces
longer alignments including less-confident columns.</p>
<p>In summary: to get the most accurately paired letters, use
gamma-centroid.  To get accurately placed gaps, use LAMA.</p>
<p class="last">Note that the reported alignment score is that of the ordinary
gapped alignment before realigning with gamma-centroid or LAMA.</p>
</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-j <var>NUMBER</var></span></kbd></td>
<td><p class="first">Output type: 0 means counts of initial matches (of all lengths);
1 means gapless alignments; 2 means gapped alignments before
non-redundantization; 3 means gapped alignments after
non-redundantization; 4 means alignments with ambiguity
estimates; 5 means gamma-centroid alignments; 6 means LAMA
alignments; 7 means alignments with expected counts.</p>
<p>If you use -j0, lastal will count the number of initial matches,
per length, per query sequence.  Options -l and -L will set the
minimum and maximum lengths, and -m will be ignored.  If you
compare a large sequence to itself with -j0, it's wise to set
option -L.</p>
<p>If you use j&gt;3, each alignment will get a &quot;fullScore&quot; (also
known as &quot;forward score&quot; or &quot;sum-of-paths score&quot;).  This is like
the score, but it takes into account alternative alignments.</p>
<p>If you use -j7, lastal will print an extra MAF line starting
with &quot;c&quot; for each alignment.  The first 16 numbers on this line
are the expected counts of matches and mismatches: first the
count of reference As aligned to query As, then the count of
reference As aligned to query Cs, and so on.  For proteins there
will be 400 such numbers.  The final ten numbers are expected
counts related to gaps.  They are:</p>
<ul>
<li><p class="first">The count of matches plus mismatches.  (This may exceed the
total of the preceding numbers, if the sequences have non-ACGT
letters.)</p>
</li>
<li><p class="first">The count of deleted letters.</p>
</li>
<li><p class="first">The count of inserted letters.</p>
</li>
<li><p class="first">The count of delete opens (= count of delete closes).</p>
</li>
<li><p class="first">The count of insert opens (= count of insert closes).</p>
</li>
<li><p class="first">The count of adjacent pairs of insertions and deletions.</p>
</li>
</ul>
<p>The final four numbers are always zero, unless you use
generalized affine gap costs.  They are:</p>
<ul class="last">
<li><p class="first">The count of unaligned letter pairs.</p>
</li>
<li><p class="first">The count of unaligned letter pair opens (= count of closes).</p>
</li>
<li><p class="first">The count of adjacent pairs of deletions and unaligned letter pairs.</p>
</li>
<li><p class="first">The count of adjacent pairs of insertions and unaligned letter pairs.</p>
</li>
</ul>
</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-Q <var>NUMBER</var></span></kbd></td>
<td><p class="first">Specify how to read the query sequences:</p>
<pre class="literal-block">
Default    fasta
   0       fasta or fastq-ignore
   1       fastq-sanger
   2       fastq-solexa
   3       fastq-illumina
   4       prb
   5       PSSM
</pre>
<p><em>Warning</em>: Illumina data is not necessarily in fastq-illumina
format; it is often in fastq-sanger format.</p>
<p>The fastq formats look like this:</p>
<pre class="literal-block">
&#64;mySequenceName
TTTTTTTTGCCTCGGGCCTGAGTTCTTAGCCGCG
+
55555555*&amp;5-/55*5//5(55,5#&amp;$)$)*+$
</pre>
<p>The &quot;+&quot; may be followed by text (ignored).  The symbols below
the &quot;+&quot; are quality codes, one per sequence letter.  The
sequence and quality codes may wrap onto more than one line.</p>
<p>fastq-ignore means that the quality codes are ignored.  For the
other fastq variants, lastal assumes the quality codes indicate
substitution error probabilities, <em>not</em> insertion or deletion
error probabilities.  If this assumption is dubious (e.g. for
data with many insertion or deletion errors), it may be better
to use fastq-ignore.</p>
<p>For fastq-sanger, quality scores are obtained by subtracting 33
from the ASCII values of the quality codes.  For fastq-solexa
and fastq-illumina, they are obtained by subtracting 64.</p>
<p>prb format stores four quality scores (A, C, G, T) per position,
with one sequence per line, like this:</p>
<pre class="literal-block">
-40  40 -40 -40      -12   1 -12  -3      -10  10 -40 -40
</pre>
<p>Since prb does not store sequence names, lastal uses the line
number (starting from 1) as the name.</p>
<p>In fastq-sanger and fastq-illumina format, the quality scores
are related to error probabilities like this: qScore =
-10⋅log10[p].  In fastq-solexa and prb, however, qScore =
-10⋅log10[p/(1-p)].  In lastal's MAF output, the quality scores
are written on lines starting with &quot;q&quot;.  For fastq, they are
written with the same encoding as the input.  For prb, they are
written in the fastq-solexa (ASCII-64) encoding.</p>
<p>Finally, PSSM means &quot;position-specific scoring matrix&quot;.  The
format is:</p>
<pre class="literal-block">
myLovelyPSSM
     A  R  N  D  C  Q  E  G  H  I  L  K  M  F  P  S  T  W  Y  V
1 M -2 -2 -3 -4 -2 -1 -3 -3 -2  1  2 -2  8 -1 -3 -2 -1 -2 -2  0
2 S  0 -2  0  1  3 -1 -1 -1 -2 -3 -3 -1 -2 -3 -2  5  0 -4 -3 -2
3 D -1 -2  0  7 -4 -1  1 -2 -2 -4 -4 -2 -4 -4 -2 -1 -2 -5 -4 -4
</pre>
<p>The sequence appears in the second column, and columns 3 onwards
contain the position-specific scores.  Any letters not specified
by any column will get the lowest score in each row.  This
format is a simplified version of PSI-BLAST's ASCII format: the
non-simplified version is allowed too.</p>
<p class="last"><em>Warning</em>: lastal cannot directly calculate E-values for PSSMs.
The E-values (and the default value of -y) are determined by the
otherwise-unused match and mismatch scores (options -r -q and
-p).  There is evidence these E-values will be accurate if the
PSSM is &quot;constructed to the same scale&quot; as the match/mismatch
scores (SF Altschul et al. 1997, NAR 25(17):3389-402).</p>
</td></tr>
</tbody>
</table>
</blockquote>
</div>
</div>
<div class="section" id="parallel-processes-and-memory-sharing">
<h2>Parallel processes and memory sharing</h2>
<p>If you run several lastal commands (i.e. processes) at the same time
on the same computer, using the same set of reference files prepared
by lastdb, then they will share memory for the reference files.</p>
</div>
<div class="section" id="multiple-volumes">
<h2>Multiple volumes</h2>
<p>If lastdb creates multiple volumes:</p>
<pre class="literal-block">
lastdb hugeDb huge.fasta
</pre>
<p>You can either run lastal on the whole thing:</p>
<pre class="literal-block">
lastal hugeDb queries.fasta &gt; myalns.maf
</pre>
<p>Or on one volume at a time:</p>
<pre class="literal-block">
lastal hugeDb0 queries.fasta &gt; myalns0.maf
lastal hugeDb1 queries.fasta &gt; myalns1.maf
lastal hugeDb2 queries.fasta &gt; myalns2.maf
</pre>
<p>The former method reads the queries in large batches, and aligns each
batch to one volume at a time.  If you run several processes in
parallel, they will not necessarily use the same volume at the same
time.</p>
<p>Therefore, with parallel processes, you should either ensure you have
enough memory to hold several volumes simultaneously, or run lastal on
one volume at a time.  An efficient scheme is to use a different
computer for each volume.</p>
</div>
<div class="section" id="lastal8">
<h2>lastal8</h2>
<p>lastal8 has identical usage to lastal, and is used with <a class="reference external" href="lastdb.html">lastdb8</a>.  lastal cannot read the output of lastdb8, and
lastal8 cannot read the output of lastdb.</p>
</div>
</div>
</body>
</html>