pick_target.snp: Pick target SNPs in the pathway

Description Usage Arguments Value Examples

Description

The target SNPs in the pathway can be picked by users manually or use this facility function. It helps pick the set of target SNPs in the pathway(s) based on a desired allele frequency. If picked manually, the target SNPs should be in the order from the smallest to the largest.

Usage

1
pick_target.snp(input.plink.file, fr.desire = "double", n.snp = "integer")

Arguments

input.plink.file

is a vector of two character strings for the file names of the mother's and father's plink base filenames with the necessary path to the directory. The plink files are in bed format and three files with extensions .bed .bim and .fam are expected for each parent's genotypes. In addition the allele frequnecy files generated by PLINK (base filename with .frq extension) are expected to be in the same directory as the .bed file.

fr.desire

is a double number giving the desired frequency of the target SNPs.

n.snp

is an integer giving the number of target SNPs to be picked.

Value

The function returns a list of two: first element is the SNPs read from the .bim file now with allele frequncies merged and the second is the row numbers of the target SNPs selected among all SNPs in the .bim file.

Examples

1
2
3
4
m.file <- file.path(system.file(package = "TriadSim"),'extdata/pop1_4chr_mom')
f.file <- file.path(system.file(package = "TriadSim"),'extdata/pop1_4chr_dad')
picked.target <- pick_target.snp(c(m.file,f.file),0.05, 8)
cat('Target SNPs picked:',picked.target[[2]],'\n')

bbms09/TriadSim documentation built on May 11, 2019, 9:26 p.m.