Exemplo n.º 1
0
def picard_insert_gc_flagstat(input_bam,
                              ref_genome,
                              gc_metrics,
                              gc_metrics_summary,
                              gc_metrics_pdf,
                              tempdir,
                              flagstat_metrics,
                              insert_metrics,
                              insert_pdf,
                              picard_docker=None,
                              samtools_docker=None):
    bamutils.bam_flagstat(input_bam,
                          flagstat_metrics,
                          docker_image=samtools_docker)

    gc_tempdir = os.path.join(tempdir, 'gc')
    helpers.makedirs(gc_tempdir)

    picardutils.bam_collect_gc_metrics(input_bam,
                                       ref_genome,
                                       gc_metrics,
                                       gc_metrics_summary,
                                       gc_metrics_pdf,
                                       gc_tempdir,
                                       docker_image=picard_docker)

    insert_tempdir = os.path.join(tempdir, 'insert')
    helpers.makedirs(insert_tempdir)
    picardutils.bam_collect_insert_metrics(input_bam,
                                           flagstat_metrics,
                                           insert_metrics,
                                           insert_pdf,
                                           insert_tempdir,
                                           docker_image=picard_docker)
Exemplo n.º 2
0
def bam_collect_insert_metrics(bam_filename, flagstat_metrics_filename,
                               metrics_filename, histogram_filename, tempdir,
                               config):
    container_ctx = helpers.get_container_ctx(config['containers'],
                                              'picard',
                                              docker_only=True)

    picardutils.bam_collect_insert_metrics(bam_filename,
                                           flagstat_metrics_filename,
                                           metrics_filename,
                                           histogram_filename, tempdir,
                                           **container_ctx)
Exemplo n.º 3
0
def picard_insert_gc_flagstat(
    input_bam,
    ref_genome,
    gc_metrics,
    gc_metrics_summary,
    gc_metrics_pdf,
    tempdir,
    flagstat_metrics,
    insert_metrics,
    insert_pdf,
):
    bamutils.bam_flagstat(
        input_bam,
        flagstat_metrics,
    )

    gc_tempdir = os.path.join(tempdir, 'gc')
    helpers.makedirs(gc_tempdir)

    picardutils.bam_collect_gc_metrics(
        input_bam,
        ref_genome,
        gc_metrics,
        gc_metrics_summary,
        gc_metrics_pdf,
        gc_tempdir,
    )

    insert_tempdir = os.path.join(tempdir, 'insert')
    helpers.makedirs(insert_tempdir)
    picardutils.bam_collect_insert_metrics(
        input_bam,
        flagstat_metrics,
        insert_metrics,
        insert_pdf,
        insert_tempdir,
    )