Description Usage Arguments Value Author(s) Examples
View source: R/predict.mapfuser.R
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.
1 2 |
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 |
A data frame with columns "Marker", "Chr", "Position", and "Position_physical"
Dennis van Muijen
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.