# #——消息= FALSE --------------------------------------------------------- 库(BRGenomics)数据(“PROseq”)(“txs_dm6_chr4数据 ") ## ----------------------------------------------------------------------------- # 让3数据集ps1 < - PROseq (seq(1、长度(PROseq), 3)] ps2 < - PROseq (seq(2、长度(PROseq), 3)] ps3 < - PROseq (seq(3、长度(PROseq), 3)] #使用“=”赋值在()给名单列表元素ps_list < -列表(ps1 = ps1, ps2 = ps2,ps3 (ps_list) ps_list = ps3)的名字 ## ----------------------------------------------------------------------------- getCountsByRegions (ps_list txs_dm6_chr4 [1:5], ncores = 1 ) ## ----------------------------------------------------------------------------- # 融化,并使用可选region_names参数txs_counts < - getCountsByRegions (ps_list txs_dm6_chr4,融化= TRUE, region_names = txs_dm6_chr4 tx_name美元,(txs_counts ncores = 1)头 ) ## ----------------------------------------------------------------------------- 库(ggplot2) ggplot (txs_counts aes (x =样本,y =信号,填补=样本))+ geom_violin () + theme_bw () ## ----------------------------------------------------------------------------- cbp_maxtx < - getCountsByPositions (ps_list txs_dm6_chr4[135],融化= TRUE, ncores = 1)头(cbp_maxtx ) ## ---- fig.height = 4,fig.width = 6 ----------------------------------------------- ggplot (cbp_maxtx aes (x =位置,y =信号))+ facet_wrap(~样,ncol = 1,地带。position = "right") + geom_col(size = 0.5, color = "darkgray") + coord_cartesian(expand = FALSE) + labs(title = txs_dm6_chr4$tx_name[135], x = "距离TSS", y = "PRO-seq信号")+ theme_classic() + theme(strip.text. text. text.)Y = element_text(angle = 0), strip。背景= element_blank (), axis.line.x = element_blank (), axis.ticks.x = element_blank ()) ## ----------------------------------------------------------------------------- ps_multi < mergeGRangesData (ps1, ps2, ps3,多路= TRUE,ncores ps_multi = 1) ## ----------------------------------------------------------------------------- mcols (ps_multi ) ## ---- 崩溃= TRUE --------------------------------------------------------- ps_multi $ ps1 [1:5 ] ## ----------------------------------------------------------------------------- # 所有的数据集(所有字段),得到数量在第一个5成绩单getCountsByRegions (ps_multi, txs_dm6_chr4[1:5],字段名称= (mcols (ps_multi)),ncores = 1) #获得ps2的计数数据集只有getCountsByRegions (ps_multi, txs_dm6_chr4[1:5]字段=“ps2 ncores = 1) #如果没有领域,大多数函数将默认使用所有字段getCountsByRegions (ps_multi, txs_dm6_chr4 [1:5], ncores = 1 ) ## ---- eval = FALSE ------------------------------------------------------------ # # 保存PRO-seq农庄为以后进口# saveRDS (PROseq、文件= ~ / PROseq.RData) # # #保存农庄# saveRDS列表(ps_list,file = "~/ps_list. rdata ") # # #重新导入ps_list <- readRDS("~/ps_list. rdata ")