Package 'PAS'

Title: Polygenic Analysis System (PAS)
Description: An R package for polygenic trait analysis.
Authors: Zhiqiu Hu; Shizhong Xu; Zhiquan Wang; Rongcai Yang
Maintainer: Zhiqiu Hu <[email protected]>
License: GPL (>= 2)
Version: 1.2.5
Built: 2024-11-13 03:27:15 UTC
Source: https://github.com/cran/PAS

Help Index


Polygenic Analysis System (PAS)

Description

The PAS package was developed to implement the method and algorithm developed by Zhiqiu Hu, Shizhong Xu, Zhiquan Wang, and Rongcai Yang for genomic value prediction. Although the current version of the package only provided functions for the bin model analysis (Hu et al., 2012), the package will be developed continuously to incorporate new methods of genomic value prediction that will be introduced by the authors in the near future.

updates:
1. A new option foldid was added into the binmod function to allow users assigning foldid for cross-validations;
2. A new output item obj$optimal$map.binsnp was added bridging the bin map and the snp map in a binmod object.

Details

Package: PAS
Type: Package
Version: 1.0
Date: 2012-04-12
License: GPL (>2.0)

Author(s)

Zhiqiu Hu, Shizhong Xu, Zhiquan Wang, Rong-cai Yang

Maintainer: Zhiqiu Hu <[email protected]>

References

bin model
Zhiqiu Hu, Zhiquan Wang, and Shizhong Xu (2012) An infinitesimal model for quantitative trait genomic value prediction. PloS ONE 7: e41336.


plot function

Description

Generate figures using an object created by the binmod function.

Usage

## S3 method for class 'binmod'
plot(x, file=NULL, width=7, height=5, getdata=FALSE, ...)

Arguments

x

An object generated by the binnod function.

file

The prefix of the figure files to be saved.

width

width of the figures (inch).

height

height of the figures (inch).

getdata

A logic indicator. The default value is FALSE, which mean not to return the data for plotting.

...

Further graphical parameters may also be supplied as arguments.

Examples

#load PAS library
library (PAS)
#load the demo data
data(beef)
#conduct bin model analysis and plotting the result.
plot(binmod(x, y, map))

predict

Description

Extract predicted genomic breeding values from the 10-fold cross-validation result that has been saved in a binmod object, or predict the breeding values for a new sample.

Usage

## S3 method for class 'binmod'
predict(object, newx=NULL, ...)

Arguments

object

An object generated by the binnod function.

newx

The numeric genotype indicator matrix of a new sample, which need to be coded in the same way as the genotypicdata generating the binmod object.

...

Further parameters may also be supplied as arguments.

Examples

#load PAS library
library(PAS)
#load the demo data
data(beef)
#conduct bin model analysis.
binmod.result=binmod(x, y, map)
#generate a new sample by sampling 20 individuals from the demo data
x0=x[sample(1:NROW(x) , 20), ]
#predict the genomic values of the new sample.
predict(binmod.result, newx=x0)

binmod

Description

This is the main function for bin model analysis.

Usage

binmod(x, y, map, beta0=NA, binsizelist=-1, full.search=FALSE, foldid=NA, ...)

Arguments

x

input matrix, of dimensions nobs*nvars; each row is a observation vector of an individual and each column is a genotypic indicator vector for a molecular marker.

y

a matrix of response variable (phenotypic observations), of dimensions nobs*1.

map

A data frame for linkage map or physical map.

beta0

Estimated SNP effects obtained by univariate analysis. By default, the glm function in R will be called by the binmod to calculate the estimates of effects.

binsizelist

A list of binsizes to be considered in the analysis. A default list will be generated if the option was ignored or an invalid list has been specified.

full.search

A logic indicator selecting search strategies. If FALSE was assigned, the binmod will complete the running as soon as the optimal binsize was found. Otherwise, analysis will be conducted for all binsizes on the list.

foldid

An optional vector of values between 1 and nfold identifying what fold each observation is in. If not supplied, a random vector is generated under nfold=10.

...

Other parameters need to be passed to glmnet/r and glm/r.

Details

The function invokes binmod analysis for genomic value prediction. The default settings are strongly suggested for new users.

Value

grid

information of all searched binsizes

grid$mselist

a 'data.frame': nbinsizes of 4 variables # A list of mean square errors

grid$mselist$binsize

size settings of the bins, eight in bp or cM.

grid$mselist$mse

mean square error

grid$mselist$mse_std

the standard deviation of MSEs

grid$mselist$nbin

number of bins under the binsize setting

grid$optbinsize

optimal binsize

grid$optid

order of the optimal binsize in the grid

optimal

result obtained under the optimal binsize

optimal$predict

phentypic values and its' predicted values under the optimal model.

optimal$predict$y

original phenotypic observations

optimal$predict$yp_cv

predictions by 10-fold cross-validation.

optimal$beta

estimated bin parameters

optimal$beta$beta

bin effect

optimal$beta$SSx

sum of square of bin indicator

optimal$beta$Se

residual error

optimal$beta$Sb

estimating error of bin effect

optimal$beta$Wald

Wald-test statistics

optimal$beta$LOD

LOD-test statistics

optimal$xbin

indicator matrix of the bins under the optimal binsize

optimal$map

'data.frame': of 5 variables: #bin map

optimal$map$chr

chromosome id

optimal$map$pos

bin position

optimal$map$pos_id

mean of the orders of markers in the bin

optimal$map$start_id

the order the first maker in a bin

optimal$map$end_id

the order the last maker in a bin

optimal$binsize

optimal binsize

optimal$cv

cross-validation results

optimal$cv$binsize

binsize

optimal$cv$nbin

number of bins under the binsize setting

optimal$cv$mse

mean squared error obtained from cross-validation

optimal$cv$r

Pearson's correlation coefficient obtained from cross-validation

snp

SNP information

snp$map

linkage map or physical map

snp$map$chr

chromosome id

snp$map$pos

marker position

snp$map$pos_id

marker order

snp$effect

single marker analysis result

snp$effect$beta

SNP effect

snp$effect$SSx

sum of square of genotypic indicator

snp$effect$Se

residual variance

snp$effect$Sb

estimating error of marker effect

snp$effect$Wald

Wald-test statistics

snp$effect$LOD

LOD test statistics

snp$mapinfo

a brief summary of the map

snp$mapinfo$chr

chromosome id

snp$mapinfo$start

the position of the first marker on the chromosome

snp$mapinfo$end

the position of the last marker on the chromosome

snp$mapinfo$length

length of the chromosome

snp$mapinfo$nmark

number of markers on the chromosome

snp$mapinfo$aver

average interval of the chromosome

snp$mapinfo$min.interval

the smallest interval size on the chromosome

cvfit

A cv.glmnet project. See manual of glmnet for details.

References

Zhiqiu Hu, Zhiquan Wang, and Shizhong Xu (2012) An infinitesimal model for quantitative trait genomic value prediction. PloS ONE

Examples

#load PAS library
library (PAS)
#load the demo data
data (beef)
#perform binmod analysis under the default settings.
binmod.result=binmod (x , y , map)
#plot binmod result
plot(binmod.result)
str(binmod.result)
#Output the predicted phenotypic values that was obtained
#by 10-fold cross validation .
predict(binmod.result)
#predict the phenotypic values for new individuals
x1=x[sample(1:NROW(x) , 20), ]
bin.pred.x1=predict(binmod.result, newx=x1)
str(bin.pred.x1)

beef data

Description

The data are provide for demonstration purpose only.

Value

x

genotypic data. int [1:836, 1:300] 0 0 0 -1 -1 -1 -1 0 0 0 ...

y

phenotypic data. int [1:836, 1] 768 157 508 614 590 777 505 243 509 351 ...

map

physical map: 'data.frame': 300 obs. of 2 variables:
$ chr: num 1 1 1 1 ...
$ pos: int 113641 244698 369418 447277 ..

Examples

#load PAS library
library (PAS)
#load example data
data(beef)
str(x)
str(y)
str(map)

binmod.print

Description

Show a terse summarize for a binmod object.

Usage

## S3 method for class 'binmod'
print(x, ...)

Arguments

x

An binmod object.

...

Further parameters may also be supplied as arguments.

Examples

#load PAS library
library (PAS)
#load the demo data
data (beef)
#conduct bin model analysis.
binmod.result=binmod (x, y, map)
print(binmod.result)
#show structure of a binmod object
str(binmod.result)