def reorder_reference(fname, ref_file):
    """Move mitochondrial calls to end to match GATK reference ordering.
    """
    out_file = "%s-prep%s" % os.path.splitext(fname)
    bcbiov_jar = BCBIO_NEXTGEN_BASE + "/share/java/bcbio_variation/bcbio.variation-0.1.6-SNAPSHOT-standalone.jar"
    if not os.path.exists(out_file):
        cmd = ["java", "-jar", bcbiov_jar, "variant-utils", "sort-vcf", fname, ref_file, ""]
        subprocess.check_call(cmd)
    return out_file
dataset/ETHPy150Open chapmanb/cloudbiolinux/utils/prepare_cosmic.py/reorder_reference/original