snpinfo: Create a snpinfo object

Description Usage Arguments Details Value See Also

View source: R/snpinfo.R

Description

This function creates a snpinfo object.

Usage

1
2
3
4
5
snpinfo(data, snpNames = "Name", aggregateBy = "gene", chr = NULL,
  pos = NULL, ref = NULL, alt = NULL, filterBy = NULL,
  filterFun = NULL, otherCols = NULL)

is_snpinfo(x)

Arguments

snpNames

The field of si where the SNP identifiers are found. Default is 'Name'

aggregateBy

The field of si on which the results were aggregated. Default is 'gene'. For single snps which are intended only for single variant analyses, it is reccomended that they have a unique identifier in this field.

chr

(optional) The field of si where the chromosome identifiers are found. See Details.

pos

(optional) The field of si where the snp position identifiers are found. See Details.

ref

(optional) The field of si where the reference allele for the snps is found. See Details.

alt

(optional) The field of si where the alternate allele for the snps is found. See Details.

filterBy

(optional) The (typically logical) field in si in which to keep in further analysis. See Details

filterFun

(optional) a function to apply to multiple '.filterBy' fields via Reduce. See Details.

otherCols

(optional) other fields of si to propagate through. See Details.

si

a data frame containing the SNP information. Must contain fields given in '.snpNames' and '.aggregateBy'.

Details

It is HIGHLY recommended that .chr, .pos, .ref, and .alt be supplied. For

.chr and .pos are used for branching and output in subsequent analysis. Useful for analysis where the X chromosome is handled differently than other chromosomes.

ref and alt are used in calculating various SNP and subject summary statistics in 'genotype' objects.

.filterBy and .filterFun are used to create filters, typically at the meta-analysis stage (e.g., because they are intronic or common). TRUE indicates that the SNP should be kept. If .filterFun is specified Reduce will be applied to the columns specified by .filterBy. Note Reduce is called the result must be a logical vector for each entry in si. If .filterFun produces NA's, these will be changed to FALSE with a warning.

.otherCols

Value

an object of class 'snpinfo'. This is a list typicaly used to feed into an analysis function.

An object of class 'snpinfo' is a list containing at least the following components:

It is important to note that return include and exclude are taken from data and not from the input parameters.

See Also

Reduce


DavisBrian/gwasr documentation built on May 6, 2019, 1:55 p.m.