predict.mapfuser: Predict centiMorgan positions from fitted gam models on the...

Description Usage Arguments Value Author(s) Examples

View source: R/predict.mapfuser.R

Description

Takes a fitted thin plate regression spline produced by gam() and produces predictions of centi Morgan positions using known physical genome positions and fitted gam models.

Usage

1
2
## S3 method for class 'mapfuser'
predict(object, to_predict, ...)

Arguments

object

A mapfuser object with fitted gam models

to_predict

A csv file with columns marker, chromosome ID and position in mega base pairs.

...

ingored in function call

Value

A data frame with columns "Marker", "Chr", "Position", and "Position_physical"

Author(s)

Dennis van Muijen

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# Read a table with positions to interpolate and/or extrapolate
fpath <- system.file("extdata", package="mapfuser")
to_predict <- read.table(paste0(fpath, "/BaySha_physical.csv"), sep = ",", header = TRUE)
MF.obj <- predict(MF.obj, to_predict)
# Write to csv
write.table(MF.obj$predictions, file = "preds.csv", sep = ",", col.names = TRUE, row.names = FALSE)

## End(Not run)

dmuijen/mapfuser documentation built on May 28, 2019, 7:53 p.m.