ref_labeled = ref_pset.data.set_index(ref_pset.labels())
ref_matched = ref_labeled.reindex(index=probes_labeled.index)
// Check for signs that the wrong reference was used
num_missing = pd.isnull(ref_matched.start).sum()
if num_missing > 0:
raise ValueError("Reference is missing %d bins found in %s"
% (len(num_missing), probes.sample_id))
return ref_pset.as_dataframe(ref_matched.reset_index(drop=True))