# NOT RUN {
# }
# NOT RUN {
# Since the following code takes longer than 5 seconds to run, it has been tagged as dontrun.
# However, the code can be run by the user.
#
#-------------------------
# Example
#------------------------
# read the map
#~~~~~~~~~~~~~~
# File is a plain space separated text file with the first row
# the column headings
complete.name <- system.file('extdata', 'map.txt',
package='Lion')
map_obj <- ReadMap(filename=complete.name)
# read marker data
#~~~~~~~~~~~~~~~~~~~~
# Reading in a PLINK ped file
# and setting the available memory on the machine for the reading of the data to 8 gigabytes
complete.name <- system.file('extdata', 'geno.ped',
package='Lion')
geno_obj <- ReadMarker(filename=complete.name, type='PLINK', availmemGb=8)
# read phenotype data
#~~~~~~~~~~~~~~~~~~~~~~~
# Read in a plain text file with data on a single trait and two covariates
# The first row of the text file contains the column names y, cov1, and cov2.
complete.name <- system.file('extdata', 'pheno.txt', package='Lion')
pheno_obj <- ReadPheno(filename=complete.name)
# Suppose we want to perform the AM analysis at a 5% false positive rate.
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ans <- FPR4AM(falseposrate = 0.05,
trait = 'y',
fformula=c('cov1+cov2'),
map = map_obj,
pheno = pheno_obj,
geno = geno_obj)
res <- AM(trait = 'y',
fformula=c('cov1+cov2'),
map = map_obj,
pheno = pheno_obj,
geno = geno_obj,
lambda = ans$setlambda)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab