Last data update: 2014.03.03

R: Collapse multiple technical replicate count columns into two...
collapseRepliCountsR Documentation

Collapse multiple technical replicate count columns into two columns for plotting

Description

.

Usage

collapseRepliCounts(x, pair=nv(levels(x$samples$group)[1:2] , c('ref','obs')))

Arguments

x

a MANTA object.

pair

the pairs indicating which columns to collapse

Value

a collapsed, two-column count table

See Also

DGEList, manta

Examples



cts <- matrix(data=rnbinom(28,2,.4), ncol=4, nrow=7)

colnames(cts) <- apply(expand.grid(c('a','b'),1:2), 1, paste, collapse='_')

x <- manta(cts, makeSampleDF(cts, group=rep(c('a','b'),2)))
collapseRepliCounts(x, pair=c('a','b'))



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(manta)
Loading required package: edgeR
Loading required package: limma
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/manta/collapseRepliCounts.Rd_%03d_medium.png", width=480, height=480)
> ### Name: collapseRepliCounts
> ### Title: Collapse multiple technical replicate count columns into two
> ###   columns for plotting
> ### Aliases: collapseRepliCounts
> 
> ### ** Examples
> 
> 
> 
> cts <- matrix(data=rnbinom(28,2,.4), ncol=4, nrow=7)
> 
> colnames(cts) <- apply(expand.grid(c('a','b'),1:2), 1, paste, collapse='_')
> 
> x <- manta(cts, makeSampleDF(cts, group=rep(c('a','b'),2)))
> collapseRepliCounts(x, pair=c('a','b'))
  NA NA
1  0  0
2  0  0
3  0  0
4  0  0
5  0  0
6  0  0
7  0  0
Warning message:
In collapseRepliCounts(x, pair = c("a", "b")) :
  You're trying to collapse replicates, yet no psudo.alt exists in your object. 
               Consider running estimateCommonDisp first!.  Using raw counts instead.
> 
> 
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>