Slice chr21 of qsignature SNPs to reduce computation time

def _slice_vcf_chr21(vcf_file, out_dir):
    """
    Slice chr21 of qsignature SNPs to reduce computation time
    """
    tmp_file = os.path.join(out_dir, "chr21_qsignature.vcf")
    if not utils.file_exists(tmp_file):
        cmd = ("grep chr21 {vcf_file} > {tmp_file}").format(**locals())
        out = subprocess.check_output(cmd, shell=True)
    return tmp_file