data_access: Access data stored in a BAf object

Description Usage Arguments Value Author(s) Examples

Description

Short commands to access the information stored in a BAf-class. sI, sX, sB, sA, codebook, and note invoke the stored information in @sinfo, @.Data, @binder, @assy_s or @assy_b, @codebook, and note, respectively. The details of the contents can be found in BAf-class. The corresponding assignment functions e.g. sI<-, sX<-, sB<-, are also available.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
sI(x, ...)

## S4 method for signature 'BAf'
sI(x)

sI(x, ...) <- value

## S4 replacement method for signature 'BAf'
sI(x) <- value

sX(x, ...)

## S4 method for signature 'BAf'
sX(x, b_id, drop = TRUE)

sX(x, ...) <- value

## S4 replacement method for signature 'BAf'
sX(x) <- value

sB(x, ...)

## S4 method for signature 'BAf'
sB(x)

sB(x, ...) <- value

## S4 replacement method for signature 'BAf'
sB(x) <- value

sA(x, ...)

## S4 method for signature 'BAf'
sA(x, wise = c("sinfo", "binder"))

sA(x, ...) <- value

## S4 replacement method for signature 'BAf'
sA(x, wise = c("sinfo", "binder")) <- value

codebook(x, ...)

## S4 method for signature 'BAf'
codebook(x, wise = c("sinfo", "binder"))

codebook(x, ...) <- value

## S4 replacement method for signature 'BAf'
codebook(x, wise = c("sinfo", "binder")) <- value

note(x)

## S4 method for signature 'BAf'
note(x)

note(x) <- value

## S4 replacement method for signature 'BAf'
note(x) <- value

Arguments

x

an object of the BAf-class

...

for other functions with same name

value

a tbl_df, data.frame or matrix that fits to the accessing slot

b_id

one or more binder IDs. This allows to find the data of those binders ignoring repeat indicator, like sX(x)[, match(b_id, bid(x, exact = F))]. For an exact match, use `[` as sX(x)[, b_id], instead.

drop

same as [

wise

which batch, sample-wise or binder-wise.

Value

sI a tbl_df of sample information of the given BAf
sX a matrix or vector of numerical measurement values obtained from binder arrays
sB a data.frame of the information about binders
sA a list of data.frame of batch (or assay) dependent information for the samples or binders
codebook a list of two data.frames named as sinfo and binder unless wise is given. Each contains the codebook for the @sinfo or @binder above.
note any note in any form

Author(s)

Mun-Gwan Hong <mun-gwan.hong@scilifelab.se>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
data(sba)

sI(sba)

sX(sba)[1:5, 1:5]           # (entire matrix)[1:5, 1:5]
sX(sba, "T2")[1:10]         # only the values obtained by 'T2' binder [1:10]
dim(sX(sba, "T2", drop= FALSE))

sB(sba)

head(sA(sba, "s")$fail_flag)
sA(sba, "sinfo")$fail_flag[1:5, ]
sA(sba, "sample")$fail_flag[1, ] <- FALSE      # 'sample' instead of 'sinfo'
sA(sba, "sinfo")$fail_flag[1:5, ]
head(sA(sba, "binder")$fail_flag)

head(codebook(sba))              # both codebooks for samples & binders
codebook(sba, "bin")         # short name
codebook(sba, "sample")      # 'sample' instead of 'sinfo'

Rundmus/BAf-R_package documentation built on May 18, 2020, 12:59 p.m.