Added qc.sh and dist_mat.r