Package: MSCquartets 3.3

MSCquartets: Analyzing Gene Tree Quartets under the Multi-Species Coalescent

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) <doi:10.1214/19-EJS1576>, simplex plots of quartet concordance factors as presented by Allman et al. (2020) <doi:10.1101/2020.02.13.948083>, species tree inference methods based on quartet distances of Rhodes (2019) <doi:10.1109/TCBB.2019.2917204> and Yourdkhani and Rhodes (2019) <doi:10.1007/s11538-020-00773-4>, the NANUQ algorithm for inference of level-1 species networks of Allman et al. (2019) <doi:10.1186/s13015-019-0159-2>, the TINNIK algorithm for inference of the tree of blobs of an arbitrary network of Allman et al.(2022) <doi:10.1007/s00285-022-01838-9>, NANUQ+ routines for resolving multifurcations in the tree of blobs to cycles as in Rhodes et al.(2024) <doi:10.1186/s13015-025-00274-w>, and the ECToBlob algorithm for inference of a network with no anomalous quartets of Allman et al. (2026) (forthcoming). Software announcement by Rhodes et al. (2020) <doi:10.1093/bioinformatics/btaa868>.

Authors:Elizabeth Allman [aut], Hector Banos [aut], Jonathan Mitchell [aut], Kristina Wicke [aut], John Rhodes [aut, cre]

MSCquartets_3.3.tar.gz
MSCquartets_3.3.zip(r-4.7)MSCquartets_3.3.zip(r-4.6)MSCquartets_3.3.zip(r-4.5)
MSCquartets_3.3.tgz(r-4.6-x86_64)MSCquartets_3.3.tgz(r-4.6-arm64)MSCquartets_3.3.tgz(r-4.5-x86_64)MSCquartets_3.3.tgz(r-4.5-arm64)
MSCquartets_3.3.tar.gz(r-4.7-arm64)MSCquartets_3.3.tar.gz(r-4.7-x86_64)MSCquartets_3.3.tar.gz(r-4.6-arm64)MSCquartets_3.3.tar.gz(r-4.6-x86_64)
MSCquartets_3.3.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION
card.svg |card.png
MSCquartets/json (API)

# Install 'MSCquartets' in R:
install.packages('MSCquartets', repos = c('https://johnarhodes.r-universe.dev', 'https://cloud.r-project.org'))
Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

Conda:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

cpp

2.88 score 25 scripts 679 downloads 75 exports 27 dependencies

Last updated from:0b3cfb335d. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK199
linux-devel-x86_64OK180
source / vignettesOK223
linux-release-arm64OK190
linux-release-x86_64OK186
macos-release-arm64OK179
macos-release-x86_64OK329
macos-oldrel-arm64OK226
macos-oldrel-x86_64OK359
windows-develOK157
windows-releaseOK150
windows-oldrelOK169
wasm-releaseOK134

Exports:allPermsblobDistanceBQinferencecircHybOrderscollapseEdgescombineCycleResolutionscombinePcompatibleSplitscutDensityECToBlobECToBlob_biECToBlob_mulECToBlob_quadestimateEdgeLengthsexpectedCFsexpmodNANUQCycleDistexpNANUQCycleDistfitCycleOrdersHolmBonferroniinitBquartetslabelIntNodesM0NANUQNANUQdistnexusDistnodeGroupsordersHeuristicmodNANUQpowerDivStatpvalHistQDCQDSquartetBTinferencePlotquartetCutMLEquartetCutTestquartetCutTestIndquartetDistquartetDistTreequartetECtestIndquartetNetworkDistquartetStarTestquartetStarTestIndquartetTablequartetTableCollapsequartetTableDominantquartetTableParallelquartetTablePrintquartetTableResolvedquartetTallyCppquartetTestPlotquartetTreeErrorProbquartetTreeTestquartetTreeTestIndquartetWeightedDistresolveCycleresolveLevel1simplexCoordssimplexLabelssimplexPointsimplexPreparesimplexSegmentsimplexTextsortQuartetTableRowssuppressNetBinaryNodesT1densityT3densitytaxonNamesTINNIKTINNIKdisttopDisttreeFromSplitstreeOfBlobsWQDCWQDCrecursiveWQDSWQDSAdjustLengths

Dependencies:apeclicodetoolscpp11digestdoParallelfastmatchforeachgenericsglueigraphiteratorslatticelifecyclemagrittrMatrixnlmephangornpkgconfigquadprogrbibutilsRcppRcppProgressRdpackrlangvctrszipfR

Inferring a Tree of Blobs with ECToBlob
Why use ECToBlob? | Preparing the input data | (1) Gene trees (genedata) | Notes on gene trees | (2) A tree (tree) | Notes on the input tree | Initial analysis | Output plots | Note on computation | Combining quartet p-values | Multiple testing correction | Examples | Selecting a tree using the $\alpha$ threshold | Reporting recommendations | References

Last update: 2026-05-28
Started: 2026-05-28

Inferring a Level-1 network with the NANUQ+ routines
Why use NANUQ$^+$ routines? | Preparing the input data | Notes: | Step 1: Inferring the tree of blobs | Using NANUQ to explore whether multifurcations should be resolved into cycles | Note: | Step 2: Resolving multifurcations | Estimating numerical parameters and further comparing multiple optimal resolutions | References

Last update: 2025-03-07
Started: 2024-10-30

Inferring a Tree of Blobs with TINNIK
Why use TINNIK? | Preparing the input data | Notes: | An initial analysis | Varying the test levels | Note: | References

Last update: 2024-08-19
Started: 2024-08-19

Readme and manuals

Help Manual

Help pageTopics
Multispecies Coalescent Model Quartet PackageMSCquartets-package MSCquartets
Generate permutationsallPerms
ASTRAL tree for Leopardus datasetASTRALtreeLeopardusLescroart
Compute empirical distance between taxon groups.blobDistance
Main loop of B-quartet inferenceBQinference
Generate all circular orders with designated hybridcircHybOrders
Collapse short tree edgescollapseEdges
Combine several cycle resolutions on a tree of blobs to create a networkcombineCycleResolutions
Combine p-values of testscombineP
Extract compatible splitscompatibleSplits
Probability density function for Cut ModelcutDensity
Simulated gene tree dataset from species treedataGeneTreeSample
Papionini gene tree datasetdataPapioniniVanderpool
Yeast gene tree datasetdataYeastRokas
Edge Contraction to infer a Tree of BlobsECToBlob
Edge Contraction to infer a Tree of Blobs - bipartition modeECToBlob_bi
Edge Contraction to infer a Tree of Blobs - multipartition modeECToBlob_mul
Edge Contraction to infer a Tree of Blobs - quadripartition modeECToBlob_quad
Estimate edge lengths on a species tree from gene tree quartet countsestimateEdgeLengths
Produce table of expected quartet concordance factors for a species treeexpectedCFs
Expected modNANUQ cycle distanceexpmodNANUQCycleDist
Expected NANUQ cycle distanceexpNANUQCycleDist
Compute fit of circular orders to distance with least squaresfitCycleOrders
Apply Holm-Bonferroni method to adjust for multiple testsHolmBonferroni
Initialize vector of B quartetsinitBquartets
Label internal nodes on treelabelIntNodes
Modified Struve functionM0
Apply NANUQ network inference algorithm to gene tree dataNANUQ
Compute NANUQ distance and write to fileNANUQdist
Write a distance table to a file in nexus formatnexusDist
Groups taxa by deleting a node in a treenodeGroups
Choose cycle orders heuristically from empirical modNANUQ distanceordersHeuristicmodNANUQ
Power divergence statistic of Cressie & ReadpowerDivStat
pTable for Yeast datasetpTableYeastRokas
Plot histogram of log p-values in tablepvalHist
Compute Quartet Distance Consensus tree from gene tree dataQDC
Compute Quartet Distance SupertreeQDS
Produce simplex plot with results of B/T-quartet inferencequartetBTinferencePlot
Maximum likelihood estimate of quartet tree of blobs topology and CF under Cut modelquartetCutMLE
Hypothesis test for quartet counts fitting a resolved quartet tree of blobs under NMSCquartetCutTest
Multiple independent hypothesis tests for quartet counts fitting the Cut model under the NMSCquartetCutTestInd
Compute quartet distance between taxaquartetDist
Build a Species Tree from Gene Trees Using the Quartet DistancequartetDistTree
Hypothesis testing of quartet counts for ECToBlobquartetECtestInd
Compute network quartet distance between taxaquartetNetworkDist
Hypothesis test for quartet counts fitting a star tree under the MSCquartetStarTest
Multiple independent hypothesis tests for gene quartet counts fitting a species quartet star tree under the MSCquartetStarTestInd
Produce table of counts of quartets displayed on treesquartetTable
Reduce quartet table by combining some taxaquartetTableCollapse
Produce table of dominant quartets, with estimates of internal edge lengthsquartetTableDominant
Produce table of counts of quartets displayed on trees, in parallel for large data setsquartetTableParallel
Print a quartet table with nice formattingquartetTablePrint
Modify quartet table to show only resolved quartetsquartetTableResolved
Build quartet table from distancesquartetTallyCpp
Produce simplex plot with results of quartet hypothesis testsquartetTestPlot
Bayesian posterior probability of error in 4-taxon unrooted species tree topology estimatequartetTreeErrorProb
Hypothesis test for quartet counts fitting a tree under the MSCquartetTreeTest
Multiple independent hypothesis tests for quartet counts fitting a species tree under the MSCquartetTreeTestInd
Compute the Weighted Quartet Distance between taxaquartetWeightedDist
Resolve a node on a tree of blobs as a cycleresolveCycle
Resolve Tree of Blobs to Level-1 networkresolveLevel1
Convert 3-d coordinates to 2-d probability simplex coordinatessimplexCoords
Label vertices of 2-d probability simplexsimplexLabels
Plot point in 2-d probability simplexsimplexPoint
Draw 2-d probability simplex, with model lines for T3 or T1 modelsimplexPrepare
Plot line segment in 2-d probability simplexsimplexSegment
Add text at a point in 2-d probability simplexsimplexText
Sort quartet table rows by lex ordersortQuartetTableRows
Suppress Network Binary NodessuppressNetBinaryNodes
Probability density function for Model T1T1density
Probability density function for Model T3T3density
Quartet table for Heliconius gene tree datasettableHeliconiusMartin
Quartet table for Leopardus datasettableLeopardusLescroart
Get all taxon names from a collection of treestaxonNames
TINNIK algorithm to infer species tree of blobsTINNIK
Compute TINNIK distance from quartets and hypothesis test p-valuesTINNIKdist
Topological distances on a treetopDist
Produce tree from compatible splitstreeFromSplits
Tree of blobs for a networktreeOfBlobs
Compute Weighted Quartet Distance Consensus tree from gene tree dataWQDC
Compute the Recursive Weighted Quartet Distance Consensus tree from gene tree dataWQDCrecursive
Compute the Weighted Quartet Distance SupertreeWQDS
Adjust edge lengths on tree built from Weighted Quartet distance to estimate metric treeWQDSAdjustLengths