Description Usage Arguments Details Value Author(s) See Also Examples
Create a data structure suitable for input to IBDcheck.
This is a wrapper function for the constructor function IBD
that creates the object.
The wrapper provides basic checks of the input and creates
the snp.support and subject.support data frames
required for an IBD object.
1 2 |
snp.data |
A |
Chromosome |
a vector containing the chromosome numbers of the SNPs |
Position |
a vector of physical map positions |
popsam |
A logical vector indicating whether each subject can be considered
part of a random sample ( |
Gen_loc |
A vector of genetic map positions in centiMorgans. If |
pvalue_HWE |
A vector of p-values from tests of Hardy-Weinberg proportions for
each SNP. If |
subids |
a vector of subject IDs |
... |
additional arguments to be passed to the constructor |
The arguments snp.data, Chromosome, Position and
popsam are required.
Only subjects with popsam==TRUE are used for estimating
conditional IBS probabilities and fitting LD models;
those with popsam==FALSE are excluded.
A typical use of popsam is to exclude cases
when the data are from case control study of a rare disease, where
cases are oversampled relative to
their frequency in the population but controls may be regarded as
a population sample.
If Gen_loc is missing it is inferred from Position by the
SNPgenmap function.
Currently SNPgenmap
assumes physical map positions are on build 36 of the human genome.
If subids is missing, the row names of snp.data
are used as subject identifiers.
An object of class IBD. See the help file for
the constructor function IBD for details.
Annick Joelle Nembot-Simo, Jinko Graham and Brad McNeney
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | data(Nhlsim)
popsam<-Nhlsim$csct==0 #controls
dat<-new.IBD(Nhlsim$snp.data,Nhlsim$chromosome,Nhlsim$physmap,popsam)
## Not run:
# Read PLINK-formatted data via the read.snps.pedfile() function of the
# chopsticks package
# [source("http://bioconductor.org/biocLite.R"); biocLite("chopsticks") to install]
# Assume PLINK data is in files mydata.ped and mydata.map.
require(chopsticks)
mydata = read.snps.pedfile("mydata.ped")
# mydata is now a list with elements mydata$snp.data, mydata$snp.support and
# mydata$subject.support. Chromosome number and physical position of the SNPs
# are in mydata$snp.support$chromosome and mydata$snp.support$position, respectively.
dat<-new.IBD(mydata$snp.data,mydata$snp.support$chromosome,
mydata$snp.support$position,popsam=rep(1,nrow(mydata$snp.support)))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.