EuracBiomedicalResearch / FamAgg

This is the development version of the FamAgg Bioconductor package.
https://EuracBiomedicalResearch.github.io/FamAgg
MIT License
0 stars 2 forks source link

Write Haplopainter input file independently of chosen pedigree plotting method #23

Closed the-x-at closed 3 years ago

the-x-at commented 3 years ago

An input file for Haplopainter pedigree plotting software can be written by FamAgg only if the plotting method is set to haplopaint via a call to switchPlotFun. When this call is done, the package checks if Haplopainter is installed by trying to run a simple pedigree rendering. If this fails, FamAgg falls back to kinship2-based plotting. This way an input file for later Haplopainter invocation can never be written. This scenario may happen (and has already happened to the unfortunate issue submitter) on a server installation where Haplopainter was not installed, but the FamAgg user wants to draw pedigrees on another machine where that software is installed, for example when preparing publication figures.

jorainer commented 3 years ago

I guess a simple helper function a la writeHaplopainterFile should suffice? The unfortunate user (😄 ) could then invoke this function directly.

jorainer commented 3 years ago

I assigned you to this @the-x-at - hoping you have the time to dig into this 😉

the-x-at commented 3 years ago

Unfortunately, things are not that straight forward. The option to write a haplopainter output file is passed to plotting-functions.R::haplopaint (called via plotting-functions.R::doPlotPed), which first generates a suitable data frame and then sees whether to render the pedigree or output the text file. Things are a bit nested here. I will see if this can be deconvoluted.