Learn R Programming

⚠️There's a newer version (3.2) of this package.Take me there.

MSCquartets (version 3.1)

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.1

License

MIT + file LICENSE

Maintainer

John Rhodes

Last Published

March 7th, 2025

Functions in MSCquartets (3.1)

TINNIKdist

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

Collapse short tree edges
circHybOrders

Generate all circular orders with designated hybrid
WQDC

Compute Weighted Quartet Distance Consensus tree from gene tree data
allPerms

Generate permutations
WQDS

Compute the Weighted Quartet Distance Supertree
blobDistance

Compute empirical distance between taxon groups.
cutDensity

Probability density function for Cut Model
nexusDist

Write a distance table to a file in nexus format
dataGeneTreeSample

Simulated gene tree dataset from species tree
labelIntNodes

Label internal nodes on tree
dataPapioniniVanderpool

Papionini gene tree dataset
dataYeastRokas

Yeast gene tree dataset
estimateEdgeLengths

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

Expected NANUQ cycle distance
fitCycleOrders

Compute fit of circular orders to distance with least squares
initBquartets

Initialize vector of B quartets
quartetBTinferencePlot

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

Plot histogram of log p-values in table
pTableYeastRokas

pTable for Yeast dataset
expectedCFs

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

Expected modNANUQ cycle distance
combineCycleResolutions

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

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

Groups taxa by deleting a node in a tree
ordersHeuristicmodNANUQ

Choose cycle orders heuristically from empirical modNANUQ distance
quartetTableCollapse

Reduce quartet table by combining some taxa
quartetTableDominant

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

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

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

Produce table of counts of quartets displayed on trees
quartetStarTestInd

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

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

Power divergence statistic of Cressie & Read
quartetWeightedDist

Compute the Weighted Quartet Distance between taxa
resolveCycle

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

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

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

Compute quartet distance between taxa
quartetTestPlot

Produce simplex plot with results of quartet hypothesis tests
quartetTableResolved

Modify quartet table to show only resolved quartets
taxonNames

Get all taxon names from a collection of trees
suppressNetBinaryNodes

Suppress Network Binary Nodes
simplexText

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

Tree of blobs for a network
sortQuartetTableRows

Sort quartet table rows by lex order
tableHeliconiusMartin

Quartet table for Heliconius gene tree dataset
simplexPrepare

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

Build quartet table from distances
quartetTreeTestInd

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

Quartet table for Leopardus dataset
simplexSegment

Plot line segment in 2-d probability simplex
compatibleSplits

Extract compatible splits
quartetNetworkDist

Compute network quartet distance between taxa
quartetStarTest

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

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

Resolve Tree of Blobs to Level-1 network
quartetTablePrint

Print a quartet table with nice formatting
simplexCoords

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

Produce tree from compatible splits
topDist

Topological distances on a tree
simplexLabels

Label vertices of 2-d probability simplex
simplexPoint

Plot point in 2-d probability simplex
HolmBonferroni

Apply Holm-Bonferroni method to adjust for multiple tests
BQinference

Main loop of B-quartet inference
NANUQdist

Compute NANUQ distance and write to file
MSCquartets-package

Multispecies Coalescent Model Quartet Package
QDC

Compute Quartet Distance Consensus tree from gene tree data
T3density

Probability density function for Model T3
NANUQ

Apply NANUQ network inference algorithm to gene tree data
T1density

Probability density function for Model T1
QDS

Compute Quartet Distance Supertree
M0

Modified Struve function
TINNIK

TINNIK algorithm to infer species tree of blobs
WQDCrecursive

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