This conversation started on PLINK2 - https://issues.jboss.org/browse/PLINK2-10 - there are some worth while details on that Jira for context for the provided pull request here.