Difference between revisions of "merge"

From GeneWeb
Jump to: navigation, search
(Concatenation of bases)
(Concatenation of bases)
Line 21: Line 21:
 
[[File:Merge2.JPG|thumb|right|400px|Merging bases in [[gwsetup|gwsetup]]: confirmation.]]
 
[[File:Merge2.JPG|thumb|right|400px|Merging bases in [[gwsetup|gwsetup]]: confirmation.]]
  
It is possible that gwc will display error messages triggered by persons bearing the same lastname, firstname, occurence combination in both bases. To remove this errors, the gwc option {{c|-sep}} will offset automatically occurence numbers thus avoiding confilcts: <!-- are all occurrences offset ?? -->
+
It is possible that gwc will display error messages triggered by persons bearing the same lastname, firstname, occurence combination in both bases.  
:
+
:To remove this errors, the gwc option {{c|-sep}} will offset automatically occurence numbers thus avoiding confilcts: <!-- are all occurrences offset ?? -->
:
+
 
 
<pre>gwc toto.gw -sep titi.gw -o tutu</pre>
 
<pre>gwc toto.gw -sep titi.gw -o tutu</pre>
 
Note: in order to give you more control over this process, an additional parameter forcing the offset to a specified value.
 
Note: in order to give you more control over this process, an additional parameter forcing the offset to a specified value.

Revision as of 19:05, 20 October 2015

150px-Geographylogo svg.png Language: English • français

This section explains how to "merge multiple GeneWeb bases".

Merging bases is performed in three steps: concatenation of bases, suppression of redendant "doubles", cleanup.

If you are not specialists of terminal command lines, you may use gwsetup which will guide you if the bases are already installed in your environment.

Merging bases in gwsetup: choosing bases to merge.

Concatenation of bases

If you have two bases toto et titi, create the corresponding GW format files with the gwu command :

gwu toto > toto.gw
gwu titi > titi.gw

Create a new union base, for instance tutu, with the gwc command: 

gwc toto.gw titi.gw -o tutu
Merging bases in gwsetup: confirmation.

It is possible that gwc will display error messages triggered by persons bearing the same lastname, firstname, occurence combination in both bases.

To remove this errors, the gwc option -sep will offset automatically occurence numbers thus avoiding confilcts:
gwc toto.gw -sep titi.gw -o tutu

Note: in order to give you more control over this process, an additional parameter forcing the offset to a specified value.

You now have a valid base named tutu containing the sum of the two previous bases, and you can proceed to update the content of this new base, in particular merging multiply defined persons as explained below. GeneWeb maintains the memory of which file data about each family came from, and you will later be able to reconstruct those files as explaine here.

In order to determine which file a particular family comes from, add ;opt=from tu the URL as in:

http://localhost:2317/tutu?i=357;opt=from

Merging persons

After concatenation of several bases, with or without the -sep option, you may have persons multiply defined in your new base. In order to merge these double entries, you must follow the instructions of the section on merging two persons or families as much as needed.

Cleanup

After this person and families merging steps, the memory space used by these doubles is not automatically reclaimes (you will notice that the total number of persons in the base remains constant). It is therefore useful to perform a cleanup of the new base:

gwu tutu > tutu.gw
gwc tutu.gw -o tutu

If you know you want to suppress the uncompressed version of the new base, use option -f:

gwc tutu.gw -o toto -f