Last data update: 2014.03.03

R: Convert a manta object's meta slot data into counts
meta2countsR Documentation

Convert a manta object's meta slot data into counts

Description

This is a helper function for the mantaMethod

Usage

meta2counts(obj, meta.lev, rm.sum=TRUE, meta.subset=NULL)

Arguments

obj

A manta object.

meta.lev

The taxinomic rank level (phylum, genus, etc) from which to pull counts.

rm.sum

Whether or not to remove the overall 'sum' (over all conditions) column.

meta.subset

Which sub rank level (the subset) for which to estimate the normalization. By default is does the overall normalization

Value

a count matrix

See Also

manta, mantaMethod

Examples



manta.path <- system.file("extdata","PapaGO-BLAST.results-diatoms.Rdata", package="manta")
load(manta.path)

tab <- meta2counts(x, meta.lev='genus_sp', meta.subset='Pseudo-nitzschia granii')


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/meta2counts.Rd_%03d_medium.png", width=480, height=480)
> ### Name: meta2counts
> ### Title: Convert a manta object's meta slot data into counts
> ### Aliases: meta2counts
> 
> ### ** Examples
> 
> 
> 
> manta.path <- system.file("extdata","PapaGO-BLAST.results-diatoms.Rdata", package="manta")
> load(manta.path)
> 
> tab <- meta2counts(x, meta.lev='genus_sp', meta.subset='Pseudo-nitzschia granii')
> 
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>