var pedigree = pedcache.current(opts);
Where 'opts' is the options used to intialise pedigreejs. This returns the pedigree data in JSON format. A search routine can then be implemented to interogate this, see example 8.
'pedigreejs' will validate the pedigree data loaded into the interface by default. It will check the existence of parents and that the sex of the mother is female and the father is male. Also it checks that the unique name exists and is unique for each individual in the pedigree. Errors are returned, e.g.
NON-UNIQUE NAME: f21 MOTHERS SEX NOT FEMALE: M MISSING FATHER FOR ch1
Alternatively a function can be passed to the 'validate' configuration option (see example 6) and define any validation requirements necessary.
The 'labels' configuration option is used to determine what annotations are displayed under each of the individuals in the pedigree. So that it is possible to customise different attributes to be shown.
A default data dialog is displayed when clicking on the icon. It shows the individual's details (e.g. name, age, sex). It is possible to implement and customise a data editor specific to the data set of interest by passing a function to as an option when configuring pedigreejs. See example 3. Alternatively set 'edit' in the configuration to false to disable and hide the data dialog.
pip install jasmine jasmine
Then visit 0.0.0.0:8888 in a web-browser to run the tests.