Hi, I am trying to generate a table but I keep getting this error.
julia> # Convert to DataFrame and save
julia> df = writeTableCF(q, t) # Requires PhyloNetworks v2.0+
ERROR: UndefVarError: `writeTableCF` not defined in `Main`
Suggestion: check for spelling errors or missing imports.
Stacktrace:
[1] top-level scope
This is my full code but the error only comes at DataFrame"using PhyloNetworks, CSV, DataFrames
# ---------------------------
# Step 1: Read Input Data
# ---------------------------
# Read gene trees (RAxML bootstraps or best trees)
genetrees = readMultiTopology("D:/Project/2025 study/Results/plastomes/aligned/ASTRAL/species2_tree.tre")
# ---------------------------
# Step 2: Calculate Concordance Factors (CFs)
# ---------------------------
q, t = countquartetsintrees(genetrees)
df = writeTableCF(q, t)
CSV.write("D:/Project/2025 study/Results/CF_table.csv", DataFrames.describe(df) # Save CF table
# ---------------------------
# Step 3: Read Species Tree & Run SNaQ
# ---------------------------
astraltree = readTopology("D:/Project/2025 study/Results/plastomes/aligned/ASTRAL/species3_tree.tre")
raxmlCF = readTableCF("D:/Project/2025 study/Results/CF_table.csv")
# Run SNaQ (allow 1 hybridization with hmax=1)
net0 = snaq!(
astraltree,
hmax = 1, # Allow 1 hybridization event
filename = "D:/Project/2025 study/Results/net0",
seed = 3456,
runs = 100
)"
How can I solve this?
cheers,
Wyclif