Quick Start

A 5 Minutes Introduction On Using SMARTPOP v2.0ΒΆ

Once installed, you should be ready to run SMARTPOP.

Create a new directory for your project (e.g. qstart).

mkdir qstart
cd qstart

Remember to call SMARTPOP from where it is located, or include the software in your PATH. The following command line will start 100 simulations with 1000 individuals. Use the -v flag (verbose) to generate comments from the software in the terminal.

./smartpop -p 1000 --nsimu 100 -v

Control the sequence length (per locus) you wish to simulate with the --sizeMt (mitochondria), --sizeY (Y chromosome), --nbLociX (X chromosome), --sizeX, --nbLociA (autosomes) and --sizeA flags. Let's simulate sequences on the mitochondrial DNA, non recombining Y, and X chromosome, as well as two autosomal loci, all of size 320bp.

smartpop -p 1000 --nsimu 100 -v --sizeMt 320 --sizeY 320 --nbLociX 1 --sizeX 320 --nbLociA 2 --sizeA 320

SMARTPOP v2.0 can simulate mutiple communities you must use the option --npop X with X being the number of communities. For example to simulate 10 communities of 1000 individual each.

smartpop -p 1000 --npop 20 --nsimu 100 -v --sizeMt 320 --sizeY 320 --nbLociX 1 --sizeX 320 --nbLociA 2 --sizeA 320

To control the migration rates between communities the options --mig X Y Z to set a migration of Z individuals per generation from community X to community Z. These rates can be sex specific using the options --migf for female rates and --migm for male migration rate.

smartpop -p 1000 --npop 20 --nsimu 100 -v --sizeMt 320 --sizeY 320 --nbLociX 1 --sizeX 320 --nbLociA 2 --sizeA 320 --mig 1 2 0.1 --mig 2 3 0.1 --mig 3 4 0.1 --migf 4 5 0.1 --migm 4 5 0.05

It is also possible to add the number of generations to run for using the -t flag (e.g. 200 generations).

smartpop -p 1000 --nsimu 100 --sizeMt 320 --sizeY 320 --nbLociX 1 --sizeX 320 --nbLociA 2 -sizeA 320 -t 200 -v

If you only wish to look at the mitochondrial DNA and Y chromosome patterns, you can remove the X chromosome and autosomes from the simulations by setting their locus size or their number of locus to 0.

smartpop -p 1000 --nsimu 100 --sizeMt 320 --sizeY 320 --nbLociX 0 --nbLociA 0 -t 200 -v

It is recommended that you rename your files to something meaningful. In this case, let's rename the output qstart_simu:

smartpop -p 1000 --nsimu 100 --sizeMt 320 --sizeY 320 --nbLociX 1 --sizeX 320 --nbLociA 2 --sizeA 320 -t 200 -o qstart_simu -v

Check in the folder too see that two new files have been created: qstart_simuMt and qstart_simuY. The first file contains diversity values for the mitochondrial DNA dataset; the second is for the Y chromosome.

To run the results of simulations through other software (such as Compute from libSequence), output DNA sequence for the population, at the end of the run in fasta format. The option -o qstart_simu will provide the root name for the file name. A suffix Z_X.fasta will be be added to this name with X being the simulation number and Z being the type of DNA. This time, four files are created per simulation, one per type of DNA. Keep in mind that this will create a large number of files.

smartpop -p 1000 --nsimu 100 --sizeMt 320 --sizeY 320 --nbLociX 1 --sizeX 320 --nbLociA 2 --sizeA 320 -t 200 --fasta -o qstart_simu -v

Estimators are calculated on a sample instead of the whole population, which better represents real data. Choose the option --sample X with X being the sample size to produce all the chosen outputs (fasta, Arlequin or SMARTPOP diversity files) for only a random sample of the population.

smartpop -p 1000 --nsimu 100 --sizeMt 320 --sizeY 320 --nbLociX 1 --sizeX 320 --nbLociA 2 --sizeA 320 -t 200 --fasta -o qstart_simu_sampled --sample 10 -v

To deal with multiple communities, three schemes for sampling are available: local (randomly sample in only on community), pooled (randomly sample across a subset of community) and scattered (randomly sample a set number of individuals in every community). Choose the option --local ,--pooled or --scattered .

smartpop -p 1000 --npop 10 --nsimu 100 --sizeMt 320 --sizeY 320 --nbLociX 1 --sizeX 320 --nbLociA 2 --sizeA 320 -t 200 --fasta -o qstart_simu_sampled --sample 10 --pooled --nsamplepop 5 -v

For more information about how to run SMARTPOP, see the examples , the full manual and the original paper.

For any use of SMARTPOP or re-use of its code source please cite: Guillot and Cox 2014. SMARTPOP: inferring the impact of social dynamics on genetic diversity through high speed simulations. BMC Bioinformatics 15:175