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

Bug or feature? #48

Closed
fmichonneau opened this issue Sep 16, 2015 · 0 comments
Closed

Bug or feature? #48

fmichonneau opened this issue Sep 16, 2015 · 0 comments

Comments

@fmichonneau
Copy link
Member

It seems that get_study_tree doesn't return the same number of trees as get_study_meta depending on whether the study is used in the synthetic tree.

If the study is used in the synthetic tree, then get_study_tree will only return 1 tree (the one used for synthesis) but if none of the trees are included in the synthetic tree, then get_study_tree will return all the trees associated with the study.

>  res <- studies_find_trees(property="ot:ottTaxonName", value="Drosophilia")
> res
  study_ids n_trees
1   pg_1257       2
2    pg_309       1
3     ot_97       1
4   pg_2780       1
5   pg_2885       1
6    pg_313       1
7   pg_2461       4
8   pg_2769       7
9   pg_1940       1
> lapply(res$study_ids, function(x) get_tree_ids(get_study_meta(x)))
[[1]]
[1] "tree6547" "tree6548"

[[2]]
[1] "tree254" "tree255" "tree256" "tree257"

[[3]]
NULL

[[4]]
[1] "tree6446"

[[5]]
[1] "tree6689" "tree6690" "tree6691" "tree6692"

[[6]]
[1] "tree6681"

[[7]]
[1] "tree5287" "tree5288" "tree5289" "tree6655"

[[8]]
[1] "tree6409" "tree6410" "tree6411" "tree6412" "tree6413" "tree6414" "tree6415"

[[9]]
[1] "tree3942" "tree3943" "tree3944"

> lapply(res$study_ids, function(x) candidate_for_synth(get_study_meta(x)))
[[1]]
NULL

[[2]]
NULL

[[3]]
[1] "tree1" "tree2" "tree3" "tree4" "tree5" "tree6" "tree7" "tree8" "tree9"

[[4]]
NULL

[[5]]
[1] "tree6690"

[[6]]
[1] "tree6681"

[[7]]
NULL

[[8]]
NULL

[[9]]
[1] "tree3943"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant