sampleSwaps: Identify sample swaps and similarities

View source: R/sample_swap.R

sampleSwapsR Documentation

Identify sample swaps and similarities

Description

Given a list BAM files, the function genotypes known SNPs and identifies potentially related samples. For the source of SNPs, see reference

Usage

sampleSwaps(
  bams = NULL,
  build = "hg19",
  prefix = NULL,
  add = TRUE,
  min_depth = 30,
  ncores = 4,
  ...
)

Arguments

bams

Input bam files. Required.

build

reference genome build. Default "hg19". Can be hg19 or hg38

prefix

Prefix to add or remove from contig names in SNP file. If BAM files are aligned GRCh37/38 genome, use prefix 'chr' to 'add'

add

If prefix is used, default is to add prefix to contig names in SNP file. If FALSE prefix will be removed from contig names.

min_depth

Minimum read depth for a SNP to be considered. Default 30.

ncores

Default 4. Each BAM file will be launched on a separate thread. Works only on Unix and macOS.

...

Additional arguments passed to bamreadcounts

Value

a list with results summarized

References

Westphal, M., Frankhouser, D., Sonzone, C. et al. SMaSH: Sample matching using SNPs in humans. BMC Genomics 20, 1001 (2019). https://doi.org/10.1186/s12864-019-6332-7


PoisonAlien/maftools documentation built on April 7, 2024, 2:49 a.m.