# # = FALSE,消息,警告= FALSE ----------------------------------- 库(chromVAR)库(motifmatchr)图书馆(矩阵)图书馆(SummarizedExperiment)库(BiocParallel) set.seed (2017 ) ## ------------------------------------------------------------------------ 注册(MulticoreParam (8 )) ## ------------------------------------------------------------------------ 注册(MulticoreParam (8,progressbar = TRUE )) ## ------------------------------------------------------------------------ 注册(SnowParam(工人= 1,type = "袜子 ")) ## ------------------------------------------------------------------------ 注册(SerialParam ()) ## ------------------------------------------------------------------------ peakfile < -执行(“extdata / test_bed.txt”、包=“chromVAR”)的山峰< getPeaks (peakfile,sort_peaks = TRUE ) ## ------------------------------------------------------------------------ bamfile < -执行(“extdata / test_RG。bam”,包= " chromVAR”)fragment_counts < getCounts (bamfile,山峰,配对= TRUE, by_rg = TRUE,格式=“砰”,colData = DataFrame (celltype = "通用汽车 ")) ## ------------------------------------------------------------------------ 数据(example_counts包=“chromVAR”)负责人(example_counts ) ## ---- 消息= FALSE ---------------------------------------------------- 库(BSgenome.Hsapiens.UCSC.hg19) example_counts < addGCBias (example_counts,构成了rowData (example_counts基因组= BSgenome.Hsapiens.UCSC.hg19) ( )) ## ------------------------------------------------------------------------ # 发现指数样本保持counts_filtered < - filterSamples (example_counts min_depth = 1500, min_in_peaks = 0.15,闪亮的= FALSE) # #——filter_plot fig.width = 6, fig.height = 6 -------------------------- # 发现指数样本保持filtering_plot < filterSamplesPlot (example_counts min_depth = 1500, min_in_peaks = 0.15,filtering_plot use_plotly = FALSE) ## ------------------------------------------------------------------------ 第九< - filterSamples (example_counts ix_return = TRUE,闪亮的= FALSE ) ## ------------------------------------------------------------------------ counts_filtered < - filterPeaks (counts_filterednon_overlapping = TRUE ) ## ------------------------------------------------------------------------ 主题< - getJasparMotifs () ## ------------------------------------------------------------------------ yeast_motifs < getJasparMotifs(物种= "酿酒酵母 ") ## ------------------------------------------------------------------------ 库(motifmatchr) motif_ix < matchMotifs (counts_filtered图案,基因组= BSgenome.Hsapiens.UCSC.hg19 ) ## ------------------------------------------------------------------------ kmer_ix < - matchKmers (6 counts_filtered基因组= BSgenome.Hsapiens.UCSC.hg19 ) ## ------------------------------------------------------------------------ dev < - computeDeviations(对象= counts_filtered,注释= motif_ix ) ## ------------------------------------------------------------------------ bg < = counts_filtered getBackgroundPeaks(对象 ) ## ------------------------------------------------------------------------ dev < - computeDeviations(对象= counts_filtered注释= motif_ix background_peaks = bg) # #——可变性,fig.width = 6, fig.height = 6 -------------------------- 可变性< - computeVariability (dev) plotVariability(可变性,use_plotly = FALSE ) ## ------------------------------------------------------------------------ tsne_results < - deviationsTsne (dev,阈值= 1.5,困惑= 10 ) ## ------------------------------------------------------------------------ tsne_plots < - plotDeviationsTsne (dev, tsne_results annotation_name =“TEAD3 sample_column =“Cell_Type”, shiny = FALSE) tsne_plots[[1]] tsne_plots[[2]] ## ------------------------------------------------------------------------ Sys.Date() ## ------------------------------------------------------------------------ sessionInfo()