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.
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.
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.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(inveRsion)
Loading required package: haplo.stats
Hola!
welcome to inevRsion package.
type: manual() for full manual
vignette("inveRsion") for a quick start
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/inveRsion/scanInv.Rd_%03d_medium.png", width=480, height=480)
> ### Name: scanInv
> ### Title: Inversion scan
> ### Aliases: scanInv
> ### Keywords: constructor
>
> ### ** Examples
>
> data(hapCode)
> window<-0.5
> scanRes<-scanInv(hapCode,window=window,saveRes=FALSE,geno=FALSE,saveBlocks=FALSE)
-Scan for inversions-
-computing inversion model-
Maximum brake-points to be tested 55
.
-computation done-
> scanRes
-Showing object of class: scan-
Top 10 brake-points with highest Likelihood ratio:
LeftBP RightBP LogLike Prob BicDiff
1 0.75075-1.24021 1.25132-1.25160 527.85 0.78 345.412
2 <NA> <NA> NA NA NA
3 <NA> <NA> NA NA NA
4 <NA> <NA> NA NA NA
5 <NA> <NA> NA NA NA
6 <NA> <NA> NA NA NA
7 <NA> <NA> NA NA NA
8 <NA> <NA> NA NA NA
9 <NA> <NA> NA NA NA
10 <NA> <NA> NA NA NA
others:
window: length window ( 0.5 ) for searching inversion segments
> plot(scanRes)
>
>
>
>
>
> dev.off()
null device
1
>