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 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214
|
<html>
<head>
<title>SPAdes 3.9.1 Manual</title>
<style type="text/css">
.code {
background-color: lightgray;
}
</style>
</head>
<body>
<h1>SPAdes 3.9.1 Manual</h1>
1. <a href="#sec1">About SPAdes</a><br>
1.1. <a href="#sec1.1">Supported data types</a><br>
1.2. <a href="#sec1.2">SPAdes pipeline</a><br>
1.3. <a href="#sec1.3">SPAdes performance</a><br>
2. <a href="#sec2">Installation</a><br>
2.1. <a href="#sec2.1">Downloading SPAdes Linux binaries</a><br>
2.2. <a href="#sec2.2">Downloading SPAdes binaries for Mac</a><br>
2.3. <a href="#sec2.3">Downloading and compiling SPAdes source code</a><br>
2.4. <a href="#sec2.4">Verifying your installation</a><br>
3. <a href="#sec3">Running SPAdes</a><br>
3.1. <a href="#sec3.1">SPAdes input</a><br>
3.2. <a href="#sec3.2">SPAdes command line options</a><br>
3.3. <a href="#sec3.3">Assembling IonTorrent reads</a><br>
3.4. <a href="#sec3.4">Assembling long Illumina paired reads (2x150 and 2x250)</a><br>
3.5. <a href="#sec3.5">SPAdes output</a><br>
3.6. <a href="#sec3.6">plasmidSPAdes output</a><br>
3.7. <a href="#sec3.7">Assembly evaluation</a><br>
4. <a href="#sec4">Citation</a><br>
5. <a href="#sec5">Feedback and bug reports</a><br>
<br>
<a name="sec1"></a>
<h2>1. About SPAdes</h2>
<p>
SPAdes – St. Petersburg genome assembler – is intended for both standard isolates and single-cell MDA bacteria assemblies. This manual will help you to install and run SPAdes.
SPAdes version 3.9.1 was released under GPLv2 on December 4, 2016 and can be downloaded from <a href="http://cab.spbu.ru/software/spades/" target="_blank">http://cab.spbu.ru/software/spades/</a>.
<a name="sec1.1"></a>
<h3>1.1 Supported data types</h3>
<p>
The current version of SPAdes works with Illumina or IonTorrent reads and is capable of providing hybrid assemblies using PacBio, Oxford Nanopore and Sanger reads. You can also provide additional contigs that will be used as long reads.
<p>
Version 3.9.1 of SPAdes supports paired-end reads, mate-pairs and unpaired reads. SPAdes can take as input several paired-end and mate-pair libraries simultaneously. Note, that SPAdes was initially designed for small genomes. It was tested on single-cell and standard bacterial and fungal data sets. SPAdes is not intended for larger genomes (e.g. mammalian size genomes). For such purposes you can use it at your own risk.
<p>
SPAdes 3.9.1 includes the following additional pipelines:
<ul>
<li>dipSPAdes – a module for assembling highly polymorphic diploid genomes (see <a href="dipspades_manual.html" target="_blank">dipSPAdes manual</a>).</li>
<li>metaSPAdes – a pipeline for metagenomic data sets (see <a href="#meta">metaSPAdes options</a>). </li>
<li>plasmidSPAdes – a pipeline for extracting and assembling plasmids from WGS data sets (see <a href="#plasmid">plasmidSPAdes options</a>).</li>
<li>rnaSPAdes – a <i>de novo</i> transcriptome assembler from RNA-Seq data (see <a href="rnaspades_manual.html" target="_blank">rnaSPAdes manual</a>).</li>
<li>truSPAdes – a module for TruSeq barcode assembly (see <a href="truspades_manual.html" target="_blank">truSPAdes manual</a>). </li>
</ul>
<a name="sec1.2"></a>
<h3>1.2 SPAdes pipeline</h3>
<p>
SPAdes comes in several separate modules:
<ul>
<li> <a href="http://bioinf.spbau.ru/en/spades/bayeshammer" target="_blank">BayesHammer</a> – read error correction tool for Illumina reads, which works well on both single-cell and standard data sets. </li>
<li> IonHammer – read error correction tool for IonTorrent data, which also works on both types of data. </li>
<li> SPAdes – iterative short-read genome assembly module; values of K are selected automatically based on the read length and data set type. </li>
<li> MismatchCorrector – a tool which improves mismatch and short indel rates in resulting contigs and scaffolds; this module uses the <a href="http://bio-bwa.sourceforge.net" target="_blank">BWA</a> tool [<a href="http://www.ncbi.nlm.nih.gov/pubmed/19451168" target="_blank">Li H. and Durbin R., 2009</a>]; MismatchCorrector is turned off by default, but we recommend to turn it on (see <a href="#correctoropt">SPAdes options section</a>). </li>
</ul>
<p>
We recommend to run SPAdes with BayesHammer/IonHammer to obtain high-quality assemblies. However, if you use your own read correction tool, it is possible to turn error correction module off. It is also possible to use only the read error correction stage, if you wish to use another assembler. See the <a href="#pipelineopt">SPAdes options section</a>.
<a name="sec1.3"></a>
<h3>1.3 SPAdes' performance</h3>
<p>
In this section we give approximate data about SPAdes' performance on two data sets:
<ul>
<li> <a href="http://spades.bioinf.spbau.ru/spades_test_datasets/ecoli_mc/" target="_blank">Standard isolate <i>E. coli</i></a>; 6.2Gb, 28M reads, 2x100bp, insert size ~ 215bp </li>
<li> <a href="http://spades.bioinf.spbau.ru/spades_test_datasets/ecoli_sc/" target="_blank">MDA single-cell <i>E. coli</i></a>; 6.3 Gb, 29M reads, 2x100bp, insert size ~ 270bp </li>
</ul>
<p>
We ran SPAdes with default parameters using 16 threads on a server with Intel Xeon 2.27GHz processors. BayesHammer runs in approximately 30-40 minutes and takes up to 8Gb of RAM to perform read error correction on each data set. Assembly takes about 15 minutes for the <i>E. coli</i> isolate data set and 30 minutes for the <i>E. coli</i> single-cell data set. Both data sets require about 9Gb of RAM (see notes below). MismatchCorrector runs for about 25 minutes on both data sets, and requires less than 2Gb of RAM. All modules also require additional disk space for storing results (corrected reads, contigs, etc) and temporary files. See the table below for more precise values.
<p>
<table border="1" cellpadding="4" cellspacing="0">
<tr>
<td align="right"> Data set </td>
<td colspan="3" align="center"> <i>E. coli</i> isolate </td>
<td colspan="3" align="center"> <i>E. coli</i> single-cell </td>
</tr>
<tr>
<td> Stage </td>
<td align="center" width="110"> Time </td>
<td align="center" width="110"> Peak RAM <br> usage (Gb) </td>
<td align="center" width="110"> Additional <br> disk space (Gb) </td>
<td align="center" width="110"> Time </td>
<td align="center" width="110"> Peak RAM <br> usage (Gb) </td>
<td align="center" width="110"> Additional <br> disk space (Gb) </td>
</tr>
<tr>
<td> BayesHammer </td>
<td align="center"> 34m </td>
<td align="center"> 7.7 </td>
<td align="center"> 8.4 </td>
<td align="center"> 40m </td>
<td align="center"> 7.5 </td>
<td align="center"> 8.8 </td>
</tr>
<tr>
<td> SPAdes </td>
<td align="center"> 16m </td>
<td align="center"> 8.6 </td>
<td align="center"> 1.6 </td>
<td align="center"> 28m </td>
<td align="center"> 8.6 </td>
<td align="center"> 2.7 </td>
</tr>
<tr>
<td> MismatchCorrector </td>
<td align="center"> 22m </td>
<td align="center"> 1.8 </td>
<td align="center"> 21.8 </td>
<td align="center"> 26m </td>
<td align="center"> 1.8 </td>
<td align="center"> 22.9 </td>
</tr>
<tr>
<td> Whole pipeline </td>
<td align="center"> 1h 12m </td>
<td align="center"> 8.6 </td>
<td align="center"> 24.2 </td>
<td align="center"> 1h 34m </td>
<td align="center"> 8.6 </td>
<td align="center"> 25.5 </td>
</tr>
</table>
<p>
Notes:
<ul>
<li> Running SPAdes without preliminary read error correction (e.g. without BayesHammer or IonHammer) will likely require more time and memory. </li>
<li> Each module removes its temporary files as soon as it finishes. </li>
<li> SPAdes uses 512 Mb per thread for buffers, which results in higher memory consumption. If you set memory limit manually, SPAdes will use smaller buffers and thus less RAM. </li>
<li> Performance statistics is given for SPAdes version 3.9.1. </li>
</ul>
<a name="sec2"></a>
<h2>2. Installation</h2>
<p>
SPAdes requires a 64-bit Linux system or Mac OS and Python (supported versions are 2.4, 2.5, 2.6, 2.7, 3.2, 3.3, 3.4 and 3.5) to be pre-installed on it. To obtain SPAdes you can either download binaries or download source code and compile it yourself.
<a name="sec2.1"></a>
<h3>2.1 Downloading SPAdes Linux binaries</h3>
<p>
To download <a href="http://cab.spbu.ru/files/release3.9.1/SPAdes-3.9.1-Linux.tar.gz">SPAdes Linux binaries</a> and extract them, go to the directory in which you wish SPAdes to be installed and run:
<pre class="code">
<code>
wget http://cab.spbu.ru/files/release3.9.1/SPAdes-3.9.1-Linux.tar.gz
tar -xzf SPAdes-3.9.1-Linux.tar.gz
cd SPAdes-3.9.1-Linux/bin/
</code>
</pre>
<p>
In this case you do not need to run any installation scripts – SPAdes is ready to use. The following files will be placed in the <code>bin</code> directory:
<ul>
<li><code>spades.py</code> (main executable script)</li>
<li><code>dipspades.py</code> (main executable script for <a href="dipspades_manual.html" target="_blank">dipSPAdes</a>)</li>
<li><code>metaspades.py</code> (main executable script for <a href="#meta">metaSPAdes</a>)</li>
<li><code>plasmidspades.py</code> (main executable script for <a href="#plasmid">plasmidSPAdes</a>)</li>
<li><code>rnaspades.py</code> (main executable script for <a href="rnaspades_manual.html" target="_blank">rnaSPAdes</a>)</li>
<li><code>truspades.py</code> (main executable script for <a href="truspades_manual.html" target="_blank">truSPAdes</a>)</li>
<li><code>hammer</code> (read error correcting module for Illumina reads)</li>
<li><code>ionhammer</code> (read error correcting module for IonTorrent reads)</li>
<li><code>spades</code> (assembly module)</li>
<li><code>bwa-spades</code> (<a href="http://bio-bwa.sourceforge.net" target="_blank">BWA</a> alignment module which is required for mismatch correction)</li>
<li><code>corrector</code> (mismatch correction module)</li>
<li><code>dipspades</code> (assembly module for highly polymorphic diploid genomes)</li>
<li><code>scaffold_correction</code> (executable used in truSPAdes pipeline)</li>
</ul>
<p>
We also suggest adding SPAdes installation directory to the <code>PATH</code> variable.
<a name="sec2.2"></a>
<h3>2.2 Downloading SPAdes binaries for Mac</h3>
<p>
To obtain <a href="http://cab.spbu.ru/files/release3.9.1/SPAdes-3.9.1-Darwin.tar.gz">SPAdes binaries for Mac</a>, go to the directory in which you wish SPAdes to be installed and run:
<pre class="code">
<code>
curl http://cab.spbu.ru/files/release3.9.1/SPAdes-3.9.1-Darwin.tar.gz -o SPAdes-3.9.1-Darwin.tar.gz
tar -zxf SPAdes-3.9.1-Darwin.tar.gz
cd SPAdes-3.9.1-Darwin/bin/
</code>
</pre>
<p>
Just as in Linux, SPAdes is ready to use and no further installation steps are required. You will get the same files in the <code>bin</code> directory:
<ul>
<li><code>spades.py</code> (main executable script)</li>
<li><code>dipspades.py</code> (main executable script for <a href="dipspades_manual.html" target="_blank">dipSPAdes</a>)</li>
<li><code>metaspades.py</code> (main executable script for <a href="#meta">metaSPAdes</a>)</li>
<li><code>plasmidspades.py</code> (main executable script for <a href="#plasmid">plasmidSPAdes</a>)</li>
<li><code>rnaspades.py</code> (main executable script for <a href="rnaspades_manual.html" target="_blank">rnaSPAdes</a>)</li>
<li><code>truspades.py</code> (main executable script for <a href="truspades_manual.html" target="_blank">truSPAdes</a>)</li>
<li><code>hammer</code> (read error correcting module for Illumina reads)</li>
<li><code>ionhammer</code> (read error correcting module for IonTorrent reads)</li>
<li><code>spades</code> (assembly module)</li>
<li><code>bwa-spades</code> (<a href="http://bio-bwa.sourceforge.net" target="_blank">BWA</a> alignment module which is required for mismatch correction)</li>
<li><code>corrector</code> (mismatch correction module)</li>
<li><code>dipspades</code> (assembly module for highly polymorphic diploid genomes)</li>
<li><code>scaffold_correction</code> (executable used in truSPAdes pipeline)</li>
</ul>
<p>
We also suggest adding SPAdes installation directory to the <code>PATH</code> variable.
<a name="sec2.3"></a>
<h3>2.3 Downloading and compiling SPAdes source code</h3>
<p>
If you wish to compile SPAdes by yourself you will need the following libraries to be pre-installed:
<ul>
<li>g++ (version 4.7 or higher)</li>
<li>cmake (version 2.8.12 or higher)</li>
<li>zlib</li>
<li>libbz2</li>
</ul>
<p>
If you meet these requirements, you can download the <a href="http://cab.spbu.ru/files/release3.9.1/SPAdes-3.9.1.tar.gz">SPAdes source code</a>:
<pre class="code">
<code>
wget http://cab.spbu.ru/files/release3.9.1/SPAdes-3.9.1.tar.gz
tar -xzf SPAdes-3.9.1.tar.gz
cd SPAdes-3.9.1
</code>
</pre>
<p>
and build it with the following script:
<pre class="code">
<code>
./spades_compile.sh
</code>
</pre>
<p>
SPAdes will be built in the directory <code>./bin</code>. If you wish to install SPAdes into another directory, you can specify full path of destination folder by running the following command in <code>bash</code> or <code>sh</code>:
<pre class="code">
<code>
PREFIX=<destination_dir> ./spades_compile.sh
</code>
</pre>
<p>
for example:
<pre class="code">
<code>
PREFIX=/usr/local ./spades_compile.sh
</code>
</pre>
<p>
which will install SPAdes into <code>/usr/local/bin</code>.
<p>
After installation you will get the same files in <code>./bin</code> (or <code><destination_dir>/bin</code> if you specified PREFIX) directory:
<ul>
<li><code>spades.py</code> (main executable script)</li>
<li><code>dipspades.py</code> (main executable script for <a href="dipspades_manual.html" target="_blank">dipSPAdes</a>)</li>
<li><code>metaspades.py</code> (main executable script for <a href="#meta">metaSPAdes</a>)</li>
<li><code>plasmidspades.py</code> (main executable script for <a href="#plasmid">plasmidSPAdes</a>)</li>
<li><code>rnaspades.py</code> (main executable script for <a href="rnaspades_manual.html" target="_blank">rnaSPAdes</a>)</li>
<li><code>truspades.py</code> (main executable script for <a href="truspades_manual.html" target="_blank">truSPAdes</a>)</li>
<li><code>hammer</code> (read error correcting module for Illumina reads)</li>
<li><code>ionhammer</code> (read error correcting module for IonTorrent reads)</li>
<li><code>spades</code> (assembly module)</li>
<li><code>bwa-spades</code> (<a href="http://bio-bwa.sourceforge.net" target="_blank">BWA</a> alignment module which is required for mismatch correction)</li>
<li><code>corrector</code> (mismatch correction module)</li>
<li><code>dipspades</code> (assembly module for highly polymorphic diploid genomes)</li>
<li><code>scaffold_correction</code> (executable used in truSPAdes pipeline)</li>
</ul>
<p>
We also suggest adding SPAdes installation directory to the <code>PATH</code> variable.
<a name="sec2.4"></a>
<h3>2.4 Verifying your installation</h3>
<p>
For testing purposes, SPAdes comes with a toy data set (reads that align to first 1000 bp of <i>E. coli</i>). To try SPAdes on this data set, run:
<pre class="code">
<code>
<spades installation dir>/spades.py --test
</code>
</pre>
<p>
If you added SPAdes installation directory to the <code>PATH</code> variable, you can run:
<pre class="code">
<code>
spades.py --test
</code>
</pre>
For the simplicity we further assume that SPAdes installation directory is added to the <code>PATH</code> variable.
<p>
If the installation is successful, you will find the following information at the end of the log:
<pre class="code">
<code>
===== Assembling finished.
* Corrected reads are in spades_test/corrected/
* Assembled contigs are in spades_test/contigs.fasta
* Assembled scaffolds are in spades_test/scaffolds.fasta
======= SPAdes pipeline finished.
SPAdes log can be found here: /home/andrey/ablab/algorithmic-biology/assembler/spades_test/spades.log
Thank you for using SPAdes!
</code>
</pre>
<a name="sec3"></a>
<h2>3. Running SPAdes</h2>
<a name="sec3.1"></a>
<h3>3.1 SPAdes input</h3>
<p>
SPAdes takes as input paired-end reads, mate-pairs and single (unpaired) reads in FASTA and FASTQ. For IonTorrent data SPAdes also supports unpaired reads in unmapped BAM format (like the one produced by Torrent Server). However, in order to run read error correction, reads should be in FASTQ or BAM format. Sanger, Oxford Nanopore and PacBio CLR reads can be provided in both formats since SPAdes does not run error correction for these types of data.
<p>
To run SPAdes 3.9.1 you need at least one library of the following types:
<ul>
<li>Illumina paired-end/high-quality mate-pairs/unpaired reads</li>
<li>IonTorrent paired-end/high-quality mate-pairs/unpaired reads</li>
<li>PacBio CCS reads</li>
</ul>
<p>
Illumina and IonTorrent libraries should not be assembled together. All other types of input data are compatible. SPAdes should not be used if only PacBio CLR, Oxford Nanopore, Sanger reads or additional contigs are available.
<p>
SPAdes supports mate-pair only assembly. However, we recommend to use only high-quality mate-pair libraries in this case (e.g. that do not have a paired-end part). We tested mate-pair only pipeline using Illumina Nextera mate-pairs. See more <a href="#hqmp">here</a>.
<p>
Current version SPAdes also supports Lucigen NxSeq® Long Mate Pair libraries, which always have forward-reverse orientation. If you wish to use Lucigen NxSeq® Long Mate Pair reads, you will need Python <a href="https://pypi.python.org/pypi/regex" target="_blank">regex library</a> to be pre-installed on your machine. You can install it with Python <a href="http://www.pip-installer.org/" target="_blank">pip-installer</a>:
<pre class="code">
<code>
pip install regex
</code>
</pre>
or with the <a href="http://peak.telecommunity.com/DevCenter/EasyInstall" target="_blank">Easy Install</a> Python module:
<pre class="code">
<code>
easy_install regex
</code>
</pre>
<p> Notes:
<ul>
<li>It is not recommended to run SPAdes on PacBio reads with low coverage (less than 5).</li>
<li>We suggest not to run SPAdes on PacBio reads for large genomes.</li>
<li>SPAdes accepts gzip-compressed files.</li>
</ul>
<h4>Read-pair libraries</h4>
<p>
By using command line interface, you can specify up to nine different paired-end libraries, up to nine mate-pair libraries and also up to nine high-quality mate-pair ones. If you wish to use more, you can use <a href="#yaml">YAML data set file</a>. We further refer to paired-end and mate-pair libraries simply as to read-pair libraries.
<p>
By default, SPAdes assumes that paired-end and high-quality mate-pair reads have forward-reverse (fr) orientation and usual mate-pairs have reverse-forward (rf) orientation. However, different orientations can be set for any library by using SPAdes options.
<p>
To distinguish reads in pairs we refer to them as left and right reads. For forward-reverse orientation, the forward reads correspond to the left reads and the reverse reads, to the right. Similarly, in reverse-forward orientation left and right reads correspond to reverse and forward reads, respectively, etc.
<p>
Each read-pair library can be stored in several files or several pairs of files. Paired reads can be organized in two different ways:
<ul>
<li> In file pairs. In this case left and right reads are placed in different files and go in the same order in respective files. </li>
<li> In merged files. In this case, the reads are interlaced, so that each right read goes after the corresponding paired left read. </li>
</ul>
<p>
For example, Illumina produces paired-end reads in two files: <code>s_1_1_sequence.txt</code> and <code>s_1_2_sequence.txt</code>. If you choose to store reads in file pairs make sure that for every read from <code>s_1_1_sequence.txt</code> the corresponding paired read from <code>s_1_2_sequence.txt</code> is placed in the respective paired file on the same line number. If you choose to use merged files, every read from <code>s_1_1_sequence.txt</code> should be followed by the corresponding paired read from <code>s_1_2_sequence.txt</code>.
<h4>Unpaired (single-read) libraries</h4>
<p>
By using command line interface, you can specify up to nine different single-read libraries. To input more libraries, you can use <a href="#yaml">YAML data set file</a>.
<p>
Single librairies are assumed to have high quality and a reasonable coverage. For example, you can provide PacBio CCS reads as a single-read library. Additionally, if you have merged a paired-end library with overlapping read-pairs (for example, using <a href="http://ccb.jhu.edu/software/FLASH/" target="_blank">FLASh</a>), you can provide the resulting reads as a single-read library.
<p>
Note, that you should not specify PacBio CLR, Sanger reads or additional contigs as single-read libraries, each of them has a separate <a href="#inputdata">option</a>.
<a name="pacbio"></a>
<h4>PacBio and Oxford Nanopore reads</h4>
<p>
SPAdes can take as an input an unlimited number of PacBio and Oxford Nanopore libraries.
<p>
PacBio CLR and Oxford Nanopore reads are used for hybrid assemblies (e.g. with Illumina or IonTorrent). There is no need to pre-correct this kind of data. SPAdes will use PacBio CLR and Oxford Nanopore reads for gap closure and repeat resolution.
<p>
For PacBio you just need to have filtered subreads in FASTQ/FASTA format. Provide these filtered subreads using <code>--pacbio</code> option. Oxford Nanopore reads are provided with <code>--nanopore</code> option.
<p>
PacBio CCS/Reads of Insert reads or pre-corrected (using third-party software) PacBio CLR / Oxford Nanopore reads can be simply provided as single reads to SPAdes.
<h4>Additional contigs</h4>
<p>
In case you have contigs of the same genome generated by other assembler(s) and you wish to merge them into SPAdes assembly, you can specify additional contigs using <code>--trusted-contigs</code> or <code>--untrusted-contigs</code>. First option is used when high quality contigs are available. These contigs will be used for graph construction, gap closure and repeat resolution. Second option is used for less reliable contigs that may have more errors or contigs of unknown quality. These contigs will be used only for gap closure and repeat resolution. The number of additional contigs is unlimited.
<p>
Note, that SPAdes does not perform assembly using genomes of closely-related species. Only contigs of the same genome should be specified.
<p>
<a name="sec3.2"></a>
<h3>3.2 SPAdes command line options </h3>
<p>
To run SPAdes from the command line, type
<pre class="code">
<code>
spades.py [options] -o <output_dir>
</code>
</pre>
Note that we assume that SPAdes installation directory is added to the <code>PATH</code> variable (provide full path to SPAdes executable otherwise: <code><spades installation dir>/spades.py</code>).
<a name="basicopt"></a>
<h4>Basic options</h4>
<p>
<code>-o <output_dir> </code><br>
Specify the output directory. Required option.
</p>
<a name="sc"></a>
<p>
<code>--sc </code><br>
This flag is required for MDA (single-cell) data.
</p>
<a name="meta"></a>
<p>
<code>--meta </code> (same as <code>metaspades.py</code>)<br>
This flag is recommended when assembling metagenomic data sets (runs metaSPAdes, see <a href="https://arxiv.org/abs/1604.03071">paper</a> for more details). Currently metaSPAdes supports only a <b>single</b> library which has to be <b>paired-end</b> (we hope to remove this restriction soon). It does not support <a href="#correctoropt">careful mode</a> (mismatch correction is not available). In addition, you cannot specify coverage cutoff for metaSPAdes. Note that metaSPAdes might be very sensitive to presence of the technical sequences remaining in the data (most notably adapter readthroughs), please run quality control and pre-process your data accordingly.
</p>
<a name="plasmid"></a>
<p>
<code>--plasmid </code> (same as <code>plasmidspades.py</code>)<br>
This flag is required when assembling only plasmids from WGS data sets (runs plasmidSPAdes, see <a href="http://biorxiv.org/content/early/2016/04/20/048942">paper</a> for the algorithm details). Note, that plasmidSPAdes is not compatible with <a href="#meta">metaSPAdes</a> and <a href="#sc"> single-cell mode</a>. Additionally, we do not recommend to run plasmidSPAdes on more than one library.
See <a href="#sec3.6">section 3.6</a> for plasmidSPAdes output details.
</p>
<a name="rna"></a>
<p>
<code>--rna </code> (same as <code>rnaspades.py</code>)<br>
This flag should be used when assembling RNA-Seq data sets (runs rnaSPAdes). To learn more, see <a href="rnaspades_manual.html" target="_blank">rnaSPAdes manual</a>.
</p>
<p>
<code>--iontorrent </code><br>
This flag is required when assembling IonTorrent data. Allows BAM files as input. Carefully read <a href="#sec3.3">section 3.3</a> before using this option.
</p>
<p>
<code>--test</code><br>
Runs SPAdes on the toy data set; see <a href="#sec2.3">section 2.3</a>.
</p>
<p>
<code>-h</code> (or <code>--help</code>)<br>
Prints help.
</p>
<p>
<code>-v</code> (or <code>--version</code>)<br>
Prints SPAdes version.
</p>
<a name="pipelineopt">
<h4>Pipeline options</h4>
<p>
<code>--only-error-correction</code><br>
Performs read error correction only.
</p>
<p>
<code>--only-assembler</code><br>
Runs assembly module only.
</p>
<a name="correctoropt">
<p>
<code>--careful</code><br>
Tries to reduce the number of mismatches and short indels. Also runs MismatchCorrector – a post processing tool, which uses <a href="http://bio-bwa.sourceforge.net" target="_blank">BWA</a> tool (comes with SPAdes). This option is recommended only for assembly of small genomes. We strongly recommend not to use it for large and medium-size eukaryotic genomes. Note, that this options is is not supported by metaSPAdes and rnaSPAdes.
</p>
<p>
<code>--continue</code><br>
Continues SPAdes run from the specified output folder starting from the last available check-point. Check-points are made after:
<ul>
<li>error correction module is finished</li>
<li>iteration for each specified K value of assembly module is finished</li>
<li>mismatch correction is finished for contigs or scaffolds</li>
</ul>
For example, if specified K values are 21, 33 and 55 and SPAdes was stopped or crashed during assembly stage with K = 55, you can run SPAdes with the <code>--continue</code> option specifying the same output directory. SPAdes will continue the run starting from the assembly stage with K = 55. Error correction module and iterations for K equal to 21 and 33 will not be run again.
Note that all options except <code>-o <output_dir> </code> are ignored if <code>--continue</code> is set.
</p>
<p>
<code>--restart-from <check_point></code><br>
Restart SPAdes run from the specified output folder starting from the specified check-point. Check-points are:
<ul>
<li><code>ec</code> – start from error correction</li>
<li><code>as</code> – restart assembly module from the first iteration</li>
<li><code>k<int></code> – restart from the iteration with specified k values, e.g. k55</li>
<li><code>mc</code> – restart mismatch correction</li>
</ul>
In comparison to the <code>--continue</code> option, you can change some of the options when using <code>--restart-from</code>. You can change any option except: all basic options, all options for specifying input data (including <code>--dataset</code>), <code>--only-error-correction</code> option and <code>--only-assembler</code> option. For example, if you ran assembler with k values 21,33,55 without mismatch correction, you can add one more iteration with k=77 and run mismatch correction step by running SPAdes with following options:<br>
<code>--restart-from k55 -k 21,33,55,77 --mismatch-correction -o <previous_output_dir></code>.
<br>Since all files will be overwritten, do not forget to copy your assembly from the previous run if you need it.
</p>
<p>
<code>--disable-gzip-output</code><br>
Forces read error correction module not to compress the corrected reads. If this options is not set, corrected reads will be in <code>*.fastq.gz</code> format.
</p>
<a name="inputdata"></a>
<h4>Input data</h4>
<i><b> Specifying one library (previously used format)</i></b>
<p>
<code>--12 <file_name> </code><br>
File with interlaced forward and reverse paired-end reads.
</p>
<p>
<code>-1 <file_name> </code><br>
File with forward reads.
</p>
<p>
<code>-2 <file_name> </code><br>
File with reverse reads.
</p>
<p>
<code>-s <file_name> </code><br>
File with unpaired reads.
</p>
<i><b> Specifying multiple libraries (new format)</i></b><br>
<ul>
<li><b> Single-read libraries</b></li>
<p>
<code>--s<b><#></b> <file_name> </code><br>
File for single-read library number <code><b><#></b></code> (<code><b><#></b></code> = 1,2,..,9). For example, for the first paired-end library the option is:
<code>--s1 <file_name> </code><br>
Do not use <code>-s</code> options for single-read libraries, since it specifies unpaired reads for the first paired-end library.
</p>
<li><b> Paired-end libraries</b></li>
<p>
<code>--pe<b><#></b>-12 <file_name> </code><br>
File with interlaced reads for paired-end library number <code><b><#></b></code> (<code><b><#></b></code> = 1,2,..,9). For example, for the first single-read library the option is:
<code>--pe1-12 <file_name> </code><br>
</p>
<p>
<code>--pe<b><#></b>-1 <file_name> </code><br>
File with left reads for paired-end library number <code><b><#></b></code> (<code><b><#></b></code> = 1,2,..,9).
</p>
<p>
<code>--pe<b><#></b>-2 <file_name> </code><br>
File with right reads for paired-end library number <code><b><#></b></code> (<code><b><#></b></code> = 1,2,..,9).
</p>
<p>
<code>--pe<b><#></b>-s <file_name> </code><br>
File with unpaired reads from paired-end library number <code><b><#></b></code> (<code><b><#></b></code> = 1,2,..,9) <br>
For example, paired reads can become unpaired during the error correction procedure.
</p>
<p>
<code>--pe<b><#></b>-<b><or></b> <file_name> </code><br>
Orientation of reads for paired-end library number <code><b><#></b></code> (<code><b><#></b></code> = 1,2,..,9; <code><b><or></b></code> = "fr","rf","ff"). <br>
The default orientation for paired-end libraries is forward-reverse. For example, to specify reverse-forward orientation for the second paired-end library, you should use the flag:
<code>--pe2-rf </code><br>
</p>
<li><b> Mate-pair libraries</b></li>
<p>
<code>--mp<b><#></b>-12 <file_name> </code><br>
File with interlaced reads for mate-pair library number <code><b><#></b></code> (<code><b><#></b></code> = 1,2,..,9).
</p>
<p>
<code>--mp<b><#></b>-1 <file_name> </code><br>
File with left reads for mate-pair library number <code><b><#></b></code> (<code><b><#></b></code> = 1,2,..,9).
</p>
<p>
<code>--mp<b><#></b>-2 <file_name> </code><br>
File with right reads for mate-pair library number <code><b><#></b></code> (<code><b><#></b></code> = 1,2,..,9).
</p>
<p>
<code>--mp<b><#></b>-<b><or></b> <file_name> </code><br>
Orientation of reads for mate-pair library number <code><b><#></b></code> (<code><b><#></b></code> = 1,2,..,9; <code><b><or></b></code> = "fr","rf","ff"). <br>
The default orientation for mate-pair libraries is reverse-forward. For example, to specify forward-forward orientation for the first mate-pair library, you should use the flag:
<code>--mp1-ff </code><br>
</p>
<a name="hqmp"></a>
<li><b> High-quality mate-pair libraries</b> (can be used for mate-pair only assembly)</li>
<p>
<code>--hqmp<b><#></b>-12 <file_name> </code><br>
File with interlaced reads for high-quality mate-pair library number <code><b><#></b></code> (<code><b><#></b></code> = 1,2,..,9).
</p>
<p>
<code>--hqmp<b><#></b>-1 <file_name> </code><br>
File with left reads for high-quality mate-pair library number <code><b><#></b></code> (<code><b><#></b></code> = 1,2,..,9).
</p>
<p>
<code>--hqmp<b><#></b>-2 <file_name> </code><br>
File with right reads for high-quality mate-pair library number <code><b><#></b></code> (<code><b><#></b></code> = 1,2,..,9).
</p>
<p>
<code>--hqmp<b><#></b>-s <file_name> </code><br>
File with unpaired reads from high-quality mate-pair library number <code><b><#></b></code> (<code><b><#></b></code> = 1,2,..,9) <br>
</p>
<p>
<code>--hqmp<b><#></b>-<b><or></b> <file_name> </code><br>
Orientation of reads for high-quality mate-pair library number <code><b><#></b></code> (<code><b><#></b></code> = 1,2,..,9; <code><b><or></b></code> = "fr","rf","ff"). <br>
The default orientation for high-quality mate-pair libraries is forward-reverse. For example, to specify reverse-forward orientation for the first high-quality mate-pair library, you should use the flag:
<code>--hqmp1-rf </code><br>
</p>
<a name="lxmp"></a>
<li><b> Lucigen NxSeq® Long Mate Pair libraries</b> (see <a href="#sec3.1">section 3.1</a> for details)</li>
<p>
<code>--nxmate<b><#></b>-1 <file_name> </code><br>
File with left reads for Lucigen NxSeq® Long Mate Pair library number <code><b><#></b></code> (<code><b><#></b></code> = 1,2,..,9).
</p>
<p>
<code>--nxmate<b><#></b>-2 <file_name> </code><br>
File with right reads for Lucigen NxSeq® Long Mate Pair library number <code><b><#></b></code> (<code><b><#></b></code> = 1,2,..,9).
</p>
</p>
</ul>
<i><b> Specifying data for hybrid assembly</i></b>
<p>
<code>--pacbio <file_name> </code><br>
File with PacBio CLR reads. For PacBio CCS reads use <code>-s</code> option. More information on PacBio reads is provided in <a href="#pacbio">section 3.1</a>.
</p>
<p>
<code>--nanopore <file_name> </code><br>
File with Oxford Nanopore reads.
</p>
<p>
<code>--sanger <file_name> </code><br>
File with Sanger reads
</p>
<p>
<code>--trusted-contigs <file_name> </code><br>
Reliable contigs of the same genome, which are likely to have no misassemblies and small rate of other errors (e.g. mismatches and indels). This option is not intended for contigs of the related species.
</p>
<p>
<code>--untrusted-contigs <file_name> </code><br>
Contigs of the same genome, quality of which is average or unknown. Contigs of poor quality can be used but may introduce errors in the assembly. This option is also not intended for contigs of the related species.
</p>
<a name="yaml"></a>
<i><b> Specifying input data with YAML data set file (advanced)</i></b>
<p>
An alternative way to specify an input data set for SPAdes is to create a <a href="http://www.yaml.org/" target="_blank">YAML</a> data set file.
By using a YAML file you can provide an unlimited number of paired-end, mate-pair and unpaired libraries.
Basically, YAML data set file is a text file, in which input libraries are provided as a comma-separated list in square brackets.
Each library is provided in braces as a comma-separated list of attributes.
The following attributes are available:
<ul>
<li>orientation ("fr", "rf", "ff")</li>
<li>type ("paired-end", "mate-pairs", "hq-mate-pairs", "single", "pacbio", "nanopore", "sanger", "trusted-contigs", "untrusted-contigs")</li>
<li>interlaced reads (comma-separated list of files with interlaced reads)</li>
<li>left reads (comma-separated list of files with left reads)</li>
<li>right reads (comma-separated list of files with right reads)</li>
<li>single reads (comma-separated list of files with single reads)</li>
</ul>
<p>
To properly specify a library you should provide its type and at least one file with reads.
Orientation is an optional attribute. Its default value is "fr" (forward-reverse) for paired-end libraries and
"rf" (reverse-forward) for mate-pair libraries.
<p>
The value for each attribute is given after a colon.
Comma-separated lists of files should be given in square brackets.
For each file you should provide its full path in double quotes.
Make sure that files with right reads are given in the same order as corresponding files with left reads.
<p>
For example, if you have one paired-end library splitted into two pairs of files:
<pre class="code">
<code>
lib_pe1_left_1.fastq
lib_pe1_right_1.fastq
lib_pe1_left_2.fastq
lib_pe1_right_2.fastq
</code>
</pre>
one mate-pair library:
<pre class="code">
<code>
lib_mp1_left.fastq
lib_mp1_right.fastq
</code>
</pre>
and PacBio CCS and CLR reads:
<pre class="code">
<code>
pacbio_ccs.fastq
pacbio_clr.fastq
</code>
</pre>
</pre>
YAML file should look like this:
<pre class="code">
<code>
[
{
orientation: "fr",
type: "paired-end",
right reads: [
"/FULL_PATH_TO_DATASET/lib_pe1_right_1.fastq",
"/FULL_PATH_TO_DATASET/lib_pe1_right_2.fastq"
],
left reads: [
"/FULL_PATH_TO_DATASET/lib_pe1_left_1.fastq",
"/FULL_PATH_TO_DATASET/lib_pe1_left_2.fastq"
]
},
{
orientation: "rf",
type: "mate-pairs",
right reads: [
"/FULL_PATH_TO_DATASET/lib_mp1_right.fastq"
],
left reads: [
"/FULL_PATH_TO_DATASET/lib_mp1_left.fastq"
]
},
{
type: "single",
single reads: [
"/FULL_PATH_TO_DATASET/pacbio_ccs.fastq"
]
},
{
type: "pacbio",
single reads: [
"/FULL_PATH_TO_DATASET/pacbio_clr.fastq"
]
}
]
</code>
</pre>
<p>
Once you have created a YAML file save it with <code>.yaml</code> extension (e.g. as <code>my_data_set.yaml</code>) and run SPAdes using the <code>--dataset</code> option: <br>
<code>--dataset <your YAML file></code><br><br>
Notes:
<ul>
<li> The <code>--dataset</code> option cannot be used with any other options for specifying input data. </li>
<li> We recommend to nest all files with long reads of the same data type in a single library block. </li>
</ul>
<a name="advancedopt">
<h4>Advanced options</h4>
<p>
<code>-t <int></code> (or <code>--threads <int></code>)<br>
Number of threads. The default value is 16.
</p>
<p>
<code>-m <int></code> (or <code>--memory <int></code>)<br>
Set memory limit in Gb. SPAdes terminates if it reaches this limit. The default value is 250 Gb. Actual amount of consumed RAM will be below this limit. Make sure this value is correct for the given machine. SPAdes uses the limit value to automatically determine the sizes of various buffers, etc.
</p>
<p>
<code>--tmp-dir <dir_name></code><br>
Set directory for temporary files from read error correction. The default value is <code><output_dir>/corrected/tmp</code>
</p>
<p>
<code>-k <int,int,...></code><br>
Comma-separated list of k-mer sizes to be used (all values must be odd, less than 128 and listed in ascending order). If <code>--sc</code> is set the default values are 21,33,55. For multicell data sets K values are automatically selected using maximum read length (<a href="#sec3.4">see note for assembling long Illumina paired reads for details</a>). To properly select K values for IonTorrent data read <a href="#sec3.3">section 3.3</a>.
</p>
<p>
<code>--cov-cutoff <float></code><br>
Read coverage cutoff value. Must be a positive float value, or 'auto', or 'off'. Default value is 'off'. When set to 'auto' SPAdes automatically computes coverage threshold using conservative strategy. Note, that this option is not supported by metaSPAdes.
</p>
<p>
<code>--phred-offset <33 or 64></code><br>
PHRED quality offset for the input reads, can be either 33 or 64. It will be auto-detected if it is not specified.
</p>
<a name="examples">
<h4>Examples</h4>
<p>
To test the toy data set, you can also run the following command from the SPAdes <code>bin</code> directory:
<pre class="code">
<code>
spades.py --pe1-1 ../share/spades/test_dataset/ecoli_1K_1.fq.gz \
--pe1-2 ../share/spades/test_dataset/ecoli_1K_2.fq.gz -o spades_test
</code>
</pre>
<p>
If you have your library separated into several pairs of files, for example:
<pre class="code">
<code>
lib1_forward_1.fastq
lib1_reverse_1.fastq
lib1_forward_2.fastq
lib1_reverse_2.fastq
</code>
</pre>
<p>
make sure that corresponding files are given in the same order:
<pre class="code">
<code>
spades.py --pe1-1 lib1_forward_1.fastq --pe1-2 lib1_reverse_1.fastq \
--pe1-1 lib1_forward_2.fastq --pe1-2 lib1_reverse_2.fastq \
-o spades_output
</code>
</pre>
<p>
Files with interlacing paired-end reads or files with unpaired reads can be specified in any order with one file per option, for example:
<pre class="code">
<code>
spades.py --pe1-12 lib1_1.fastq --pe1-12 lib1_2.fastq \
--pe1-s lib1_unpaired_1.fastq --pe1-s lib1_unpaired_2.fastq \
-o spades_output
</code>
</pre>
<p>
If you have several paired-end and mate-pair reads, for example:
<li> paired-end library 1
<pre class="code">
<code>
lib_pe1_left.fastq
lib_pe1_right.fastq
</code>
</pre>
<p>
<li> mate-pair library 1
<pre class="code">
<code>
lib_mp1_left.fastq
lib_mp1_right.fastq
</code>
</pre>
<p>
<li> mate-pair library 2
<pre class="code">
<code>
lib_mp2_left.fastq
lib_mp2_right.fastq
</code>
</pre>
<p>
make sure that files corresponding to each library are grouped together:
<pre class="code">
<code>
spades.py --pe1-1 lib_pe1_left.fastq --pe1-2 lib_pe1_right.fastq \
--mp1-1 lib_mp1_left.fastq --mp1-2 lib_mp1_right.fastq \
--mp2-1 lib_mp2_left.fastq --mp2-2 lib_mp2_right.fastq \
-o spades_output
</code>
</pre>
<p>
If you have IonTorrent unpaired reads, PacBio CLR and additional reliable contigs:
<pre class="code">
<code>
it_reads.fastq
pacbio_clr.fastq
contigs.fasta
</code>
</pre>
<p>
run SPAdes with the following command:
<pre class="code">
<code>
spades.py --iontorrent -s it_reads.fastq \
--pacbio pacbio_clr.fastq --trusted-contigs contigs.fastq \
-o spades_output
</code>
</pre>
<p>
If a single-read library is splitted into several files:
<pre class="code">
<code>
unpaired1_1.fastq
unpaired1_2.fastq
unpaired1_3.fasta
</code>
</pre>
<p>
specify them as one library:
<pre class="code">
<code>
spades.py --s1 unpaired1_1.fastq \
--s1 unpaired1_2.fastq --s1 unpaired1_3.fastq \
-o spades_output
</code>
</pre>
<p>
All options for specifying input data can be mixed if needed, but make sure that files for each library are grouped and files with left and right paired reads are listed in the same order.
<a name="sec3.3">
<h3>3.3 Assembling IonTorrent reads</h3>
<p>
Only FASTQ or BAM files are supported as input.
<p>
The selection of k-mer length is non-trivial for IonTorrent. If the dataset is more or less conventional (good coverage, not high GC, etc), then use our <a href="#sec3.4">recommendation for long reads</a> (e.g. assemble using k-mer lengths 21,33,55,77,99,127). However, due to increased error rate some changes of k-mer lengths (e.g. selection of shorter ones) may be required. For example, if you ran SPAdes with k-mer lengths 21,33,55,77 and then decided to assemble the same data set using more iterations and larger values of K, you can run SPAdes once again specifying the same output folder and the following options: <code>--restart-from k77 -k 21,33,55,77,99,127 --mismatch-correction -o <previous_output_dir></code>. Do not forget to copy contigs and scaffolds from the previous run. We're planning to tackle issue of selecting k-mer lengths for IonTorrent reads in next versions.
<p> You may need no error correction for Hi-Q enzyme at all. However, we suggest trying to assemble your data with and without error correction and select the best variant.
<p> For non-trivial datasets (e.g. with high GC, low or uneven coverage) we suggest to enable single-cell mode (setting <code>--sc</code> option) and use k-mer lengths of 21,33,55.
<a name="sec3.4">
<h3>3.4 Assembling long Illumina paired reads (2x150 and 2x250)</h3>
<p>
Recent advances in DNA sequencing technology have led to a rapid increase in read length. Nowadays, it is a common situation to have a data set consisting of 2x150 or 2x250 paired-end reads produced by Illumina MiSeq or HiSeq2500. However, the use of longer reads alone will not automatically improve assembly quality. An assembler that can properly take advantage of them is needed.
<p>
SPAdes' use of iterative k-mer lengths allows benefiting from the full potential of the long paired-end reads. Currently one has to set the assembler options up manually, but we plan to incorporate automatic calculation of necessary options soon.
<p>
Please note that in addition to the read length, the insert length also matters a lot. It is not recommended to sequence a 300bp fragment with a pair of 250bp reads. We suggest using 350-500 bp fragments with 2x150 reads and 550-700 bp fragments with 2x250 reads.
<h4>Multi-cell data set with read length 2x150</h4>
<p>
Do not turn off SPAdes error correction (BayesHammer module), which is included in SPAdes default pipeline.
<p>
If you have enough coverage (50x+), then you may want to try to set k-mer lengths of 21, 33, 55, 77 (selected by default for reads with length 150bp).
<p>
Make sure you run assembler with the <code>--careful</code> option to minimize number of mismatches in the final contigs.
<p>
We recommend that you check the SPAdes log file at the end of the each iteration to control the average coverage of the contigs.
<p>
For reads corrected prior to running the assembler:
<pre class="code">
<code>
spades.py -k 21,33,55,77 --careful --only-assembler <your reads> -o spades_output
</code>
</pre>
<p>
To correct and assemble the reads:
<pre class="code">
<code>
spades.py -k 21,33,55,77 --careful <your reads> -o spades_output
</code>
</pre>
<h4>Multi-cell data set with read lengths 2 x 250</h4>
<p>
Do not turn off SPAdes error correction (BayesHammer module), which is included in SPAdes default pipeline.
<p>
By default we suggest to increase k-mer lengths in increments of 22 until the k-mer length reaches 127. The exact length of the k-mer depends on the coverage: k-mer length of 127 corresponds to 50x k-mer coverage and higher. For read length 250bp SPAdes automatically chooses K values equal to 21, 33, 55, 77, 99, 127.
<p>
Make sure you run assembler with <code>--careful</code> option to minimize number of mismatches in the final contigs.
<p>
We recommend you to check the SPAdes log file at the end of the each iteration to control the average coverage of the contigs.
<p>
For reads corrected prior to running the assembler:
<pre class="code">
<code>
spades.py -k 21,33,55,77,99,127 --careful --only-assembler <your reads> -o spades_output
</code>
</pre>
<p>
To correct and assemble the reads:
<pre class="code">
<code>
spades.py -k 21,33,55,77,99,127 --careful <your reads> -o spades_output
</code>
</pre>
<h4>Single-cell data set with read lengths 2 x 150 or 2 x 250</h4>
<p>
The default k-mer lengths are recommended. For single-cell data sets SPAdes selects k-mer sizes 21, 33 and 55.
<p>
However, it might be tricky to fully utilize the advantages of long reads you have. Consider contacting us for more information and to discuss assembly strategy.
<br>
<a name="sec3.5">
<h3>3.5 SPAdes output</h3>
<p>
SPAdes stores all output files in <code><output_dir> </code>, which is set by the user.
<ul>
<li><code><output_dir>/corrected/</code> directory contains reads corrected by BayesHammer in <code>*.fastq.gz</code> files; if compression is disabled, reads are stored in uncompressed <code>*.fastq</code> files</li>
<li><code><output_dir>/scaffolds.fasta</code> contains resulting scaffolds (recommended for use as resulting sequences)</li>
<li><code><output_dir>/contigs.fasta</code> contains resulting contigs</li>
<li><code><output_dir>/assembly_graph.fastg</code> contains SPAdes assembly graph in <a href="http://fastg.sourceforge.net/FASTG_Spec_v1.00.pdf" target="_blank">FASTG format</a></li>
<li><code><output_dir>/contigs.paths</code> contains paths in the assembly graph corresponding to contigs.fasta (see details below)</li>
<li><code><output_dir>/scaffolds.paths</code> contains paths in the assembly graph corresponding to scaffolds.fasta (see details below)</li>
</ul>
<p>
Contigs/scaffolds names in SPAdes output FASTA files have the following format: <br><code>>NODE_3_length_237403_cov_243.207_ID_45</code><br> Here <code>3</code> is the number of the contig/scaffold, <code>237403</code> is the sequence length in nucleotides and <code>243.207</code> is the k-mer coverage for the last (largest) k value used. Note that the k-mer coverage is always lower than the read (per-base) coverage.
<p>
To view FASTG files we recommend to use <a href="http://rrwick.github.io/Bandage/" target="_blank">Bandage visualization tool</a>. Note that sequences stored in <code>assembly_graph.fastg</code> correspond to contigs before repeat resolution (edges of the assembly graph). Paths corresponding to contigs after repeat resolution (scaffolding) are stored in <code>contigs.paths</code> (<code>scaffolds.paths</code>) in the format accepted by Bandage (see <a href="https://github.com/rrwick/Bandage/wiki/Graph-paths" target="_blank">Bandage wiki</a> for details). The example is given below.
<p> Let the contig with the name <code>NODE_5_length_100000_cov_215.651_ID_5</code> consist of the following edges of the assembly graph:
<pre>
<code>
>EDGE_<b>2</b>_length_33280_cov_199.702
>EDGE_<b>5</b>_length_84_cov_321.414<b>'</b>
>EDGE_<b>3</b>_length_111_cov_175.304
>EDGE_<b>5</b>_length_84_cov_321.414<b>'</b>
>EDGE_<b>4</b>_length_66661_cov_223.548
</code>
</pre>
<p>
Then, <code>contigs.paths</code> will contain the following record:
<pre>
<code>
NODE_5_length_100000_cov_215.651_ID_5
2+,5-,3+,5-,4+
</code>
</pre>
<p>
Since the current version of Bandage does not accept paths with gaps, paths corresponding contigs/scaffolds jumping over a gap in the assembly graph are splitted by semicolon at the gap positions. For example, the following record
<pre>
<code>
NODE_3_length_237403_cov_243.207_ID_45
21-,17-,15+,17-,16+;
31+,23-,22+,23-,4-
</code>
</pre>
states that <code>NODE_3_length_237403_cov_243.207_ID_45</code> corresponds to the path with 10 edges, but jumps over a gap between edges <code>EDGE_16_length_21503_cov_482.709</code> and <code>EDGE_31_length_140767_cov_220.239</code>.
<p>
The full list of <code><output_dir></code> content is presented below:
</p>
<pre>
<code>scaffolds.fasta</code> – <i>resulting scaffolds (recommended for use as resulting sequences)</i>
<code>contigs.fasta</code> – <i>resulting contigs</i>
<code>assembly_graph.fastg</code> – <i>assembly graph</i>
<code>contigs.paths</code> – <i>contigs paths in the assembly graph</i>
<code>scaffolds.paths</code> – <i>scaffolds paths in the assembly graph</i>
<code>before_rr.fasta</code> – <i>contigs before repeat resolution</i>
<code>corrected/</code> – <i>files from read error correction</i>
<code>configs/</code> – <i>configuration files for read error correction</i>
<code>corrected.yaml</code> – <i>internal configuration file</i>
Output files with corrected reads
<code>params.txt</code> – <i>information about SPAdes parameters in this run</i>
<code>spades.log</code> – <i>SPAdes log</i>
<code>dataset.info</code> – <i>internal configuration file</i>
<code>input_dataset.yaml</code> – <i>internal YAML data set file</i>
<code>K<##>/</code> – <i>directory containing intermediate files from the run with K=<##>. These files should not be used as assembly results; use resulting contigs/scaffolds in files mentioned above.</i>
</pre>
<p>
SPAdes will overwrite these files and directories if they exist in the specified <code><output_dir></code>.
<a name="sec3.6">
<h3>3.6 plasmidSPAdes output</h3>
<p>
plasmidSPAdes outputs only DNA sequences from putative plasmids. Output file names and formats remain the same as in SPAdes (see <a href="#sec3.5">previous</a> section), with the following difference. For all contig names in <code>contigs.fasta</code>, <code>scaffolds.fasta</code> and <code>assembly_graph.fastg</code>
we append suffix <code>_component_X</code>, where <code>X</code> is the id of the putative plasmid, which the contig belongs to. Note that plasmidSPAdes may not be able to separate similar plasmids and thus their contigs may appear with the same id.
<a name="sec3.7">
<h3>3.7 Assembly evaluation</h3>
<p>
<a href="http://cab.spbu.ru/software/quast/" target="_blank">QUAST</a> may be used to generate summary statistics (N50, maximum contig length, GC %, # genes found in a reference list or with built-in gene finding tools, etc.) for a single assembly. It may also be used to compare statistics for multiple assemblies of the same data set (e.g., SPAdes run with different parameters, or several different assemblers).
<br>
<a name="sec4">
<h2>4. Citation</h2>
<p>
If you use SPAdes in your research, please include <a href="http://link.springer.com/chapter/10.1007%2F978-3-642-37195-0_13" target="_blank">Nurk, Bankevich et al., 2013</a> in your reference list. You may also add <a href="http://online.liebertpub.com/doi/abs/10.1089/cmb.2012.0021" target="_blank">Bankevich, Nurk et al., 2012</a> instead.
<p>
If you use PacBio or Nanopore reads, you may also cite <a href="http://bioinformatics.oxfordjournals.org/content/early/2015/11/20/bioinformatics.btv688.short" target="_blank">Antipov et al., 2015</a>. If you use multiple paired-end and/or mate-pair libraries you may also cite papers describing SPAdes repeat resolution algorithms <a href="http://bioinformatics.oxfordjournals.org/content/30/12/i293.short" target="_blank">Prjibelski et al., 2014</a> and <a href="http://bioinformatics.oxfordjournals.org/content/31/20/3262.abstract" target="_blank">Vasilinetc et al., 2015</a>. If you use plasmidSPAdes please cite <a href="http://biorxiv.org/content/early/2016/04/20/048942">Antipov et al., 2016</a>.
<p>
For the information about dipSPAdes and truSPAdes papers see <a href="dipspades_manual.html" target="_blank">dipSPAdes manual</a> and <a href="truspades_manual.html" target="_blank">truSPAdes manual</a> respectively.
<p>
In addition, we would like to list your publications that use our software on our website. Please email the reference, the name of your lab, department and institution to <a href="mailto:spades.support@cab.spbu.ru" target="_blank">spades.support@cab.spbu.ru</a>.
<br>
<a name="sec5">
<h2>5. Feedback and bug reports</h2>
<p>
Your comments, bug reports, and suggestions are very welcomed. They will help us to further improve SPAdes.
<p>
If you have any troubles running SPAdes, please send us <code>params.txt</code> and <code>spades.log</code> from the directory <code><output_dir></code>.
<p>
Address for communications: <a href="mailto:spades.support@cab.spbu.ru" target="_blank">spades.support@cab.spbu.ru</a>.
<br/><br/><br/><br/><br/>
</body>
</html>
|