************************************************
* Organized the repository to manage branches. *
************************************************

Everything you already know has been moved to "trunk"
Added a "branches" directory with 2 subdirectories "releases" and "features"
  * "releases" will be used for branches related to a given release, e.g. when a change to post-treatments are needed for the analysis of data generated using that release.
    For example: I am analysing data that I generated using versions 2.1.2 of the code. I hence created the branch "releases/aevol-2.1.2" so that I can code my post-treatments in a properly versionned way. These development may (depending on the level of specificity) be added to the trunk eventually (using svn merge)
  * "features" is meant to be used when developing a new feature that takes time developing. This will enable us to use svn feature more thouroughly, e.g. commit more often (even "unstable" versions) in a personal branch of the svn.

If you don't want to use branches or if you just want to be able to update regularly, you need not change your habits, just add "/trunk" when you check out
=> "svn checkout svn+ssh://username@svn.gforge.liris.cnrs.fr/svnroot/aevol/trunk"

Questions/remarks are welcome!
David




git-svn-id: svn+ssh://svn.gforge.liris.cnrs.fr/svnroot/aevol/trunk@181 fea4e401-09a1-4513-ac43-d68ac1e0e106
Some changes we had made in the post-treatments had been lost during a merge operation a few months ago, put them back in.

Completely changed the code organization in ancstats, a great bunch of code was duplicated...
WARNING : if you want some specific outputs, you will have to uncomment some function calls in the main. Look for "// Optional ouputs" comments.

The "zones" output of ancstats should now be fully functional for any number of zones.




git-svn-id: svn+ssh://svn.gforge.liris.cnrs.fr/svnroot/aevol/trunk@182 fea4e401-09a1-4513-ac43-d68ac1e0e106
Ported r182 from branch/release/aevol-2.1.2


git-svn-id: svn+ssh://svn.gforge.liris.cnrs.fr/svnroot/aevol/trunk@183 fea4e401-09a1-4513-ac43-d68ac1e0e106
******************** WARNING ********************
A major bug was introduced in revision 180: the indices of the individuals are not consistent.
All the revision from 180 to this one (both included) and the release aevol-2.3.0 are not fully functional
It would be best not to use them at all!

This version is NOT functional, I will work hard on getting everything back to order. In the meantime, use aevol-2.2.0 (corresponding to rev 179)




git-svn-id: svn+ssh://svn.gforge.liris.cnrs.fr/svnroot/aevol/trunk@185 fea4e401-09a1-4513-ac43-d68ac1e0e106
OK, now everything looks fine.
The index of an individual is no longer equal to its rank. It is now arbitrarily set to a number in [0 ; pop_size[ in the order of creation.
The rank of the individual is now stored in a separate attribute, but it is not saved in the backup since it can be easily retreived (indivs are stored sorted by increasing rank. Ranks go from 1 to pop_size, indiv with rank = pop_size is the best (highest fitness).
You can now give either the rank or the index of the individual you want the lineage (option -r for the rank, -i for the index

Other changes :
  * Added a padding column in stat_fitness_best.out file so that the column numbers match with the stat_fitness_glob.out file.
  * Changed the way we name "degenerated genes/proteins": they are now called "non metabolic". => related stats are now "metabolic" instead of "non_null" and "non_metabolic" instead of "null".
  * Genes that lack a kind of codons (M, W or H) are now considered non metabolic. This is to get rid of an unwanted bias due to weird values of the parameters in the absence of any corresponding codon : default was MIN_? => 0 for M and W and -1 for H!!!!
    Some former metabolic genes will now be considered non metabolic and hence have no phenotypic contribution (even though they would have a non-null area if considered metabolic".
    Example : in earlier versions, protein "H1W1" coded for a triangle of heigth MAX_H and width MAX_W centered at MIN_X (i.e. 0 in most cases). It will now be considered non metabolic and will not have any influence on the phenotype.



git-svn-id: svn+ssh://svn.gforge.liris.cnrs.fr/svnroot/aevol/trunk@186 fea4e401-09a1-4513-ac43-d68ac1e0e106
Terminology/syntax adjustment. 

All references to metabolic/non-metabolic proteins have been changed to 
functional/non-functional proteins. Non-functional proteins are proteins 
that either have height or width of zero, or are missing codons for one 
of the three necessary features (W, H, M). Referring to them as 
metabolic creates potential confusion with fitness components, where now 
we have metabolic component of the fitness as well as non-metabolic 
(such as secretion) components. In the future, metabolic gene will refer 
to a gene that codes for a protein on the metabolic segment of the axis. 

The changes included variables that contain _met_ , now _fun_, as well as 
_nm_ (number of metaboilc), now _nf_.



git-svn-id: svn+ssh://svn.gforge.liris.cnrs.fr/svnroot/aevol/trunk@188 fea4e401-09a1-4513-ac43-d68ac1e0e106
Ported changes made in branches/release/aevol-2.4.0/src@187 into the trunk.


git-svn-id: svn+ssh://svn.gforge.liris.cnrs.fr/svnroot/aevol/trunk@189 fea4e401-09a1-4513-ac43-d68ac1e0e106
========== Trunk Commit ==========
 * Added a new type of stat files : stat_rear_*.out that stats the actual rearrangement rates for each type of rearrangement as well as the mean alignment scores that were found. This file is written only when with_alignments is set to true.
   
 
 * Stat files management was beginning to get very messy so I've completely reorganized the ae_stats class.
   This class has now 2 attributes _stat_files and _stat_files_names that are 3D tables of the stat files (FILE*) and their names (char*) whose dimensions are given by :
    + genetic unit (ALL_GU, CHROM or PLASMIDS)
    + BEST or GLOB
    + stat type (FITNESS_STATS, MUTATION_STATS, GENES_STATS, BP_STATS or REAR_STATS)
  A file will be written iff it has been given a name (i.e. the corresponding cell in the name table is not NULL).
 For now, the names are given automatically according to the parameters (especially allow_plasmids and with_alignements), but we could easily handle this wih dedicated parameters if need be.
   
 
 * I've changed the structure of tree file nodes. They no longer contain data about their parent or donnor (save their index) nor anything regarding secretion. The values stored in a tree file are now : 
    + int32_t         _index;
    + int32_t         _rank;
    + int32_t         _parent_index;
    + int32_t         _donnor_index;    
    + int32_t         _genome_size;
    + int32_t         _metabolic_error;
    + int16_t         _nb_genes_activ;
    + int16_t         _nb_genes_inhib;
    + int16_t         _nb_non_fun_genes;
    + int16_t         _nb_coding_RNAs;
    + int16_t         _nb_non_coding_RNAs;
    + int32_t Number of dna_replic_reports
    + For each dna_replic_report
      - int32_t nb_rears
      - List of rearrangements
      - int32_t nb_muts
      - List of mutations
  The name of the methods called to write the tree file were confusing ("write_to_backup"), I-ve changed them to "write_to_tree_file". It's worth noting that it does not write all the attributes of the class in the file. If this is needed at some stage, we could write a new method called write_to_backup to do it. We could also write a function write_to_lineage_file but for now, it would be identical to write_to_tree_file.
      
      
  * Among the other minor changes, I think this one should appear here :
  When we create a new individual from a parent, i.e. when we call ae_individual::ae_individual( ae_individual* const parent, int32_t index ), the data regarding the parent (and donnor) in the new replication_report are set directly in the constructor of ae_replication_report. It hence hence up to date at any moment and not only after the mutation/rearrangement process as it was.
  
  
  
  
Any comments (and of course questions) are welcome!


git-svn-id: svn+ssh://svn.gforge.liris.cnrs.fr/svnroot/aevol/trunk@190 fea4e401-09a1-4513-ac43-d68ac1e0e106
========== Trunk Commit ==========
BUGFIX : in ae_replication_report, _metabolic_error was declared as int32_t instead of double

This update will be forwarded to aevol-2.5.0




git-svn-id: svn+ssh://svn.gforge.liris.cnrs.fr/svnroot/aevol/trunk@191 fea4e401-09a1-4513-ac43-d68ac1e0e106
========== TRUNK COMMIT ==========
Brief:
  * ALIGNMENTS:     Added / modified parameters regarding alignments
  * LOGS:           Added a flush on log files at every backup
  * BUFIX:          Last line in param.in was ignored when there was no new line at end of file.
  * MINOR CHANGES:  Standard conformation related changes

Details:
  * ALIGNMENTS:
      Added the possibility to use a sigmoid function instead of a piecewise linear function as the DISTRIBUTION FUNCTION of the probability of rearrangement for a given alignment score. We will use 2 parameters lambda and mean.
        
      The distribution function will then be:    1 / ( 1 + exp( -(score-mean)/lambda ) )
        
      The param.in line must now comply with the following grammar:
      ALIGN_FUNCTION     LINEAR [min_score max_score]  |  SIGMOID [lambda mean]
      
      Default is SIGMOID 4 50
      These values seem to yield a fair tradeoff between homologous and non-homologous recombination
      


git-svn-id: svn+ssh://svn.gforge.liris.cnrs.fr/svnroot/aevol/trunk@192 fea4e401-09a1-4513-ac43-d68ac1e0e106
========== TRUNK COMMIT ==========
Added headers to log files (variable column number in rearrangement log caused R to missinterpret data



git-svn-id: svn+ssh://svn.gforge.liris.cnrs.fr/svnroot/aevol/trunk@193 fea4e401-09a1-4513-ac43-d68ac1e0e106
========== TRUNK COMMIT ==========
Minor bugfix in alignment scores

Sorry for all these rather small commits.



git-svn-id: svn+ssh://svn.gforge.liris.cnrs.fr/svnroot/aevol/trunk@194 fea4e401-09a1-4513-ac43-d68ac1e0e106
========== TRUNK COMMIT ==========
Minor bug corrections :
  * A test was missing in ae_log, causing a seg fault when the logs were off...
  * Values for rearrangement rates in stat_rear_????.out were too small for a "%f" format, switched to %e

Changed naming convention of lineage and ancstats output files. No reference is made to either the rank or the index of the considered individual.





git-svn-id: svn+ssh://svn.gforge.liris.cnrs.fr/svnroot/aevol/trunk@195 fea4e401-09a1-4513-ac43-d68ac1e0e106
============================================================
=                   WARNING - MAJOR BUGFIX                 =
============================================================
Some rare events could affect the list of promoters (introducing a shift, leaving a no longer existing promoter in the list or not find a newly created promoter).

Details :
  * Small deletions containing OriC could create a shift in the list of promoters.
  * Small insertions that made the size of the genome grow from less than PROM_SIZE
    to at least PROM_SIZE could "miss" a newly created promoter.
  * Small deletions that made the genome shrink to less than PROM_SIZE could leave a "ghost" promoter in the list.   
  * When the genome size was exactly PROM_SIZE, the promoter search process wasn't done properly


I had tested the rearrangement processes very hard, they appear to be exempt of such problems.
I had not tested the point mutations and the indels as thoroughly as the rearrangement processes.
As these events are rare (and almost never happen with some sets of parameters) these errors managed to sneeked through the tests.

I added a complete assertion of RNA lists at every replication when on DEBUG mode.
The DEBUG mode is hence A LOT SLOWER than the "normal" mode but it's a price I'm willing to pay to avoid such problems!
We could think of using several debug modes but...

**********************************************************************
*  Most importantly, we should periodically run long tests in DEBUG  *
*  mode (maybe 10000 generations) on different sets of parameters to *
*  make sure everything is fine!                                     *
**********************************************************************




I changed / added functions that remove promoters or look for new promoters in ae_genetic_unit
and I added a great bunch of comments explaining precisely what functions do.
I spent quite some time trying to get these comments to show up properly in the doxygen doc so
they can be used as examples for further function documentation.
I also added a "collaboration diagram" for each class in the doc. They are far from perfect
(especially because we use a lot of ae_list), but they could help a newcomer a lot and could
also be used as a starting point for a hand made diagram.





git-svn-id: svn+ssh://svn.gforge.liris.cnrs.fr/svnroot/aevol/trunk@198 fea4e401-09a1-4513-ac43-d68ac1e0e106
********** TRUNK COMMIT **********\n correction of a small (but highly visible ;) bug in RNA and CDS display

git-svn-id: svn+ssh://svn.gforge.liris.cnrs.fr/svnroot/aevol/trunk@199 fea4e401-09a1-4513-ac43-d68ac1e0e106
just a test



git-svn-id: svn+ssh://svn.gforge.liris.cnrs.fr/svnroot/aevol/trunk@203 fea4e401-09a1-4513-ac43-d68ac1e0e106
Patch : ae_individual.cpp function reevaluate

_transcribed, _translated and _folded booleans weren't set to false whereas tabs containing RNAs, Genes, Prot were reinitialised.
It was causing a fitness flat of all individuals were calling reevaluate function.

After patch : fitness given the first time and fitness given by reevaluate are the same.


git-svn-id: svn+ssh://svn.gforge.liris.cnrs.fr/svnroot/aevol/trunk@204 fea4e401-09a1-4513-ac43-d68ac1e0e106
####### Patch : case of bad files when restarting ####
Before : 
When giving a best.ae or if *.out files where missing, result was a segfault
2 modifications :
* Reject *best*.ae files for restart
* Print a message if *.out files are not in the directory


git-svn-id: svn+ssh://svn.gforge.liris.cnrs.fr/svnroot/aevol/trunk@210 fea4e401-09a1-4513-ac43-d68ac1e0e106
###### Fix help mistake####
In examples, only one "-" before a single-letter parameter command


git-svn-id: svn+ssh://svn.gforge.liris.cnrs.fr/svnroot/aevol/trunk@211 fea4e401-09a1-4513-ac43-d68ac1e0e106
========== In TRUNK ==========
Ported feature TRANSFER

Log overview (see previous logs for more details)
------------------------------------------------------------------------
NEW
  * Added 2 parameters TRANSFER_INS_RATE and TRANSFER_REPL_RATE to set the rate of insertion (resp. replacement) transfer.
    Default: 0.0 => No transfer.
    Both rates are per replication rates and trigger a transfer attempt (the actual occurrence of a transfer event will depend on whether an alignment is found). There can be at most one transfer of each type per replication.
  * Every possible ae_mutation now has a _length
  * Added method ae_dna::copy_into_new_GU( int32_t pos_1, int32_t pos_2 ) const
  * Added method inline void ae_genetic_unit::copy_promoters_included_in( int32_t pos_1, int32_t pos_2, ae_list** new_promoter_lists )
  * An ae_vis_a_vis now contains its score
  * Added a header for R in the output file of fixed_mutations
  * Added a new post-treatment "mutagenesis"
  * Added checking options (NO_CHECK / LIGHT_CHECK / FULL_CHECK) to the "fixed_mutations" post-treatment
  * Added a log file for transfer. Keyword TRANSFER, file name log_transfer.out
  * Added a test case for transfer.
  * New file ae_enums.h
  
MODIFIED
  * Moved the replication procedure to ae_population.
  * Deported the genome size barrier checks one level up ( e.g. from do_deletion( pos_1, pos_2 ) to do_deletion() and do_rearrangements_with_align() ).
  * Method void ae_genetic_unit::copy_lagging_promoters_starting_between( int32_t pos_1, int32_t pos_2, ae_list* new_promoter_list ) no longer has the ( pos_1 > pos_2 ) prerequisite
  * Renamed class utils to ae_utils
  
BUGFIX
  * Replaying a translocation when alignments are on could cause an error
  * The -c (or --fullcheck) option in lineage was not declared hence didn't work...
  * ae_individual::reevaluate( ae_environment* envir ) didn't reset the (new) attributes _transcribed, _translated and _folded yielding a flat fitness.
  * In post-treatments that deleted ae_common::sim, ae_dna::undergo_this_mutation( ae_mutation * mut ) could check whether it had to write in the BARRIER log. It hence tried to access a member of ae_common::sim that was NULL.
  * LOADS and BARRIER logs now work correctly
  * There were some inconsistencies with Whole Genome Events (i.e. Whole Genome Duplications)
------------------------------------------------------------------------




git-svn-id: svn+ssh://svn.gforge.liris.cnrs.fr/svnroot/aevol/trunk@217 fea4e401-09a1-4513-ac43-d68ac1e0e106