Last data update: 2014.03.03

R: Filtering/Masking expression data
maskR Documentation

Filtering/Masking expression data

Description

Identyfying probes with binding affinity difference (BAD probes) between two groups of samples on the basis of expression data.

Usage

mask(affy,exprlist=NULL,useExpr=TRUE,ind,PM=FALSE,verbose=TRUE)

Arguments

affy

An object of class AffyBatch.

exprlist

A vector with probesetnames to be used. If NULL, all probesets are analyzed.

useExpr

Logical. If 'TRUE', only expressed genes (see Details) are used. If 'FALSE', all probes are analyzed.

ind

Numeric vector, with values 1 and 2, definining group assignement for samples in affy.

PM

Logical. If 'TRUE', only probes with a mean pm value greater than the mean mm value are used.

verbose

Logical. If 'TRUE', it writes out some messages indicating progress. If 'FALSE' nothing should be printed.

Details

The function mask identifies in expression data probes which binding affinity (BAD probes) differs between two groups of samples, e.g two species. The basic input data is AffyBatch object(expresssion data prepared using the function ReadAffy from the library Affy) and a vector defining group assignement of samples. As masking is based on expression values, only expressed probes should be used. As a default they are defined by the affy function mas5calls and condition of being expressed (having "P" value) in at least 90% of samples from each group, but any set of probesets might be submitted with exprlist argument. Probes are analyzed for difference in binding affinity between groups. Each probe is assigned a quality score, based on all pairwise probes' correlations within probesets (for details see vignette or paper). Probes' quality scores, their x and y coordinates on the microarray and the probeset names are stored in a matrix.

Value

A list of two objects will be returned.

probes

A data frame with x,y coordinates, quality score and probeset for each analyzed probe.

notUsed

If PM=TRUE: A vector with unused probes having a lower pm mean value than mm mean value.

Author(s)

Michael Dannemann, Michael Lachmann

References

Dannemann et al, The effects of probe binding affinity differences on gene expression measurements and how to deal with them. Bioinformatics 2009 Khaitovich et al,Parallel Patterns of Evolution in the Genomes and Transcriptomes of Humans and Chimpanzees, Science 2005

See Also

overlapExprExtMasks, prepareMaskedAffybatch, mas5calls, plotProbe

Examples

data(AffyBatch)
## we provide 20 samples (10 for both human and chimpanzee)
## the first 10 entries are chimpanzee samples the last 10 from human
ind.vec=rep(1:2,each=10)
## mask on AffyBatch with all genes 
exmask <-
mask(newAffyBatch,ind=ind.vec,PM=TRUE,useExpr=FALSE)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(maskBAD)
Loading required package: gcrma
Loading required package: affy
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/maskBAD/mask.Rd_%03d_medium.png", width=480, height=480)
> ### Name: mask
> ### Title: Filtering/Masking expression data
> ### Aliases: mask
> ### Keywords: internal
> 
> ### ** Examples
> 
> data(AffyBatch)
> ## we provide 20 samples (10 for both human and chimpanzee)
> ## the first 10 entries are chimpanzee samples the last 10 from human
> ind.vec=rep(1:2,each=10)
> ## mask on AffyBatch with all genes 
> exmask <-
+ mask(newAffyBatch,ind=ind.vec,PM=TRUE,useExpr=FALSE)
extract expression information
mask probes
1 / 100 
2 / 100 
3 / 100 
4 / 100 
5 / 100 
6 / 100 
7 / 100 
8 / 100 
9 / 100 
10 / 100 
11 / 100 
12 / 100 
13 / 100 
14 / 100 
15 / 100 
16 / 100 
17 / 100 
18 / 100 
19 / 100 
20 / 100 
21 / 100 
22 / 100 
23 / 100 
24 / 100 
25 / 100 
26 / 100 
27 / 100 
28 / 100 
29 / 100 
30 / 100 
31 / 100 
32 / 100 
33 / 100 
34 / 100 
35 / 100 
36 / 100 
37 / 100 
38 / 100 
39 / 100 
40 / 100 
41 / 100 
42 / 100 
43 / 100 
44 / 100 
45 / 100 
46 / 100 
47 / 100 
48 / 100 
49 / 100 
50 / 100 
51 / 100 
52 / 100 
53 / 100 
54 / 100 
55 / 100 
56 / 100 
57 / 100 
58 / 100 
59 / 100 
60 / 100 
61 / 100 
62 / 100 
63 / 100 
64 / 100 
65 / 100 
66 / 100 
67 / 100 
68 / 100 
69 / 100 
70 / 100 
71 / 100 
72 / 100 
73 / 100 
74 / 100 
75 / 100 
76 / 100 
77 / 100 
78 / 100 
79 / 100 
80 / 100 
81 / 100 
82 / 100 
83 / 100 
84 / 100 
85 / 100 
86 / 100 
87 / 100 
88 / 100 
89 / 100 
90 / 100 
91 / 100 
92 / 100 
93 / 100 
94 / 100 
95 / 100 
96 / 100 
97 / 100 
98 / 100 
99 / 100 
100 / 100 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>