tmpSEQsw: tmpSEQsw

Description Usage Arguments Author(s) See Also Examples

View source: R/tmpSEQsw.R

Description

This function returns tmpSEQ Biostrings DNAStringSet objects as sliding windows which can be used to parse to further functions

Usage

1
2
3
tmpSEQsw(dna, FUN = NULL, chr.name = "chr", wlen = 25000,
  wjump = 25000, start.by = 1, end.by = NULL, wtype = "bp",
  global.deletion = TRUE, threads = 1, pB = TRUE)

Arguments

dna

DNAStringSet

FUN

the function to be applied [default: NULL] see e.g. dist.xStats, dist.xyStats, dist.xyoStats, dist.xyioStats

chr.name

chromosome name [default: "chr"]

wlen

sliding windows length [default: 25000]

wjump

sliding windows jump [default: 25000]

start.by

optional start position [default: 1]

end.by

optional end position [default: NULL] take width of DNAStringSet

wtype

sliding windows type to use bp, biSites or triSites [default: "bp"]

global.deletion

a logical indicating whether to delete the sites with missing data in a global or pairwise way (default is to delete in a global way) [default: TRUE]

threads

number of parallel threads to process windows [default: 1]

pB

specifies if progress should be shown as a progress bar [default: TRUE]

Author(s)

Kristian K Ullrich

See Also

distIUPAC, dist.dna

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data("MySequences", package="distIUPAC")
CAS.pos<-5:34
CAS.tmpSEQsw<-tmpSEQsw(MySequences[CAS.pos])
##xStats
CAS.xStats<-tmpSEQsw(MySequences[CAS.pos], FUN=dist.xStats)
##multiple threads to process windows
CAS.xStats<-tmpSEQsw(MySequences[CAS.pos], threads=2)
##multiple cores to process pairwise distance calculation
CAS.xStats<-tmpSEQsw(MySequences[CAS.pos], FUN=function(x) {dist.xStats(x, ncores=2)})
##disbale global deletion
CAS.pairwiseDeletion.xStats<-tmpSEQsw(MySequences[CAS.pos],
global.deletion=FALSE, FUN=function(x) {dist.xStats(x, ncores=2)})
##using K80 distance from ape package
tmpSEQsw(MySequences[CAS.pos], FUN=function(x) {dist.xStats(x, dist="K80")})

kullrich/distIUPAC documentation built on Jan. 9, 2020, 2:50 p.m.