Learn R Programming

inveRsion (version 1.20.0)

scanInv: Inversion scan

Description

This function scans a whole chromosome in search for inversion events. The scan is done by fitting an inversion model to all segments in the chromosome with fixed length size.

Usage

scanInv(objectHaploCode, window, maxSteps = 30, geno = FALSE, saveRes = TRUE, saveBlocks=TRUE)

Arguments

objectHaploCode
Object of class HaploCode produced by the codeHaplo function.
window
numeric, size of the window in mega-basis.
maxSteps
numeric, maximum number of iteration in the EM algorithm for the inversion model
geno
logical. Whether the original data is genotypes or phases haplotypes.
saveRes
logical. Whether results should be saves into file invRes.RData
saveBlocks
logical. Whether save blocks for each candidate break point.

Value

object of class scan

Details

The function processes the haplotypes coded in objectHaploCode. If subsequent re-runs are requires for different window sizes, this object can be omitted. The function will thus search the local directory for previous results to speed up further scans.

See Also

HaploCode , scan

Examples

Run this code
data(hapCode)
window<-0.5
scanRes<-scanInv(hapCode,window=window,saveRes=FALSE,geno=FALSE,saveBlocks=FALSE)
scanRes
plot(scanRes)

Run the code above in your browser using DataLab