# #——包括= FALSE --------------------------------------------------------- knitr: opts_chunk美元集(崩溃= TRUE,发表评论 = "#>" ) ## ---- 设置 -------------------------------------------------------------------- 库(文化)库(magrittr ) ## ----------------------------------------------------------------------------- 选项(meme_db =执行(“extdata / flyFactorSurvey_cleaned。Meme ", package = "memes",mustWork = TRUE )) ## ---- eval = F ------------------------------------------------------------------ # 库(universalmotif) # example_motif < - create_motif # runTomTom (example_motif(“CCRAAAW”) ) ## ---- eval = F ------------------------------------------------------------------ # 数据(“dreme_example”)# runTomTom (dreme_example ) ## ----------------------------------------------------------------------------- # 这是一个预构建数据集打包与模因#镜子运行:# options(meme_db = system.file("inst/extdata/db/fly_factor_survey_id. txt ")meme”,包=“模因”))# example_motif < - create_motif (CCRAAAW) # example_tomtom < - runTomTom (example_motif)数据(“example_tomtom ") ## ----------------------------------------------------------------------------- 名称(example_tomtom ) ## ----------------------------------------------------------------------------- 名称(example_tomtom tomtom[[1美元 ]]) ## ---- fig.height = 2,fig.width = 5 ----------------------------------------------- 图书馆(universalmotif) view_motifs (example_tomtom best_match_motif美元 ) ## ---- fig.height = 3,fig.width = 5 ----------------------------------------------- example_tomtom tomtom [[1]] match_motif美元[1:2]% > % view_motifs () ## ----------------------------------------------------------------------------- example_tomtom % > % drop_best_match() % > %的名字 ## ----------------------------------------------------------------------------- unnest运算< - example_tomtom % > % drop_best_match () % > % tidyr:: unnest运算(tomtom)名称(unnest运算)# #----------------------------------------------------------------------------- unnest运算% > % nest_tomtom() % > %的名字 ## ----------------------------------------------------------------------------- example_tomtom tomtom美元[[1]]% > % (3 ) ## ----------------------------------------------------------------------------- example_tomtom % > % dplyr::选择(名称、best_match_name ) ## ----------------------------------------------------------------------------- new_tomtom < - example_tomtom % > % #多个主题可以更新一次通过额外的名称-值对。force_best_match (c(“example_motif”=“Lag1_Cell ")) ## ----------------------------------------------------------------------------- # 原来的最佳匹配:example_tomtom best_match_name #美元迫使后新的最佳匹配:new_tomtom best_match_name # #——fig.height = 4美元,fig.width = 5 ----------------------------------------------- example_tomtom % > % view_tomtom_hits (top_n = 3 ) ## ----------------------------------------------------------------------------- sessionInfo ()