filter_hap: Filter hap

View source: R/filter.R

filter_hapR Documentation

Filter hap

Description

filter hapResult or hapSummary by remove positions or accessions or haplotypes

Usage

filter_hap(hap,
           rm.mode = c("position", "accession", "haplotype", "freq"),
           position.rm = position.rm,
           accession.rm = accession.rm,
           haplotype.rm = haplotype.rm,
           freq.min = 5)

Arguments

hap

object of hapSummary or hapResult class

rm.mode

filter mode, one of "position", "accession", "haplotype"

position.rm

numeric vector contains positions need to be removed

accession.rm

character vector contains accessions need to be removed, only hapResult can be filtered by accessions

haplotype.rm

character vector contains haplotypes need to be removed

freq.min

numeric, hapltypes with accessions number less than freq.min will be removed

Value

hapSummary or hapResult depend input

Examples

data("geneHapR_test")
hap <- filter_hap(hapResult,
                  rm.mode = c("position", "accession", "haplotype", "freq"),
                  position.rm = c(4879, 4950),
                  accession.rm = c("C1", "C9"),
                  haplotype.rm = c("H009", "H008"),
                  freq.min = 5)

geneHapR documentation built on May 29, 2024, 11:59 a.m.