modules_from_samples: Find modules in networks sampled across MCMC at specific time...

View source: R/modules.R

modules_from_samplesR Documentation

Find modules in networks sampled across MCMC at specific time slices

Description

Find modules in networks sampled across MCMC at specific time slices

Usage

modules_from_samples(sampled_networks)

Arguments

sampled_networks

List of sampled networks at time slices produced by get_sampled_networks().

Value

Data frame with module membership information for each sampled network at each time slice.

Examples

## Not run: 
  data_path <- system.file("extdata", package = "evolnets")
  tree <- read_tree_from_revbayes(paste0(data_path,"/tree_pieridae.tre"))
  host_tree <- ape::read.tree(paste0(data_path,"/host_tree_pieridae.phy"))
  history <- read_history(paste0(data_path,"/history_thin_pieridae.txt"), burnin = 0)

  ages <- c(60,50,40,0)
  at_ages <- posterior_at_ages(history, ages, tree, host_tree)
  sampled_networks <- get_sampled_networks(at_ages)
  mod_samples <- modules_from_samples(sampled_networks)

## End(Not run)

maribraga/evolnets documentation built on Feb. 3, 2025, 6:46 p.m.