Import and Export
Import pedigree from a CSV file
1. CSV (comma separated values) file format
You can import pedigrees from a CSV file.
The first 5 columns in the CSV file must have the following format:
» Family ID | Individual ID | Father ID | Mother ID | Gender «
- Family ID: Optional (can be ommitted) | string or integer
- Individual ID: Mandatory | Unique integer > 0
(if you have Family ID-Individual ID separated by a hyphen in a single column, PED should recognize this) - Father ID: Mandatory | integer >= 0
- Mother ID: Mandatory | integer >= 0
- Gender: 0 (unknown), 1 (male), 2 (female)
The next two columns are optional.
If present, they must follow these rules:
- Phenotype or affection status:
Integer 0 .. 29
1 = unaffected, 2 = affected, 0 = unknown
Up to 30 different phenotypes (= symbols) can be be displayed automatically, according to the current available phenotypes in the input window (see Phenotypes menu). Phenotypes outside 0..29 will be treated as '0' (unknown). - 'Markers' like 'arrow', 'deceased' (these are not dna markers !)
Integer 0 .. 63
arrow = 1, deceased = 2, both = 3, ...
Use this column if you export / import pedigrees from / to PED
All other columns are totally optional
- 0 .. 4 subsequent columns with items that will be displayed around the symbol (from top left to right bottom)
- All other subsequent columns - if any - in the CSV file will be displayed below the symbol, in one or two columns
2. Imports that will work, and those that won't:
Some rules to obey
- All pedigrees exported from PED's Input pane as CSV file can be
re-imported - with one exception:
If the consultands or probands (i.e. the first pair of symbols displayed in the Input pane) have no children, they cannot be recognized as partners. In a pedigree drawing in input pane (as well as in a linkage file), partners can only exist if they have at least one child in common. For an explanation please take a look at the CSV file format.
(This will not be a problem if you export / import as PIP file) - Pedigrees that cannot be drawn interactively in PED's input pane also cannot be imported:
e.g, pedigrees that harbour loops (two brothers marry two sisters, consanguinities) - Members from a CSV file that cannot be entered in Input pane cannot be imported :
e.g., the parents of a partner of a child of the probands. In the following pedigree, the probands are colored red, and the female "partner", whose parents cannot be imported, is yellow:

Of course, these parents (and anything else) can easily be drawn in the edit pane:
3. Import a pedigree from the CSV file shown at the previous page
This is the CSV file opened in a text editor:
family,ID,father,mother,gender,phenotype,arrow,Text 1,Text 2,Text 3,Text 4,M 1,M 2,M 3,M 4,M 5,M 6,M 7,M 8,
0,1,5,6,1,8,1,John,Doe,12-12-1950,,HNCCP,50,D123-45-2005,XYZ1,c.123G>T,c.456G>T,ABC1,c.333G>C,
0,2,7,8,2,2,1,,,,,,,,,,,,,
0,3,1,2,1,3,0,,,,,,,,,,,,,
0,4,1,2,2,17,0,,,,,,,,,,,,,
0,5,0,0,1,1,0,,,,,,,,,,,,,
0,6,0,0,2,8,2,,,,,,,,,,,,,
0,7,0,0,1,1,2,,,,,,,,,,,,,
0,8,0,0,2,1,2,,,,,,,,,,,,,
This is the same file opened in OpenOffice.org:

Be sure that the file format follows the rules given above.
In PED input pane, press the Import button:

In the File dialog that opens, enter as file type CSV, then choose the appropriate file:

After you press the Open button, the import wizard will be launched.
The top pane of each of the 6 pages of the wizard - hopefully - contains all
information you need to import a CSV file:
This is the first page of the import wizard:

This is page 5 of the import wizard:

This is the final page of the import wizard:

After pressing the Finish button, here is the pedigree you got from this file:

Remember: Imported pedigrees know nothing about a "best" layout. To restore the pedigree from the previous page, you have to adjust background / line / text colors, and the distance between symbols. Also notice that import / export does not distinguish between the various kinds of arrows available in PED. If an arrow is imported, always the default arrow will be displayed.
