R code necessary to reproduce all the figures from TISSUES manuscript