filter_hmp: filter variants in hapmap format

View source: R/filter.R

filter_hmpR Documentation

filter variants in hapmap format

Description

filter variants in hapmap format

Usage

filter_hmp(
  x,
  mode = c("POS", "type", "both"),
  Chr = Chr,
  start = start,
  end = end,
  gff = gff,
  type = type,
  cusTyp = cusTyp,
  geneID = geneID
)

Arguments

x

genotype dataset in hapmap format, object of data.frame class

mode

filter mode, one of "POS", "type", "both"

Chr

chromosome name, needed if mode set to "POS" or "both"

start

start position, needed if mode set to "POS" or "both"

end

end position, needed if mode set to "POS" or "both"

gff

object of GRanges class, genome annotations imported by import_gff()

type

filter type, needed if mode set to "type" or "both", one of "CDS", "exon", "gene", "genome", "custom", if type was set to "custom", then custom_type is needed.

cusTyp

character vector, custom filter type, needed if type set to "custom"

geneID

gene ID

Examples

# create a dataset of genotype in hapmap format
hmp <- hap2hmp(hapResult);

# example
hmp <- filter_hmp(hmp, mode = "POS",
                      Chr = "scaffold_1", start = 4100, end = 5000)


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