These are the rules I use for Spades. I got them from John McLeod's pagat.com, which has rules for pretty much all card games. (C) John McLeod, 2011 - reprinted with permission.
The four players are in fixed partnerships, with partners sitting opposite each other. Deal and play are clockwise.
Download Hardwood Spades for Mac to spades card game with Internet and solo play. Operating Systems Macintosh, Mac OS X 10.2, Mac OS X 10.3. Additional Requirements Mac OS X 10.2 or later. Read reviews, compare customer ratings, see screenshots, and learn more about Spades. Download Spades for macOS 10.9.0 or later and enjoy it on your Mac. Spades is a trick-taking card game that can be played with 3 players solo, 4 players solo, or 4 players with partners (2 teams of 2).
A standard pack of 52 cards is used. The cards, in each suit, rank from highest to lowest: A, K, Q, J, 10, 9, 8, 7, 6, 5, 4, 3, 2.
The first dealer is chosen at random, and the turn to deal rotates clockwise. The cards are shuffled and then dealt singly, in clockwise order beginning with the player on dealer's left, until all 52 cards have been dealt and everyone has 13.
In Spades, all four players bid a number of tricks. Each team adds together the bids of the two partners, and the total is the number of tricks that team must try to win in order to get a positive score. The bidding begins with the player to dealer's left and continues clockwise around the table. Everyone must bid a number, and in theory any number from 0 to 13 is allowed. Unlike other games with bidding, there is no requirement for each bid to be higher than the last one, and players are not allowed to pass. There is no second round of bidding - bids once made cannot be altered.
Example: South deals; West bids 3; North bids 1; East bids 4; South bids 4. The objective of North and South is to win at least 5 tricks (4+1), East and West try to win at least 7 (4+3).
A bid of 0 tricks is known as Nil. This is a declaration that that the player who bid Nil will not win any tricks during the play. There is an extra bonus for this if it succeeds and a penalty if it fails. The partnership also has the objective of winning the number of tricks bid by the Nil's partner. It is not possible to bid no tricks without bidding a Nil. If you don't want to go for the Nil bonus or penalty you must bid at least 1.
The player to dealer's left leads any card except a spade to the first trick. Each player, in turn, clockwise, must follow suit if able; if unable to follow suit, the player may play any card.
A trick containing a spade is won by the highest spade played; if no spade is played, the trick is won by the highest card of the suit led. The winner of each trick leads to the next. Spades may not be led until either some player has played a spade (on the lead of another suit, of course), or the leader has nothing but spades left in hand.
Playing the first spade is known as 'breaking' spades.
A Boston is when one team gets all 13 tricks in a round.
A side that takes at least as many tricks as its bid calls for receives a score equal to 10 times its bid. Additional tricks (overtricks) are worth an extra one point each.
Sandbagging rule: Overtricks are colloquially known as bags. A side which (over several deals) accumulates ten or more bags has 100 points deducted from its score. Any bags beyond ten are carried over to the next cycle of ten overtricks - that is if they reached twenty overtricks they would lose another 100 points and so on.
Example: Suppose a team whose score is 337 bids 5 tricks and they have 7 bags carried over from the previous rounds. If they win 7 tricks they score 52, taking their score to 389 (and their bags to 9). If they win 8 tricks they score 53, but lose 100 because they now have 10 bags, and their score becomes 290 (337 + 53 - 100). If they win 9 tricks they score 54 and lose 100, bringing their score to 291.
If a side does not make its bid, they lose 10 points for each trick they bid.
If a bid of nil is successful, the nil bidder's side receives 100 points. This is in addition to the score won (or lost) by the partner of the nil bidder for tricks made. If a bid of nil fails - that is, the bidder takes at least one trick - the bidder's side loses 100 points, but still receives any amount scored for the partner's bid.
When a nil fails, the tricks won by the nil bidder do not count towards making the partner's bid, but do count as bags for the team.
The side which reaches 500 points first wins the game. If both sides reach 500 points in a single deal, the side with the higher score wins.
1. About SPAdesSPAdes – St. Petersburg genome assembler – is an assembly toolkit containing various assembly pipelines. This manual will help you to install and run SPAdes. SPAdes version 3.13.0 was released under GPLv2 on October 11, 2018 and can be downloaded from http://cab.spbu.ru/software/spades/.
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.
Version 3.13.0 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 bacterial (both single-cell MDA and standard isolates), fungal and other small genomes. SPAdes is not intended for larger genomes (e.g. mammalian size genomes). For such purposes you can use it at your own risk.
SPAdes 3.13.0 includes the following additional pipelines:
In addition, we provide several stand-alone binaries with relatively simple command-line interface: k-mer counting (spades-kmercounter
), assembly graph construction (spades-gbuilder
) and long read to graph aligner (spades-gmapper
). To learn options of these tools you can either run them without any parameters or read this section.
SPAdes comes in several separate modules:
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 SPAdes options section.
In this section we give approximate data about SPAdes' performance on two data sets:
We ran SPAdes with default parameters using 16 threads on a server with Intel Xeon 2.27GHz processors. The results for both datasets are pretty similar: BayesHammer runs in less than half an hour and takes up to 8Gb of RAM, assembly takes about 10 minutes and 9Gb of RAM (see notes below), MismatchCorrector runs for slightly more than 10 minutes 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.
Data set | E. coli isolate | E. coli single-cell | ||||
Stage | Time | Peak RAM usage (Gb) | Additional disk space (Gb) | Time | Peak RAM usage (Gb) | Additional disk space (Gb) |
BayesHammer | 24m | 7.8 | 8.5 | 25m | 7.7 | 8.6 |
SPAdes | 8m | 8.4 | 1.4 | 10m | 8.3 | 2.1 |
MismatchCorrector | 10m | 1.7 | 21.4 | 12m | 1.8 | 22.4 |
Whole pipeline | 42m | 8.4 | 23.9 | 47m | 8.3 | 25.1 |
Notes:
SPAdes requires a 64-bit Linux system or Mac OS and Python (supported versions are Python2: 2.4–2.7, and Python3: 3.2 and higher) to be pre-installed on it. To obtain SPAdes you can either download binaries or download source code and compile it yourself.
In case of successful installation the following files will be placed in the bin
directory:
spades.py
(main executable script)metaspades.py
(main executable script for metaSPAdes)plasmidspades.py
(main executable script for plasmidSPAdes)rnaspades.py
(main executable script for rnaSPAdes)truspades.py
(main executable script for truSPAdes)spades-core
(assembly module)spades-gbuilder
(standalone graph builder application)spades-gmapper
(standalone long read to graph aligner)spades-kmercount
(standalone k-mer counting application)spades-hammer
(read error correcting module for Illumina reads)spades-ionhammer
(read error correcting module for IonTorrent reads)spades-bwa
(BWA alignment module which is required for mismatch correction)spades-corrector-core
(mismatch correction module)spades-truseq-scfcorrection
(executable used in truSPAdes pipeline)To download SPAdes Linux binaries and extract them, go to the directory in which you wish SPAdes to be installed and run:
SPAdes is ready to use and no further installation steps are required. We also suggest adding SPAdes installation directory to the PATH
variable.
To obtain SPAdes binaries for Mac, go to the directory in which you wish SPAdes to be installed and run:
Just as in Linux, SPAdes is ready to use and no further installation steps are required. We also suggest adding SPAdes installation directory to the PATH
variable.
If you wish to compile SPAdes by yourself you will need the following libraries to be pre-installed:
If you meet these requirements, you can download the SPAdes source code:
and build it with the following script:
SPAdes will be built in the directory ./bin
. If you wish to install SPAdes into another directory, you can specify full path of destination folder by running the following command in bash
or sh
:
for example:
which will install SPAdes into /usr/local/bin
.
After the installation you will get the same files (listed above) in ./bin
directory (or <destination_dir>/bin
if you specified PREFIX). We also suggest adding SPAdes installation directory to the PATH
variable.
For testing purposes, SPAdes comes with a toy data set (reads that align to first 1000 bp of E. coli). To try SPAdes on this data set, run:
If you added SPAdes installation directory to the PATH
variable, you can run: For the simplicity we further assume that SPAdes installation directory is added to the PATH
variable.
If the installation is successful, you will find the following information at the end of the log:
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.
To run SPAdes 3.13.0 you need at least one library of the following types:
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.
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 here.
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 regex library to be pre-installed on your machine. You can install it with Python pip-installer: or with the Easy Install Python module:
Notes:
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 YAML data set file. We further refer to paired-end and mate-pair libraries simply as to read-pair libraries.
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.
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.
Each read-pair library can be stored in several files or several pairs of files. Paired reads can be organized in two different ways:
For example, Illumina produces paired-end reads in two files: R1.fastq
and R2.fastq
. If you choose to store reads in file pairs make sure that for every read from R1.fastq
the corresponding paired read from R2.fastq
is placed in the respective paired file on the same line number. If you choose to use interleaved files, every read from R1.fastq
should be followed by the corresponding paired read from R2.fastq
.
If adapter and/or quality trimming software has been used prior to assembly, files with the orphan reads can be provided as 'single read files' for the corresponding read-pair library.
If you have merged some of the reads from your paired-end (not mate-pair or high-quality mate-pair) library (using tools s.a. BBMerge or STORM), you should provide the file with resulting reads as a 'merged read file' for the corresponding library.
Note that non-empty files with the remaining unmerged left/right reads (separate or interlaced) must be provided for the same library (for SPAdes to correctly detect the original read length).
In an unlikely case some of the reads from your mate-pair (or high-quality mate-pair) library are 'merged', you should provide the resulting reads as a SEPARATE single-read library.
By using command line interface, you can specify up to nine different single-read libraries. To input more libraries, you can use YAML data set file.
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.
Note, that you should not specify PacBio CLR, Sanger reads or additional contigs as single-read libraries, each of them has a separate option.
SPAdes can take as an input an unlimited number of PacBio and Oxford Nanopore libraries.
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.
For PacBio you just need to have filtered subreads in FASTQ/FASTA format. Provide these filtered subreads using --pacbio
option. Oxford Nanopore reads are provided with --nanopore
option.
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.
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 --trusted-contigs
or --untrusted-contigs
. 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.
Note, that SPAdes does not perform assembly using genomes of closely-related species. Only contigs of the same genome should be specified.
To run SPAdes from the command line, type Note that we assume that SPAdes installation directory is added to the PATH
variable (provide full path to SPAdes executable otherwise: <spades installation dir>/spades.py
).
-o <output_dir>
Specify the output directory. Required option.
--sc
This flag is required for MDA (single-cell) data.
--meta
(same as metaspades.py
)
This flag is recommended when assembling metagenomic data sets (runs metaSPAdes, see paper for more details). Currently metaSPAdes supports only a single short-read library which has to be paired-end (we hope to remove this restriction soon). In addition, you can provide long reads (e.g. using --pacbio
or --nanopore
options), but hybrid assembly for metagenomes remains an experimental pipeline and optimal performance is not guaranteed. It does not support careful mode (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.
--plasmid
(same as plasmidspades.py
)
This flag is required when assembling only plasmids from WGS data sets (runs plasmidSPAdes, see paper for the algorithm details). Note, that plasmidSPAdes is not compatible with metaSPAdes and single-cell mode. Additionally, we do not recommend to run plasmidSPAdes on more than one library. See section 3.6 for plasmidSPAdes output details.
--rna
(same as rnaspades.py
)
This flag should be used when assembling RNA-Seq data sets (runs rnaSPAdes). To learn more, see rnaSPAdes manual.
--iontorrent
This flag is required when assembling IonTorrent data. Allows BAM files as input. Carefully read section 3.3 before using this option.
--test
Runs SPAdes on the toy data set; see section 2.4.
-h
(or --help
)
Prints help.
-v
(or --version
)
Prints SPAdes version.
--only-error-correction
Performs read error correction only.
--only-assembler
Runs assembly module only.
--careful
Tries to reduce the number of mismatches and short indels. Also runs MismatchCorrector – a post processing tool, which uses BWA 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.
--continue
Continues SPAdes run from the specified output folder starting from the last available check-point. Check-points are made after:
--continue
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.If --continue
is set, the only allowed option is -o <output_dir>
.--restart-from <check_point>
Restart SPAdes run from the specified output folder starting from the specified check-point. Check-points are:
ec
– start from error correctionas
– restart assembly module from the first iterationk<int>
– restart from the iteration with specified k values, e.g. k55 (not available in RNA-Seq mode)mc
– restart mismatch correctionlast
– restart from the last available check-point (similar to --continue
)--continue
option, you can change some of the options when using --restart-from
. You can change any option except: all basic options, all options for specifying input data (including --dataset
), --only-error-correction
option and --only-assembler
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:--restart-from k55 -k 21,33,55,77 --mismatch-correction -o <previous_output_dir>
. --disable-gzip-output
Forces read error correction module not to compress the corrected reads. If this options is not set, corrected reads will be in *.fastq.gz
format.
--12 <file_name>
File with interlaced forward and reverse paired-end reads.
-1 <file_name>
File with forward reads.
-2 <file_name>
File with reverse reads.
--merged <file_name>
File with merged paired reads.
If the properties of the library permit, overlapping paired-end reads can be merged using special software.
Non-empty files with (remaining) unmerged left/right reads (separate or interlaced) must be provided for the same library for SPAdes to correctly detect the original read length.
-s <file_name>
File with unpaired reads.
--s<#> <file_name>
File for single-read library number <#>
(<#>
= 1,2,..,9). For example, for the first paired-end library the option is: --s1 <file_name>
Do not use -s
options for single-read libraries, since it specifies unpaired reads for the first paired-end library.
--pe<#>-12 <file_name>
File with interlaced reads for paired-end library number <#>
(<#>
= 1,2,..,9). For example, for the first single-read library the option is: --pe1-12 <file_name>
--pe<#>-1 <file_name>
File with left reads for paired-end library number <#>
(<#>
= 1,2,..,9).
--pe<#>-2 <file_name>
File with right reads for paired-end library number <#>
(<#>
= 1,2,..,9).
--pe<#>-m <file_name>
File with merged reads from paired-end library number <#>
(<#>
= 1,2,..,9)
If the properties of the library permit, paired reads can be merged using special software. Non-empty files with (remaining) unmerged left/right reads (separate or interlaced) must be provided for the same library for SPAdes to correctly detect the original read length.
--pe<#>-s <file_name>
File with unpaired reads from paired-end library number <#>
(<#>
= 1,2,..,9)
For example, paired reads can become unpaired during the error correction procedure.
--pe<#>-<or>
Relative orientation of read-pairs for paired-end library number <#>
(<#>
= 1,2,..,9; <or>
= 'fr','rf','ff').
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: --pe2-rf
Should not be confused with FR and RF strand-specificity for RNA-Seq data (see rnaSPAdes manual).
--mp<#>-12 <file_name>
File with interlaced reads for mate-pair library number <#>
(<#>
= 1,2,..,9).
--mp<#>-1 <file_name>
File with left reads for mate-pair library number <#>
(<#>
= 1,2,..,9).
--mp<#>-2 <file_name>
File with right reads for mate-pair library number <#>
(<#>
= 1,2,..,9).
--mp<#>-<or>
Orientation of reads for mate-pair library number <#>
(<#>
= 1,2,..,9; <or>
= 'fr','rf','ff').
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: --mp1-ff
--hqmp<#>-12 <file_name>
File with interlaced reads for high-quality mate-pair library number <#>
(<#>
= 1,2,..,9).
--hqmp<#>-1 <file_name>
File with left reads for high-quality mate-pair library number <#>
(<#>
= 1,2,..,9).
--hqmp<#>-2 <file_name>
File with right reads for high-quality mate-pair library number <#>
(<#>
= 1,2,..,9).
--hqmp<#>-s <file_name>
File with unpaired reads from high-quality mate-pair library number <#>
(<#>
= 1,2,..,9)
--hqmp<#>-<or>
Orientation of reads for high-quality mate-pair library number <#>
(<#>
= 1,2,..,9; <or>
= 'fr','rf','ff').
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: --hqmp1-rf
--nxmate<#>-1 <file_name>
File with left reads for Lucigen NxSeq® Long Mate Pair library number <#>
(<#>
= 1,2,..,9).
--nxmate<#>-2 <file_name>
File with right reads for Lucigen NxSeq® Long Mate Pair library number <#>
(<#>
= 1,2,..,9).
--pacbio <file_name>
File with PacBio CLR reads. For PacBio CCS reads use -s
option. More information on PacBio reads is provided in section 3.1.
--nanopore <file_name>
File with Oxford Nanopore reads.
--sanger <file_name>
File with Sanger reads
--trusted-contigs <file_name>
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.
--untrusted-contigs <file_name>
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.
An alternative way to specify an input data set for SPAdes is to create a YAML 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:
To properly specify a library you should provide its type and at least one file with reads. For ONT, PacBio, Sanger and contig libraries you can provide only single 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.
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.
For example, if you have one paired-end library splitted into two pairs of files:one mate-pair library:and PacBio CCS and CLR reads: YAML file should look like this:
Once you have created a YAML file save it with .yaml
extension (e.g. as my_data_set.yaml
) and run SPAdes using the --dataset
option: --dataset <your YAML file>
Notes:
--dataset
option cannot be used with any other options for specifying input data. -t <int>
(or --threads <int>
)
Number of threads. The default value is 16.
-m <int>
(or --memory <int>
)
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.
--tmp-dir <dir_name>
Set directory for temporary files from read error correction. The default value is <output_dir>/corrected/tmp
-k <int,int,...>
Comma-separated list of k-mer sizes to be used (all values must be odd, less than 128 and listed in ascending order). If --sc
is set the default values are 21,33,55. For multicell data sets K values are automatically selected using maximum read length (see note for assembling long Illumina paired reads for details). To properly select K values for IonTorrent data read section 3.3.
--cov-cutoff <float>
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.
--phred-offset <33 or 64>
PHRED quality offset for the input reads, can be either 33 or 64. It will be auto-detected if it is not specified.
To test the toy data set, you can also run the following command from the SPAdes bin
directory:
If you have your library separated into several pairs of files, for example:
make sure that corresponding files are given in the same order:
Files with interlacing paired-end reads or files with unpaired reads can be specified in any order with one file per option, for example:
If you have several paired-end and mate-pair reads, for example:
make sure that files corresponding to each library are grouped together:
If you have IonTorrent unpaired reads, PacBio CLR and additional reliable contigs:
run SPAdes with the following command:
If a single-read library is splitted into several files:
specify them as one library:
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 recommendation for long reads (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: --restart-from k77 -k 21,33,55,77,99,127 --mismatch-correction -o <previous_output_dir>
. 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.
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.
For non-trivial datasets (e.g. with high GC, low or uneven coverage) we suggest to enable single-cell mode (setting --sc
option) and use k-mer lengths of 21,33,55.
<output_dir>/assembly_graph.fastg
contains SPAdes assembly graph in FASTG format<output_dir>/contigs.paths
contains paths in the assembly graph corresponding to contigs.fasta (see details below)<output_dir>/scaffolds.paths
contains paths in the assembly graph corresponding to scaffolds.fasta (see details below) Contigs/scaffolds names in SPAdes output FASTA files have the following format: >NODE_3_length_237403_cov_243.207
Here 3
is the number of the contig/scaffold, 237403
is the sequence length in nucleotides and 243.207
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.
In general, SPAdes uses two techniques for joining contigs into scaffolds. First one relies on read pairs and tries to estimate the size of the gap separating contigs. The second one relies on the assembly graph: e.g. if two contigs are separated by a complex tandem repeat, that cannot be resolved exactly, contigs are joined into scaffold with a fixed gap size of 100 bp. Contigs produced by SPAdes do not contain N symbols.
To view FASTG and GFA files we recommend to use Bandage visualization tool. Note that sequences stored in assembly_graph.fastg
correspond to contigs before repeat resolution (edges of the assembly graph). Paths corresponding to contigs after repeat resolution (scaffolding) are stored in contigs.paths
(scaffolds.paths
) in the format accepted by Bandage (see Bandage wiki for details). The example is given below.
Let the contig with the name NODE_5_length_100000_cov_215.651
consist of the following edges of the assembly graph:
Then, contigs.paths
will contain the following record:
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 recordstates that NODE_3_length_237403_cov_243.207
corresponds to the path with 10 edges, but jumps over a gap between edges EDGE_16_length_21503_cov_482.709
and EDGE_31_length_140767_cov_220.239
.
The full list of <output_dir>
content is presented below:
SPAdes will overwrite these files and directories if they exist in the specified <output_dir>
.
plasmidSPAdes outputs only DNA sequences from putative plasmids. Output file names and formats remain the same as in SPAdes (see previous section), with the following difference. For all contig names in contigs.fasta
, scaffolds.fasta
and assembly_graph.fastg
we append suffix _component_X
, where X
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.
QUAST 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).
spades-kmercounter
you may just specify files in SPAdes-supported formats without any flags (after all options) or provide dataset description file in YAML format. Synopsis: spades-kmercount [OPTION...] <input files>
The options are:
-d, --dataset file <file name>
dataset description (in YAML format), input files ignored
-k, --kmer <int>
k-mer length (default: 21)
-t, --threads <int>
number of threads to use (default: 120)
-w, --workdir <dir name>
working directory to use (default: current directory)
-b, --bufsize <int>
sorting buffer size in bytes, per thread (default 536870912)
-h, --help
print help message
Graph construction tool spades-gbuilder
has two mandatory options: dataset description file in YAML format and an output file name.
Synopsis: spades-gbuilder <dataset description (in YAML)> <output filename> [-k <value>] [-t <value>] [-tmpdir <dir>] [-b <value>] [-unitigs -fastg -gfa -spades]
Additional options are:
-k <int>
k-mer length used for construction (must be odd)
-t <int>
number of threads
-tmpdir <dir_name>
scratch directory to use
-b <int>
sorting buffer size (per thread, in bytes)
-unitigs
k-mer length used for construction (must be odd)
-fastg
output graph in FASTG format
-gfa
output graph in GFA1 format
-spades
output graph in SPAdes internal format
A tool for aligning long reads to the graph spades-gmapper
has three mandatory options: dataset description file in YAML format, graph file in GFA format and an output file name.
Synopsis: spades-gmapper <dataset description (in YAML)> <graph (in GFA)> <output filename> [-k <value>] [-t <value>] [-tmpdir <dir>]
Additional options are:
-k <int>
k-mer length that was used for graph construction
-t <int>
number of threads
-tmpdir <dir_name>
scratch directory to use
If you use SPAdes in your research, please include Nurk, Bankevich et al., 2013 in your reference list. You may also add Bankevich, Nurk et al., 2012 instead.
In case you perform hybrid assembly ussing PacBio or Nanopore reads, you may also cite Antipov et al., 2015.
If you use multiple paired-end and/or mate-pair libraries you may also cite papers describing SPAdes repeat resolution algorithms Prjibelski et al., 2014 and Vasilinetc et al., 2015.
If you use plasmidSPAdes please cite Antipov et al., 2016.
For rnaSPAdes citation use Bushmanova et al., 2018.
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 spades.support@cab.spbu.ru.
You can leave your comments and bug reports at our GitHub repository tracker or sent it via e-mail: spades.support@cab.spbu.ru.