getRankedUniqueMotifs: get the unique motif in each category grouped by distance

Description Usage Arguments Value Author(s) Examples

View source: R/getRankedUniqueMotifs.R

Description

to get the unique motif in a given category, eg by species.

Usage

1

Arguments

phylog

an object of class phylog

attr

attribute used for category of motifs

Value

return a list:

uni.rank

unique motif ranks

uni.length

length of unique motif grouped by distance

uni.list

unique motif names grouped by distance

Author(s)

Jianhong Ou

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
   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("^(.*?)_.*$", "\1", leaves)
        getRankedUniqueMotifs(phylog, attr)
    }

motifStack documentation built on Nov. 8, 2020, 7:43 p.m.