Last data update: 2014.03.03

R: Create MACAT list from objects in workspace
buildMACATR Documentation

Create MACAT list from objects in workspace

Description

This is a wrapper around the preprocessedLoader function. Use it, when you want to build a MACAT-list structure from objects already in your workspace.

Usage

  buildMACAT(matrix, chip, labels = NULL, chromLocObj = NULL)

Arguments

matrix

expression matrix with rows=genes and columns=samples; Rownames have to match chip; Columnnames are not mandatory.

chip

Identifier for used microarray

labels

Classlabels for samples, has to have length=number of columns in matrix

chromLocObj

Object of class chromLocation specifying the genomic position, each probe on the array is mapped to. If not provided, it is build in the function using annotate's function buildChromLocation.

Details

This is only a convenience wrapper around the function preprocessedLoader for the case, that you want to build a MACAT-list from objects in your workspace.

Value

A MACAT-list structure. For an example and a description of the format see data stjude in package 'stjudem'.

Author(s)

MACAT development team

See Also

preprocessedLoader,stjude in package 'stjudem'

Examples

 X <- matrix(rnorm(200),nrow=20,ncol=10)
 rownames(X) <- c('34916_s_at','34917_at','34462_at','163_at','35219_at',
	'31641_s_at','33300_at','33301_g_at','38950_r_at','41249_at',
	'294_s_at','32004_s_at','33299_at','41243_at','33341_at','362_at',
	'1918_at','41499_at','41500_at','41282_s_at')
 colnames(X) <- paste("Sample",1:10,sep="")
 y <- rep(c("A","B"),c(5,5))
 toy <- buildMACAT(X,"hgu95av2.db",y)
 summary(toy)

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(macat)
Loading required package: Biobase
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

Welcome to Bioconductor

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

Loading required package: annotate
Loading required package: AnnotationDbi
Loading required package: stats4
Loading required package: IRanges
Loading required package: S4Vectors

Attaching package: 'S4Vectors'

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

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: XML
Loading MicroArray Chromosome Analysis Tool...
Loading required packages...

Type 'demo(macatdemo)' for a quick tour...

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/macat/buildMACAT.Rd_%03d_medium.png", width=480, height=480)
> ### Name: buildMACAT
> ### Title: Create MACAT list from objects in workspace
> ### Aliases: buildMACAT
> ### Keywords: manip
> 
> ### ** Examples
> 
>  X <- matrix(rnorm(200),nrow=20,ncol=10)
>  rownames(X) <- c('34916_s_at','34917_at','34462_at','163_at','35219_at',
+ 	'31641_s_at','33300_at','33301_g_at','38950_r_at','41249_at',
+ 	'294_s_at','32004_s_at','33299_at','41243_at','33341_at','362_at',
+ 	'1918_at','41499_at','41500_at','41282_s_at')
>  colnames(X) <- paste("Sample",1:10,sep="")
>  y <- rep(c("A","B"),c(5,5))
>  toy <- buildMACAT(X,"hgu95av2.db",y)


Reading expression matrix...
Reading labels...
Assessing chromosome information for genes on chip...
Locating genes on chromosome 1 .... 21 
Locating genes on chromosome 10 .... 0
Locating genes on chromosome 11 .... 0
Locating genes on chromosome 12 .... 0
Locating genes on chromosome 13 .... 0
Locating genes on chromosome 14 .... 0
Locating genes on chromosome 15 .... 0
Locating genes on chromosome 16 .... 0
Locating genes on chromosome 17 .... 0
Locating genes on chromosome 18 .... 0
Locating genes on chromosome 19 .... 0
Locating genes on chromosome 2 .... 0
Locating genes on chromosome 20 .... 0
Locating genes on chromosome 21 .... 0
Locating genes on chromosome 22 .... 0
Locating genes on chromosome 3 .... 0
Locating genes on chromosome 4 .... 1 
Locating genes on chromosome 5 .... 0
Locating genes on chromosome 6 .... 0
Locating genes on chromosome 7 .... 0
Locating genes on chromosome 8 .... 0
Locating genes on chromosome 9 .... 0
Locating genes on chromosome X .... 0
Locating genes on chromosome Y .... 0
Locating genes on chromosome 17_ctg5_hap1 .... 0
Locating genes on chromosome 6_cox_hap2 .... 0
Locating genes on chromosome 6_ssto_hap7 .... 0
Locating genes on chromosome 6_mcf_hap5 .... 0
Locating genes on chromosome 4_ctg9_hap1 .... 0
Locating genes on chromosome 1_gl000191_random .... 0
Locating genes on chromosome 19_gl000209_random .... 0
Locating genes on chromosome 6_qbl_hap6 .... 0
Locating genes on chromosome 6_dbb_hap3 .... 0
Locating genes on chromosome Un_gl000223 .... 0
Locating genes on chromosome 6_apd_hap1 .... 0
Locating genes on chromosome 6_mann_hap4 .... 0
>  summary(toy)
             Length Class  Mode     
geneName      22    -none- character
geneLocation  22    -none- numeric  
chromosome    22    -none- character
expr         200    -none- numeric  
labels        10    -none- character
chip           1    -none- character
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>