phsc.get.most.likely.transmission.chains.RBGLedmonds: Construct maximum probability transmission network

View source: R/phyloscan.fun.private.R

phsc.get.most.likely.transmission.chains.RBGLedmondsR Documentation

Construct maximum probability transmission network

Description

This function reconstructs a maximum probility transmission network from the scores associated with directed and undirected edges. The algorithm starts by keeping the edge with highest score. It then removes the competitor in the opposite direction, and any conflicting edges that would result in indegrees larger than one. By construction, all removed edges have lower probability. The algorithm proceeds until all edges have been processed.

Usage

phsc.get.most.likely.transmission.chains.RBGLedmonds(rtnn, verbose = 0)

Arguments

rtn

data.table with network scores for all individuals that could form a network. Must contain columns 'ID1','ID2','IDCLU','GROUP','TYPE','POSTERIOR_SCORE','KEFF'.

Value

new data.table with added columns LINK_12 LINK_21 (either 1 or 0), and MX_PROB_12 MX_PROB_21 (associated posterior probabilities)


olli0601/phyloscan documentation built on May 5, 2024, 5:25 a.m.