Learn R Programming

rbiom (version 2.2.0)

biom_merge: Combine several rbiom objects into one.

Description

WARNING: It is generally ill-advised to merge BIOM datasets, as OTUs mappings are dependent on upstream clustering and are not equivalent between BIOM files.

Usage

biom_merge(
  ...,
  metadata = NA,
  taxonomy = NA,
  tree = NULL,
  sequences = NA,
  id = NA,
  comment = NA
)

Value

An rbiom object.

Arguments

...

Any number of rbiom objects (e.g. from as_rbiom()), lists of rbiom objects, or valid arguments to the biom parameter of as_rbiom() (for instance file names).

metadata, taxonomy, tree, sequences, id, comment

Replace the corresponding data in the merged rbiom object with these values. Set to NULL to not inherit a particular component. The default, NA, will attempt to create the component based on ... values. The merged phylogenetic tree cannot be inferred.

See Also

Other biom: bdply()

Examples

Run this code
    library(rbiom)
    
    b1 <- as_rbiom(hmp50$counts[,1:4])
    b2 <- as_rbiom(hmp50$counts[,5:8])
    
    biom <- biom_merge(b1, b2)
    print(biom)
    
    biom$tree     <- hmp50$tree
    biom$metadata <- hmp50$metadata
    print(biom)

Run the code above in your browser using DataLab