/***************************************************/
/*          How to compile PopPhyl tools:          */
/***************************************************/

1) Jump into the src directory
2) Jump into the directory of one of the tool (sam2alr, reads2snp, dNdSpiNpiS, Site_frequency_spectra)
3) Edit the source codes if you need to
4) Execute the "make" command in the directory containing the "makefile"

Q: Compilation fails due to the dependancie with PopPhyl_Commons, what can I do ?

A: If you are not using a 64 bits Linux distribution, you might need to recompile the PopPhyl_Commons library to generate the libPopPhyl_Commons.a file.
This file has to be placed in the lib directory to allow the use of the makefile of some of the programs provided with this package.


/***************************************************/
/*        About the local Bio++ bpp-popgen:        */
/***************************************************/

The version of the bpp-popgen library (version 2.0.3) installed by Synaptic (or another similar program) on Ubuntu 12.04 contains a bug that prevents the compilation of some PopPhyl-tools.

Therefore, to avoid compilation problems, we provide a valid version of this library (downloaded from the Bio++ website) in the bpp-popgen directory of this package.


Note that if you had installed Bio++ directly from the source, you can edit the various makefiles and remove every reference to the local bpp-popgen copy in it.

For example in dNdSpiNpiS, replace the two following lines:

LIBPATH=-L../../lib/ -L../bpp-popgen/bpp-popgen-2.0.3/src/ -L$(BPP)/lib/
SRC=-I../PopPhyl_Commons/ -I../bpp-popgen/bpp-popgen-2.0.3/src/ -I$(BPP)include/

by:

LIBPATH=-L../../lib/ -L$(BPP)/lib/
SRC=-I../PopPhyl_Commons/ -I$(BPP)include/


/***************************************************/
/*            How to use PopPhyl tools:            */
/***************************************************/

Each PopPhyl executable has an help method that describes its parameters.

Just run this executable without any parameters (or with the -h/--help) to display the help section.


/***************************************************/
/*              Help section example:              */
/***************************************************/

(14:36:23) user@workstation: ~$ dNdSpiNpiS
#################################################
#           dNdSpiNpiS - Help section           #
#################################################
Version: 3 (12-06-2013)

Usage example (minimal):

dNdSpiNpiS -alignment_file=seqfile.pfas -ingroup=Species_name_1

Usage example (with optional parameters):

dNdSpiNpiS -alignment_file=seqfile.pfas -population_file=custom_pop.txt -ingroup=Species_name_1 -outgroup=Species_name_2 -gc_bin=8 -gapN_site=10 -gapN_seq=0.5 -min_nb_codon=10 -kappa=1 -remove_frameshift=no -compute_distances=no -tolerance_zone=20 -allow_internal_bc=no -print_header=yes -contig_usage=all -out=dNdSpiNpiS_output


Mandatory parameters:

-alignment_file:       Alignment input file in Fasta/PseudoFasta format (With sequence names like: >Contig_name|Species_name|Individual_name|Allele_number)
-ingroup:              Name of the ingroup/focal species

Optional parameters:

-population_file:      Text file containing a list of individuals (from the focal species) on each line
                       If not specified, all ingroup's individuals will be used in one unique population
-outgroup:             Name of the main outgroup/external species
-gc_bin:               Number of class/bin for GC allele frequency [>0 - Default: 8]
-gapN_site:            Minimum number of focal sequences without an undetermined character (or a gap) required to keep a given site [>0 - Default: 10]
-gapN_seq:             Maximum tolerated proportion of undetermined characters (or gap) to keep a given sequence [0 to 1 - Default: 0.5]
-min_nb_codon:         Minimum number of complete codons required to perform calculations [>0 - Default: 10]
-kappa:                Transition/Transversion ratio "Kappa" to use in SequenceStatistics methods [>0 - Default: 1]
-remove_frameshift:    Reject (1/true/yes) or accept (0/false/no) all frameshift-containing contigs [Default: no]
-compute_distances:    Define if the distances between individuals must be computed (1/true/yes) or not (0/false/no) [Default: no]
-tolerance_zone:       Number of initial/terminal positions in which Stop codons or FrameShift codons are tolerated [>0 - Default: 20]
-allow_internal_bc:    Allow/Tolerate internal "bad codons" (i.e. Stop or FrameShift codons between the two tolerance zones) and replace them by NNN (1/true/yes) or reject corresponding dataset/contig (0/false/no) [Default: no]
-print_header:         Define if the header line must be output (1/true/yes), or not (0/false/no) [0 or 1 - Default: yes]
-contig_usage:         Define if 'all' the contigs, 'even' contigs or 'odd' contigs must be used for dNdSpiNpiS summary [Default: all - Possible values: all, even, odd]

-out:                  Name of dNdSpiNpiS main output file (Population genetics)
                       If not specified, a default name (derived from the name of the Fasta/PseudoFasta input file) will be used
-debug_mode:           Activate/Desactivate debug mode [Default: no]

Optional bootstrap related parameters:

-bs_replicates:        Number of bootstrap resampling to execute [>1 - Default: 10000]
-bs_sort:              Sort precision for the confidence interval [>1 - Default: 1000000]
-bs_confidence:        Percentage of confidence [0 to 1 - Default: 0.95]
