samplesSelection: Separate data in samples (i.e. experimental conditions).

Description Usage Arguments Details Value See Also Examples

Description

samplesSelection define samples using the barcoding channel to separate them.

Usage

1
2
3
samplesSelection(data, channel = "green", BCchannel = "blue",
  BCthr = 0.05, distThr = 16, plotMyData = FALSE, BCminLength = 100,
  barcodePos = "after")

Arguments

data

data to be analyzed (formatted as data.frame with 4 columns: green, orange, blue, time)

channel

channel(s) to be visualized, which is in general the main channel with the data. Default="green"

BCchannel

channel used for barcoding, default is "blue"

BCthr

threshold used in order to define what is a peak in the barcoding channel. Default is 0.05

distThr

minimum duration of a sample (the unit is "time" as defined in the data)

plotMyData

TRUE to show the plot of the data, FALSE not to show it. If data are large plotting can take seconds/minutes

BCminLength

minimum length of a plug in number of data points for the barcoding channel, default is 100 (note that unit here is number of data points, not "time")

barcodePos

specify if the barcode is before or after the sample ("before" or "after"), default is "after"

Details

This function allows to select the samples using the selected barcoding channel to separate replicates (peaks) from different experimental conditons. This function first detect the barcoding peaks (in the channel defined by "BCchannel") and that is done considering the blue signal that goes above a defined threshold (which is the “BCthr” argument) and with a minimum width (defined by "BCminLength" argument). Then it looks at the space between selected blue peaks and considers as samples those with a distance higher than a threshold (defined by "distThr").

Value

This function returns a list with two components:

samples

list containing samples as elements. Each sample is a data.frame with the same structure of the input data

barcode

corresponding barcode for each sample. Each barcode is a data.frame with the same structure of the input data

See Also

selectSamplesPeaks to select the peaks in each sample

Examples

1
2
3
4
5
data(BxPC3_data,package="BraDiPluS")
res <- samplesSelection(data=MyData, BCchannel="blue",BCthr=0.01,
BCminLength=100, distThr=16, barcodePos="before")
samples <-res$samples
barcode <-res$barcode

saezlab/BraDiPluS documentation built on May 29, 2019, 12:56 p.m.