NGS-BITS SAMPLEANCESTRY

https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/ngsbits/sampleancestry?label=version%20update%20pull%20requests

Estimates the ancestry of a sample based on variants.

URL: https://github.com/imgag/ngs-bits/blob/master/doc/tools/SampleAncestry/index.md

Example

This wrapper can be used in the following way:

rule test_ngsbits_sampleancestry:
    input:
        # Either a single VCF or a list of VCF files
        "sample.vcf",
    output:
        "ancestry.tsv",
    threads: 1
    log:
        "ancestry.log",
    params:
        extra="-min_snps 4 -build hg19",
    wrapper:
        "v5.5.2-17-g33d5b76/bio/ngsbits/sampleancestry"

Note that input, output and log file paths can be chosen freely.

When running with

snakemake --use-conda

the software dependencies will be automatically deployed into an isolated environment before execution.

Notes

To estimate ancestry, the input VCF file must have enough variants AND variants that overlaps known human variants ancestry.

Software dependencies

  • ngs-bits=2024_11

Input/Output

Input:

  • Path to one or multiple VCF file(s).

Output:

  • Path to results table (TSV)

Params

  • extra: Optional parameters besides IO

Authors

  • Thibault Dayris

Code

# coding: utf-8

"""Snakemake wrapper for NGS-bits SampleAncestry"""

__author__ = "Thibault Dayris"
__copyright__ = "Copyright 2024, Thibault Dayris"
__email__ = "thibault.dayris@gustaveroussy.fr"
__license__ = "MIT"

from snakemake.shell import shell

log = snakemake.log_fmt_shell(
    stdout=False,
    stderr=True,
)
extra = snakemake.params.get("extra", "")

shell(
    "SampleAncestry {extra}"
    " -in {snakemake.input}"
    " -out {snakemake.output:q}"
    " {log}"
)