Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in treeWAS(snps = snps, phen = phen, tree = tree, n.subs = NULL, : Some elements of tree$tip.label are absent from names(phen). #70

Open
xqzangnolan opened this issue Jul 13, 2023 · 1 comment

Comments

@xqzangnolan
Copy link

excuse me,
when I run "
out <- treeWAS(snps = snps,
phen = phen,
tree = tree,
n.subs = NULL, ## (optional input: n.subs)
n.snps.sim = ncol(snps)*10,
chunk.size = ncol(snps),
test = c("terminal", "simultaneous", "subsequent"),
snps.reconstruction = "parsimony", ## (optional input: snps.rec)
snps.sim.reconstruction = "parsimony",
phen.reconstruction = "parsimony",
phen.type = NULL,
na.rm = TRUE,
p.value = 0.01,
p.value.correct = "bonf",
p.value.by = "count",
dist.dna.model = "JC69",
plot.tree = TRUE,
plot.manhattan = TRUE,
plot.null.dist = TRUE,
plot.dist = FALSE,
snps.assoc = NULL,
filename.plot = NULL,
seed = 1)"

the followed sentences returned" Error in treeWAS(snps = snps, phen = phen, tree = tree, n.subs = NULL, :
Some elements of tree$tip.label
are absent from names(phen)."
But I checked the tree$tip.label was the same as the names(phen).

Looking forward to your help,
Best,
Xiaoqi

@caitiecollins
Copy link
Owner

Hi,

Could you please confirm by running this line on your tree and phen:
all(tree$tip.label %in% names(phen))

Does it return TRUE?

If you are able to share your tree and phen data with me, I'm also happy to take a look and figure out what's going on. You could attach your data publicly here or send it to me privately at [email protected].

Best,
Caitlin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants