searchStandardPeaks: searchStandardPeaks

Description Usage Arguments Value Warning Author(s) References See Also Examples

View source: R/LazyMLVA.R

Description

The function looks for the standard size ladder in an electropherogram (ABIF) file. ABIF files have to be imported using seqinr::read.abif(). If successful, the function returns the peak positions the size standard.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
searchStandardPeaks(x_abifile, 
                    refchannel = 5, 
                    reference = r_npk, 
                    npks = 15, 
                    rsizes = r_sizes, 
                    x_tmin = 2, 
                    x_tmax = 3, 
                    x_thres = 0.5, 
                    x_step = 0.1, 
                    dist_thres = 0.01, 
                    plotit = FALSE, 
                    ...)

Arguments

x_abifile

list generated by seqinr::read.abif representing the ABIF file

refchannel

channel number of the size ladder. See seqinr::peakabif.

reference

contains normalized peak positions. Peak positions can be extracted from an ABIF file with seqinr::peakabif. Normalization is achieved with normPeaks.

npks

number of expected peaks

rsizes

sizes of reference peaks in basepairs; peaks not to be counted are given as NA.

x_tmin

scaled (1:1000) starting time for the time axis for x_abifile (see function seqinr::peakabif)

x_tmax

scaled (1:1000) ending time for the time axis for x_abifile (see function seqinr::peakabif)

x_thres

threshold, above which peaks are looked for in x_abifile (see function seqinr::peakabif)

x_step

step, by which x_thres is decreased and x_tmin increased until standard peaks are retrieved

dist_thres

euclidian distance of peak vectors, below which identity of references in x_abifile and reference is assumed

plotit

logical value stating whether a time->bp plot should be shown

...

arguments passed to plot

Value

numeric vector containing the positions of the standard peaks

Warning

A warning is issued if standard peaks cannot be retrieved.

Author(s)

Johannes Elias

References

package seqinr by Charif, D. and Lobry, J.R. (2007)

See Also

sizeCaller

Examples

1
2
3
4
5
# returns positions of reference peaks in reference file
searchStandardPeaks(r_abif)

# show a nice plot of the time->bp conversion function
searchStandardPeaks(r_abif,plotit=TRUE)

LazyMLVA documentation built on May 2, 2019, 5:33 p.m.