getRankedUniqueMotifs.Rd
to get the unique motif in a given category, eg by species.
getRankedUniqueMotifs(phylog, attr)
phylog | an object of class phylog |
---|---|
attr | attribute used for category of motifs |
return a list:
unique motif ranks
length of unique motif grouped by distance
unique motif names grouped by distance
Jianhong Ou
if(interactive() || Sys.getenv("USER")=="jianhongou"){ library("MotifDb") matrix.fly <- query(MotifDb, "Dmelanogaster") matrix.human <- query(MotifDb, "Hsapiens") pfms <- c(as.list(matrix.fly), as.list(matrix.human)) pfms <- pfms[sample(seq_along(pfms), 100)] hc <- clusterMotifs(pfms) library(ade4) phylog <- ade4::hclust2phylog(hc) leaves <- names(phylog$leaves) attr <- gsub("^(.*?)_.*$", "\", leaves) getRankedUniqueMotifs(phylog, attr) }