: The program sampletrees is a Markov chain Monte Carlo sampler of gene genealogies conditional on either phased or unphased SNP genotype data. The companion program Rsampletrees is for pre- and post-processing of sampletrees files, including setting up the files for sampletrees and storing and plotting the output of a sampletrees run.