biSites: biSites

Description Usage Arguments Author(s) See Also Examples

View source: R/biSites.R

Description

This function returns bi-allelic site positions given a dna object DNAStringSet, also with IUPAC code.

Usage

1
2
biSites(dna, x.pos = NULL, min.ind = 0, wlen = 25000, start.by = 1,
  end.by = NULL, threads = 1, pB = FALSE)

Arguments

dna

DNAStringSet [mandatory]

x.pos

population X positions [default: NULL]

min.ind

minimum number of individuals without gaps ("-", "+", ".") or without missing sites ("N"), set to size of population ("length(x.pos)") to mask global deletion sites [default: 0]

wlen

sliding window length [default: 25000]

start.by

optional start position [default: 1]

end.by

optional end position [default: NULL]

threads

number of parallel threads [default: 1]

pB

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

Author(s)

Kristian K Ullrich

See Also

triSites, globalDeletion

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
##load sequence data
data("MySequences", package="distIUPAC")

##consider all sequences
MySequences.biSites<-biSites(MySequences)
as.matrix(MySequences)[, head(MySequences.biSites$biPOS)]

##consider only a subset of all sequences
CAS.pos<-5:34
CAS.biSites<-biSites(MySequences, x.pos=CAS.pos)
as.matrix(MySequences[CAS.pos])[, head(CAS.biSites$biPOS)]

##consider only sites were 15 individuals have no gaps or missing sites
CAS.biSites.minInd.15<-biSites(MySequences, x.pos=CAS.pos, min.ind=15)
as.matrix(MySequences[CAS.pos])[, head(CAS.biSites.minInd.15$biPOS)]
as.matrix(MySequences[CAS.pos])[, head(CAS.biSites.minInd.15$biPOSmasked)]

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