distIUPACsw: distIUPACsw

Description Usage Arguments Author(s) References See Also Examples

View source: R/distIUPACsw.R

Description

This function calculates IUPAC distances on Biostrings DNAStringSet objects on sliding windows which can be used to parse to further functions. By default, literal distances are used to calculate pairwise-distances.

Usage

1
2
3
4
distIUPACsw(dna, FUN = NULL, chr.name = "chr", wlen = 25000,
  wjump = 25000, start.by = 1, end.by = NULL, wtype = "bp",
  dist = "IUPAC", score.matrix = NULL, global.deletion = TRUE,
  threads = 1, ncores = 1, pB = TRUE)

Arguments

dna

DNAStringSet

FUN

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

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"]

dist

distance to use [default: IUPAC] or choose one model as in dist.dna [default: "IUPAC"]

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]

ncores

number of parallel cores to process pairwise distance calculation [default: 1]

pB

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

Author(s)

Kristian K Ullrich

References

Chang, P. L., Kopania, E., Keeble, S., Sarver, B. A., Larson, E., Orth, A., ... & Dean, M. D. (2017). Whole exome sequencing of wild-derived inbred strains of mice improves power to link phenotype and genotype. Mammalian genome, 28(9-10), 416-425.

See Also

distIUPAC, dist.dna, scoreMatrix

Examples

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

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