def get_args():
    args = argparse.ArgumentParser(description=get_desc())

    args.add_argument("--reference", "-r", required=True, help="Path to reference file to prepare.")

    args.add_argument("--mapper", help="Available mappers: %s" % available_mappers())
    args.add_argument("--variant", help="Available variants: %s" % available_callers())

    return args
예제 #2
0
def get_desc():
    return r'''Run the snp pipeline with specified mapper, variant caller and some filters.

Available mappers: %s

Available variant callers: %s

Available filters: %s

Available annotators: %s''' % (available_mappers(), available_callers(), available_filters(), available_annotators())
예제 #3
0
def get_args():
    args = argparse.ArgumentParser(description=get_desc())

    args.add_argument("--reference",
                      "-r",
                      required=True,
                      help="Path to reference file to prepare.")

    args.add_argument("--mapper",
                      help="Available mappers: %s" % available_mappers())
    args.add_argument("--variant",
                      help="Available variants: %s" % available_callers())

    return args
예제 #4
0
def get_args():
    args = argparse.ArgumentParser(description=get_desc(),
                                   formatter_class=RawTextHelpFormatter)

    args.add_argument("--workflow", "-w")
    args.add_argument("--input", "-i")

    args.add_argument("-r1", help="R1/Forward read in Fastq format.")
    args.add_argument("-r2", help="R2/Reverse read in Fastq format.")
    args.add_argument("--reference",
                      "-r",
                      help="Rerefence to use for mapping.")
    args.add_argument(
        "--sample-name",
        default="test_sample",
        help="Name of the sample for mapper to include as read groups.")
    args.add_argument("--outdir", "-o")

    args.add_argument("--config", "-c")

    args.add_argument("--mapper",
                      "-m",
                      default="bwa",
                      help="Available mappers: %s" % available_mappers())
    args.add_argument("--mapper-options",
                      help="Custom maper options (advanced)")
    args.add_argument("--bam")
    args.add_argument("--variant",
                      "-v",
                      default="gatk",
                      help="Available variant callers: %s" %
                      available_callers())
    args.add_argument("--variant-options",
                      help="Custom variant options (advanced)")
    args.add_argument("--vcf")
    args.add_argument(
        "--filters",
        type=str,
        help=
        "Filters to be applied to the VCF in key:value pairs, separated by comma (,). Available_filters: %s. Recommendations: GATK: mq_score:30,min_depth:10,ad_ratio:0.9 Mpileup: mq_score:30,min_depth:10,dp4_ratio:0.9"
        % available_filters())

    args.add_argument(
        "--annotators",
        nargs="+",
        help="List of annotators to run before filters. Available: %s" %
        available_annotators())

    args.add_argument(
        "--keep-temp",
        action="store_true",
        help="Keep intermediate files like BAMs and VCFs (default: False).")

    args.add_argument(
        "--json",
        action="store_true",
        help=
        "Also write variant positions in filtered vcf as json file (default: False)."
    )
    args.add_argument(
        "--json-info",
        action="store_true",
        help=
        "When writing a json file, log some stats to stdout. (default: False)."
    )

    return args