Ejemplo n.º 1
0
def parallel_variantcall_region(samples, run_parallel):
    """Perform variant calling and post-analysis on samples by region.
    """
    to_process = []
    extras = []
    to_group = []
    for x in samples:
        added = False
        for add in genotype.handle_multiple_variantcallers(x):
            added = True
            to_process.append(add)
        if not added:
            if "combine" in x[0] and x[0]["combine"].keys()[0] in x[0]:
                assert len(x) == 1
                to_group.append(x[0])
            else:
                extras.append(x)
    split_fn = _split_by_ready_regions("-variants.vcf.gz", "work_bam", genotype.get_variantcaller)
    if len(to_group) > 0:
        extras += group_combine_parts(to_group)
    return extras + grouped_parallel_split_combine(to_process, split_fn,
                                                   multi.group_batches, run_parallel,
                                                   "variantcall_sample", "split_variants_by_sample",
                                                   "concat_variant_files",
                                                   "vrn_file", ["region", "sam_ref", "config"])
Ejemplo n.º 2
0
def parallel_variantcall_region(samples, run_parallel):
    """Perform variant calling and post-analysis on samples by region.
    """
    to_process = []
    extras = []
    to_group = []
    for x in samples:
        added = False
        for add in genotype.handle_multiple_variantcallers(x):
            added = True
            to_process.append(add)
        if not added:
            if "combine" in x[0] and x[0]["combine"].keys()[0] in x[0]:
                assert len(x) == 1
                to_group.append(x[0])
            else:
                extras.append(x)
    split_fn = _split_by_ready_regions("-variants.vcf", "work_bam",
                                       genotype.get_variantcaller)
    if len(to_group) > 0:
        extras += group_combine_parts(to_group)
    return extras + grouped_parallel_split_combine(
        to_process, split_fn, multi.group_batches, run_parallel,
        "variantcall_sample", "split_variants_by_sample",
        "concat_variant_files", "vrn_file", ["region", "sam_ref", "config"])
Ejemplo n.º 3
0
def parallel_variantcall_region(samples, run_parallel):
    """Perform variant calling and post-analysis on samples by region.
    """
    to_process = []
    for x in samples:
        to_process.extend(genotype.handle_multiple_variantcallers(x))
    split_fn = _split_by_ready_regions("-variants.vcf", "work_bam", genotype.get_variantcaller)
    return grouped_parallel_split_combine(to_process, split_fn,
                                          multi.group_batches, run_parallel,
                                          "variantcall_sample", "split_variants_by_sample",
                                          "combine_variant_files",
                                          "vrn_file", ["sam_ref", "config"])
Ejemplo n.º 4
0
def parallel_variantcall_region(samples, run_parallel):
    """Perform variant calling and post-analysis on samples by region.
    """
    to_process = []
    for x in samples:
        to_process.extend(genotype.handle_multiple_variantcallers(x))
    split_fn = _split_by_ready_regions("-variants.vcf", "work_bam",
                                       genotype.get_variantcaller)
    return grouped_parallel_split_combine(to_process, split_fn,
                                          multi.group_batches, run_parallel,
                                          "variantcall_sample",
                                          "split_variants_by_sample",
                                          "combine_variant_files", "vrn_file",
                                          ["sam_ref", "config"])
Ejemplo n.º 5
0
def parallel_variantcall_region(samples, run_parallel):
    """Perform variant calling and post-analysis on samples by region.
    """
    to_process = []
    extras = []
    for x in samples:
        added = False
        for add in genotype.handle_multiple_variantcallers(x):
            added = True
            to_process.append(add)
        if not added:
            extras.append(x)
    split_fn = _split_by_ready_regions("-variants.vcf", "work_bam",
                                       genotype.get_variantcaller)
    return extras + grouped_parallel_split_combine(
        to_process, split_fn, multi.group_batches, run_parallel,
        "variantcall_sample", "split_variants_by_sample",
        "concat_variant_files", "vrn_file", ["region", "sam_ref", "config"])
Ejemplo n.º 6
0
def parallel_variantcall_region(samples, run_parallel):
    """Perform variant calling and post-analysis on samples by region.
    """
    to_process = []
    extras = []
    for x in samples:
        added = False
        for add in genotype.handle_multiple_variantcallers(x):
            added = True
            to_process.append(add)
        if not added:
            extras.append(x)
    split_fn = _split_by_ready_regions("-variants.vcf", "work_bam", genotype.get_variantcaller)
    return extras + grouped_parallel_split_combine(to_process, split_fn,
                                                   multi.group_batches, run_parallel,
                                                   "variantcall_sample", "split_variants_by_sample",
                                                   "concat_variant_files",
                                                   "vrn_file", ["region", "sam_ref", "config"])