ripple.window: Update linkage map with alternative orders at a given...

Description Usage Arguments Details Value

View source: R/ripple.ord.R

Description

This function carries out re-ordering of one single window according to user defined criteria. The best order is chosen based on the difference in log likelihood. Different heuristics are avaible to select which orders to test. Note that testing all orders has factorial complexity (N!/2) meaning that it's not feasible for window sizes larger than 6.

Usage

1
2
3
ripple.window(input.seq, ws = 4, tol = 0.001, phase.cores = 1,
  ripple.cores = 1, start = 1, verbosity = NULL, type = "one",
  n = NULL, pref = NULL, no_reverse = TRUE, optimize = "likelihood")

Arguments

input.seq

An object of class sequence.

ws

The window size in which ti consider re-ordering

tol

The tolerance for checking convergence of the EM model

phase.cores

The number of parallel processes to use to estimate phases. Should be no higher than 4.

ripple.cores

The number of parallel processes that should be used when testing different marker orders.

start

The position of the first marker of the window within the input sequence

verbosity

A character vector that includes any or all of "batch", "order", "position", "time" and "phase" to output progress status information.

type

One of "one", "all" or "rand".

n

For method "rand": The number of random samples to be tested.

pref

For method "rand": One of "similar", "dissimilar" or "neutral". Controls if sampling probability should be adjusted based on similarity to the input sequence. See description.

no_reverse

For method "one": If FALSE, the method will also create all possible reverse sequences if the marker swaps.

optimize

Either "likelihood" or "count". Passed to ripple.ord in order to optimize the map's likelihood or the RECORD COUNT criterion. Unless you are absolutely sure why, you should use "likelihood".

Details

Methods: all:Checks for all possible permutations in the window. Will be very very slow for large window size. one:Checks for all possible pairwise switches in the window. The complexity scales as sum(ws:1), ws being the window size. rand:First, generates all possible permutations. Then samples n sequences from those and tests those. Time complexity is N.

The "rand" method can be further tuned to preferentially select similar, dissimilar sequences or to perform unbiased sampling. In the first two cases sampling probability is adjusted via a spearman correlation of the sequences to all possible sequences.

Value

An object of class sequence that is the best order for the re-ordered window within the input sequence.


BatchMap documentation built on May 2, 2019, 3:45 p.m.