Open danielreti opened 1 year ago
It's also worth noting that seqr uses PedigreeJS already, so having the same pedigree drawings in both systems would be nice.
How does seqr deal with the integration issues that you've run into with PedigreeJS?
So seqr lists a specific PedigreeJS commit as a dependency and are using the package that way (which is totally fine). I just think things like not being able to have single parents (https://github.com/CCGE-BOADICEA/pedigreejs/issues/120), not being able to modify any of the styling and not passing down click events are reasons enough to not want to use it.
I don't see using our own viewer as being a lot of work or a lot of ongoing maintenance, the function I've written now works quite well I daresay on the requested test sets and we can slowly just layer in more functionality as we need to generate more complex pedigrees.
Realised you may not have seen my response @lgruen (can't quite tell who GitHub notifies)
Those are great points, but why not contribute to PedigreeJS to get this implemented instead of coming up with yet another implementation?
Some of the features appear to be fundamentally embedded in the tree architecture, (ie a node must have 0 or 2 parents), so those would to be solved some other way. The author generally does not seem too receptive to feature requests. I frankly don't think it's worth my time to learn how his implementation works and sending PRs to it.
What is the best way to draw pedigrees?
Write our own pedigree hierarchy and render functions from scratch
Pros Fine control over all aspects Can easily reuse component in future apps Currently works on most common cases, can slowly build out more complicated handling as it arises
Cons All our own maintenance Could be difficult to validate?
Use PedigreeJS
Pros Existing package, maintained relatively regularly-ish Seems to do a goodish job based on some testing
Cons No npm package Uses jQuery No control over style/layout + can't get rid of edit options Some cases we have (eg duos) do not work and the author has no intention of implementing
Fork PedigreeJS / Copy logic with license and repurpose as needed
Pros Can use the PedigreeJS code to create the hierarchy structure and render it in our own style Can easily reuse component in future apps
Cons Will need to migrate from jQuery to ReactJS (not too hard) + validate Need to update when PedigreeJS updates if it's a big fix
Use another package
Not sure which package
Don't show pedigrees
Last resort ;)