phenotips / open-pedigree

A free and open-source pedigree tool by PhenoTips®
GNU Lesser General Public License v2.1
46 stars 25 forks source link

Cannot import exported PED #4

Closed dconlan closed 4 years ago

dconlan commented 4 years ago

If you create a graph and export as PED, the resulting file does not import, instead you get the error:

Error importing pedigree: Input line has not enough columns: [Proband Father Mother 1 -9]

PED output:

Proband Father Mother 1 -9
Mother 0 0 2 -9
Father 0 0 1 -9

Looking at the export.js

 * PED format:
 * (from http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml#ped)
 *   Family ID
 *   Individual ID
 *   Paternal ID
 *   Maternal ID
 *   Sex (1=male; 2=female; other=unknown)
 *   Phenotype
 *
 *   Phenotype, by default, should be coded as:
 *      -9 missing
 *       0 missing
 *       1 unaffected
 *       2 affected

The output PED does not include a family id, so adding a family id to each line fixes the import.

buske commented 4 years ago

Oooph, looks like a careless mistake on my part when removing XWiki references. Fixing now with a placeholder family ID.

buske commented 4 years ago

@dconlan Thanks for reporting this!