rdiaz02 / evam-tools Goto Github PK
View Code? Open in Web Editor NEWEvAM-Tools
License: GNU Affero General Public License v3.0
EvAM-Tools
License: GNU Affero General Public License v3.0
Those are needed to get the likelihood and compute cross-validated likelihoods, etc. Right now, the predicted genotypes are those for models without noise.
This works for DAGs
plot_model <- function(x, main = "") {
method_info <- igraph::graph_from_data_frame(x[, c("From", "To")])
parent_set <- evamtools:::parent_set_from_edges(x)
evamtools:::plot_method(method_info = method_info,
parent_set = parent_set,
edges = x,
method = main)
}
where is the usual data frame with From, To, etc.
Improve and do something similar for MHN.
The above is simplified from plot_evam in file evam_plotting.R
A user might try this
d1 <- data.frame(From = c("Root", "Root", rep(c("A", "B"), 3)),
To = c("A", "B", rep(c("C", "D", "E"), c(2, 2, 2))),
Relation = rep(c("Single", "AND", "OR", "XOR"), rep(2, 4)),
Lambdas = c(0.7, 0.8, rep(c(0.9, 0.4, 0.5), c(2, 2, 2))))
evamtools:::cpm2tm(d1)
which fails as
Error in as.environment(where) : using 'as.environment(NULL)' is defunct
> traceback()
2: exists("Relation", x$edges)
1: evamtools:::cpm2tm(ex_XOR_AND_OR)
So we probably want to:
"Relation" %in% colnames(x$edges)
instead of exists("Relation", x$edges)
: the second fails when x$edges
does not exist.Many variations on this. In general, moving between data sets when some have genes that are not consecutive.
This currently does not work
d1 <- data.frame(From = c("Root", "Root", rep(c("A", "B"), 3)),
To = c("A", "B", rep(c("C", "D", "E"), c(2, 2, 2))),
Relation = rep(c("Single", "AND", "OR", "XOR"), rep(2, 4)),
Lambdas = c(0.7, 0.8, rep(c(0.9, 0.4, 0.5), c(2, 2, 2))))
sample_evam(d1)
And yet, the web app is doing something that seems to be just that.
So:
parent_set_from_edges
).In the web app we are using function generate_sample_from_dag
. (Called on click on "resample_dag")
As it says, bubble plots as in Moen & Johnston, HyperHMM: efficient inference of evolutionary and progressive dynamics on hypercubic transition graphs, https://academic.oup.com/bioinformatics/article/39/1/btac803/6895098 , Fig.2, 3, o 4, left column
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.