Answer from @user4939328, converted from comment. Please improve this answer if you can:
Have a look at this method:
https://academic.oup.com/bioinformatics/article/34/15/2657/4939328
[Wondering why this was converted from a comment? See the StackExchange rules about comments here]