Beginning multipartite
This commit is contained in:
parent
bf571317f4
commit
5c955a8478
1 changed files with 23 additions and 0 deletions
23
multipartite-lbm.R
Normal file
23
multipartite-lbm.R
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
library("sbm")
|
||||
library("phyloseq")
|
||||
library("microbiome")
|
||||
|
||||
source("load-europe.R")
|
||||
|
||||
# Define the taxonomy structure as a multipartite network
|
||||
|
||||
type <- "bipartite"
|
||||
model <- "poisson"
|
||||
|
||||
## Define all adjacency matrices
|
||||
kingdom_sample_mat <- otu_table(aggregate_taxa(cpd_phyloseq_europe, level = "kingdom"))
|
||||
phylum_sample_mat <- otu_table(aggregate_taxa(cpd_phyloseq_europe, level = "phylum"))
|
||||
class_sample_mat <- otu_table(aggregate_taxa(cpd_phyloseq_europe, level = "class"))
|
||||
order_sample_mat <- otu_table(aggregate_taxa(cpd_phyloseq_europe, level = "order"))
|
||||
family_sample_mat <- otu_table(aggregate_taxa(cpd_phyloseq_europe, level = "family"))
|
||||
genus_sample_mat <- otu_table(aggregate_taxa(cpd_phyloseq_europe, level = "genus"))
|
||||
|
||||
## Define taxonomic relations
|
||||
|
||||
## Define the SBMs
|
||||
KingdomSample <- defineSBM(otu_table())
|
||||
Loading…
Add table
Reference in a new issue