## ----------------------------------------------------------------------------- 库(矛盾)库(命运)suppressPackageStartupMessages(库(残渣))库(purrr)图书馆(ggplot2)图书馆(SingleCellExperiment ) ## ----------------------------------------------------------------------------- # 帮助我们感兴趣的部分(scRNAseq-package,包= scRNAseq) % > % repr:: repr_html () % > % stringr:: str_extract_all (stringr::正则表达式(

数据集。* ?

”,dotall = TRUE) % > % unlist() % > %粘贴(崩溃 = '') %>% knitr: raw_html () ## ----------------------------------------------------------------------------- 艾伦< - scRNAseq:: ReprocessedAllenData () ## ----------------------------------------------------------------------------- rowData (allen)美元符号< - rownames构成了rowData (allen) EntrezID美元(allen) <——AnnotationDbi:: mapIds (org.Mm.eg.db:: org.Mm.eg.db, rownames (allen),“EntrezID”,“别名”构成了rowData (allen) Uniprot美元)<——AnnotationDbi: mapIds (org.Mm.eg.db:: org.Mm.eg.db, rownames (allen),“Uniprot”,“别名”,multiVals =“列表”)assayNames (allen) [assayNames (allen) = = ' rsem_counts '] < -“计数”assayNames (altExp(艾伦,ERCC)) (assayNames (altExp(艾伦,ERCC)) = = ' rsem_counts '] < -艾伦“计数” ## ----------------------------------------------------------------------------- < - computeSpikeFactors(艾伦,艾伦艾伦ERCC) < - logNormCounts艾伦(allen) ## ----------------------------------------------------------------------------- decomp < - modelGeneVarWithSpikes(艾伦,ERCC) rowData (allen)美元hvg_order < -订单(decomp生物美元,减少= TRUE ) ## ----------------------------------------------------------------------------- allen_hvg < -子集(艾伦,hvg_order < = 5000 l ) ## ----------------------------------------------------------------------------- # reducedDim (allen_hvgpca) < - irlba: prcomp_irlba (t(化验(艾伦,logcounts)), 50) $ x ## ----------------------------------------------------------------------------- set.seed (1) dms < - c(“欧几里得”、“余弦”,“rankcor ') %>% #, ' l2的set_names() % > %地图(~ DiffusionMap (knn_params allen_hvg距离=,=(方法= ' covertree列表 '))) ## ----------------------------------------------------------------------------- dms % > % imap(函数(dm, dist)情节(dm, 1:2,col_by = driver_1_s) + ggtitle(经销))% > % cowplot:: plot_grid (nrow plotlist =, = 1 ) ## ----------------------------------------------------------------------------- grs < -地图(dms, gene_relevance ) ## ----------------------------------------------------------------------------- gms < - imap (grs函数(gr, dist)情节(gr, iter_smooth = 0) + ggtitle(经销))cowplot:: plot_grid (plotlist = gms,nrow = 1 ) ## ----------------------------------------------------------------------------- gms[1] % > %地图(~ $ id。[1:10])% > % purrr::减少(交叉)% > %猫(9月 = ' ') ## ----------------------------------------------------------------------------- httr: GET (= ' https://www.uniprot.org/uniprot/ ',查询列表(列= ' id、基因注释(组织特异性),格式=“选项卡”,query = rowData(allen)$Uniprot[gms$cos $ids[1:6]] %>% unlist() %>% paste(collapse = ' or ')) %>% httr::content(type = 'text/tab-separated-values', encoding = 'utf-8',)