Learn R Programming

MSCquartets (version 3.2)

Analyzing Gene Tree Quartets under the Multi-Species Coalescent

Description

Methods for analyzing and using quartets displayed on a collection of gene trees, primarily to make inferences about the species tree or network under the multi-species coalescent model. These include quartet hypothesis tests for the model, as developed by Mitchell et al. (2019) , simplex plots of quartet concordance factors as presented by Allman et al. (2020) , species tree inference methods based on quartet distances of Rhodes (2019) and Yourdkhani and Rhodes (2019) , the NANUQ algorithm for inference of level-1 species networks of Allman et al. (2019) , the TINNIK algorithm for inference of the tree of blobs of an arbitrary network of Allman et al.(2022) , and NANUQ+ routines for resolving multifurcations in the tree of blobs to cycles as in Allman et al.(2024) (forthcoming). Software announcement by Rhodes et al. (2020) .

Copy Link

Version

Install

install.packages('MSCquartets')

Monthly Downloads

764

Version

3.2

License

MIT + file LICENSE

Maintainer

John Rhodes

Last Published

March 20th, 2025

Functions in MSCquartets (3.2)

WQDC

Compute Weighted Quartet Distance Consensus tree from gene tree data
WQDS

Compute the Weighted Quartet Distance Supertree
TINNIKdist

Compute TINNIK distance from quartets and hypothesis test p-values
collapseEdges

Collapse short tree edges
WQDCrecursive

Compute the Recursive Weighted Quartet Distance Consensus tree from gene tree data
WQDSAdjustLengths

Adjust edge lengths on tree built from Weighted Quartet distance to estimate metric tree
estimateEdgeLengths

Estimate edge lengths on a species tree from gene tree quartet counts
expectedCFs

Produce table of expected quartet concordance factors for a species tree
expmodNANUQCycleDist

Expected modNANUQ cycle distance
expNANUQCycleDist

Expected NANUQ cycle distance
dataYeastRokas

Yeast gene tree dataset
powerDivStat

Power divergence statistic of Cressie & Read
labelIntNodes

Label internal nodes on tree
compatibleSplits

Extract compatible splits
combineCycleResolutions

Combine several cycle resolutions on a tree of blobs to create a network
nexusDist

Write a distance table to a file in nexus format
dataPapioniniVanderpool

Papionini gene tree dataset
pTableYeastRokas

pTable for Yeast dataset
ordersHeuristicmodNANUQ

Choose cycle orders heuristically from empirical modNANUQ distance
dataGeneTreeSample

Simulated gene tree dataset from species tree
nodeGroups

Groups taxa by deleting a node in a tree
fitCycleOrders

Compute fit of circular orders to distance with least squares
quartetTableCollapse

Reduce quartet table by combining some taxa
cutDensity

Probability density function for Cut Model
quartetNetworkDist

Compute network quartet distance between taxa
quartetStarTest

Hypothesis test for quartet counts fitting a star tree under the MSC
initBquartets

Initialize vector of B quartets
quartetTableDominant

Produce table of dominant quartets, with estimates of internal edge lengths
quartetTable

Produce table of counts of quartets displayed on trees
quartetCutMLE

Maximum likelihood estimate of quartet tree of blobs topology and CF under Cut model
quartetStarTestInd

Multiple independent hypothesis tests for gene quartet counts fitting a species quartet star tree under the MSC
quartetTallyCpp

Build quartet table from distances
quartetTableResolved

Modify quartet table to show only resolved quartets
pvalHist

Plot histogram of log p-values in table
quartetCutTestInd

Multiple independent hypothesis tests for quartet counts fitting the Cut model under the NMSC
quartetBTinferencePlot

Produce simplex plot with results of B/T-quartet inference
quartetDist

Compute quartet distance between taxa
quartetTreeTestInd

Multiple independent hypothesis tests for quartet counts fitting a species tree under the MSC
quartetTreeTest

Hypothesis test for quartet counts fitting a tree under the MSC
quartetCutTest

Hypothesis test for quartet counts fitting a resolved quartet tree of blobs under NMSC
resolveLevel1

Resolve Tree of Blobs to Level-1 network
simplexCoords

Convert 3-d coordinates to 2-d probability simplex coordinates
quartetTestPlot

Produce simplex plot with results of quartet hypothesis tests
simplexLabels

Label vertices of 2-d probability simplex
quartetTreeErrorProb

Bayesian posterior probability of error in 4-taxon unrooted species tree topology estimate
simplexPoint

Plot point in 2-d probability simplex
simplexSegment

Plot line segment in 2-d probability simplex
simplexPrepare

Draw 2-d probability simplex, with model lines for T3 or T1 model
quartetTableParallel

Produce table of counts of quartets displayed on trees, in parallel for large data sets
quartetTablePrint

Print a quartet table with nice formatting
simplexText

Add text at a point in 2-d probability simplex
treeFromSplits

Produce tree from compatible splits
suppressNetBinaryNodes

Suppress Network Binary Nodes
tableHeliconiusMartin

Quartet table for Heliconius gene tree dataset
quartetWeightedDist

Compute the Weighted Quartet Distance between taxa
resolveCycle

Resolve a node on a tree of blobs as a cycle
topDist

Topological distances on a tree
tableLeopardusLescroart

Quartet table for Leopardus dataset
taxonNames

Get all taxon names from a collection of trees
sortQuartetTableRows

Sort quartet table rows by lex order
treeOfBlobs

Tree of blobs for a network
T3density

Probability density function for Model T3
HolmBonferroni

Apply Holm-Bonferroni method to adjust for multiple tests
QDC

Compute Quartet Distance Consensus tree from gene tree data
M0

Modified Struve function
MSCquartets-package

Multispecies Coalescent Model Quartet Package
NANUQ

Apply NANUQ network inference algorithm to gene tree data
BQinference

Main loop of B-quartet inference
T1density

Probability density function for Model T1
NANUQdist

Compute NANUQ distance and write to file
QDS

Compute Quartet Distance Supertree
allPerms

Generate permutations
blobDistance

Compute empirical distance between taxon groups.
circHybOrders

Generate all circular orders with designated hybrid
TINNIK

TINNIK algorithm to infer species tree of blobs