scanSeqSim: A ScanSeqSim function

View source: R/scanSeqSim.R

scanSeqSimR Documentation

A ScanSeqSim function

Description

This function similar to seqSim function calculates sequence similarity for user-defined reference sequence. For every pair of sequences similarity substraction are performed. Threshold parameter reduces the difference between two sequences similarities. For areas where 'cross-over' of two is occur potential recombination event is detected. Function creates object data_scan with indexes and names of the first and the second sequence, similarity plot and putative regions of recombination.

Usage

scanSeqSim(
  seq,
  ref = 1,
  shift = 200,
  window = 400,
  threshold = 0.05,
  rec_length = 3,
  rec_detect = FALSE
)

Arguments

seq

as input we use fasta object from bio3d package. It is a multiple sequence alignment of three or more sequences.

ref

is a sequence which is used for sequences similarity calculation.

shift

the step our window slides downstream the alignment. Its value is set to 400 by default

window

sliding window size. The number of nucleotides the sliding window will span. It has the value of 200 by default.

threshold

value which reduce number of false-positive detected recombination events.

rec_length

length of recombination. Minimal length of 'cross-over'. Expressed in number of shifts.

rec_detect

logical value for adding red line of recombination to the plots.

Examples

scanSeqSim(seq, ref = 2, shift = 50, window = 200, threshold = 0.05,
rec_length = 3, rec_detect = TRUE)
data_scan
#Prints all information for the first pair of sequences
data_scan[1, ]
#Prints all recombination plots
data_scan[ ,5]
#Print all regions of recombination
data_scan[ ,6]


vasily-pavelko/recan documentation built on April 13, 2022, 1:20 p.m.