Skip to contents

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(...)

Arguments

...

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

Value

An rbiom object.

See also

Other biom: bdply()

Examples

    library(rbiom)
    
    b1 <- as_rbiom(hmp50$counts[,1:4])
    b2 <- as_rbiom(hmp50$counts[,5:8])
    
    biom <- biom_merge(b1, b2)
    print(biom)
#> 
#> ══ Merged BIOM ═════════════════════════════════════════════
#> 
#>       8 Samples: HMP01, HMP02, HMP03, ..., and HMP08
#>     168 OTUs:    Unc53100, Unc26984, Unc00c7g, ...
#>       1 Ranks:   .otu
#>       1 Fields:  .sample
#>         Tree:    
#> <absent>
#> 
#> ── 1.4k - 4.2k reads/sample ────────────────── 2024-04-26 ──
#> 
    
    biom$tree     <- hmp50$tree
    biom$metadata <- hmp50$metadata
    print(biom)
#> 
#> ══ Merged BIOM ═════════════════════════════════════════════
#> 
#>       8 Samples: HMP01, HMP02, HMP03, ..., and HMP08
#>     168 OTUs:    Unc53100, Unc26984, Unc00c7g, ...
#>       1 Ranks:   .otu
#>       5 Fields:  .sample, Age, BMI, Body Site, and Sex
#>         Tree:    
#> <present>
#> 
#> ── 1.4k - 4.2k reads/sample ────────────────── 2024-04-26 ──
#>