genotype_filter: Filter SNP data

Description Usage Arguments Details Value Examples

Description

This function applies different filters on SNP data so as to generate as set of markers suitable for haplotype analysis. Although the function can be called separately for filtering purposes, it was thought and designed specifically for the needs of package HaplotypeMiner and might not suit the needs of the general. See section Details for a discussion of the different mandatory and optional filters applied by this function.

Usage

1
2
3
genotype_filter(snp_data, chrom, center_pos, max_distance_to_gene = 10^9,
  max_missing_threshold = NULL, max_het_threshold = NULL,
  min_alt_threshold = NULL, min_allele_count = NULL, verbose = TRUE)

Arguments

snp_data

A list of data pertaining so SNP markers and having at least elements Markers and Genotypes. A more detailed account of the contents of this object can be found in the documentation for functions read_hapmap and read_vcf.

chrom

A character of length one. The name of the chromosome for which markers should be kept.

center_pos

A numeric of length one. The central position (in base pairs) of the gene of interest.

max_distance_to_gene

A numeric of length one. The maximum distance (in base pairs) between center_pos and the position of a marker for this marker to be kept in the analysis.

max_missing_threshold

A numeric of length one between 0 and 1, or NULL. If NULL (default), no such filter is applied. Otherwise, all markers with a missing data rate over this value are removed.

max_het_threshold

A numeric of length one between 0 and 1, or NULL. If NULL (default), no such filter is applied. Otherwise, all markers with a heterozygosity rate over this value are removed.

min_alt_threshold

A numeric of length one between 0 and 1, or NULL. If NULL (default), no such filter is applied. Otherwise, all markers with a minor allele frequency below this value are removed.

min_allele_count

A positive numeric value, or NULL. If NULL (default), no such filter is applied. Otherwise, all markers with a minor allele count below this threshold are removed.

verbose

Logical. Should information regarding the filtering process be printed to screen? Defaults to TRUE.

Details

genotype_filter applies automaticaly three filters to the snp_data object provided as an argument. These filters are applied both when the function is used separately and when used internally inside a call to haplo_selection. The three filters are :

Other filters are optional and are not applied by default, although is is recommended that users do apply these filters either prior to the analysis, externally to package HaplotypeMiner, or as part of the analysis pipeline implemented by function haplo_selection. These four filters are :

Value

A list containing 3 or 4 elements depending on the snp_data object used as input :

Examples

1

malemay/HaplotypeMiner documentation built on May 28, 2019, 2:48 p.m.