# #——结果=“隐藏”,呼应= FALSE,消息= FALSE,警告= FALSE ----------------- set.seed(42)库(knitr) opts_knit美元集(自我。contains = TRUE,上传。opts_chunk$set(dev = 'png', dpi = 300, out。Width = "700px",输出。身高= " 700 px " ) ## ---- eval = FALSE --------------------------------------------------------------- # install.packages (BiocManager) # BiocManager:安装(“签名者 ") ## ---- 结果= '隐藏',消息= FALSE -------------------------------------------- 库(签名者)# # - eval = FALSE --------------------------------------------------------------- # 库(VariantAnnotation) # # # BSgenome,与变量调用#库(bsgenome . hspapiens . ucsc .hg19) # # vcfobj <- readVcf("/path/to/a/file. "vcf", "hg19") # mut <- genCountMatrixFromVcf(bsgenome . hspiens . ucsc . vcf) # mut <-hg19 vcfobj) # # - eval = FALSE --------------------------------------------------------------- # 傻瓜=矩阵(ncol = 96, nrow = 0)为(我在vcf_files) {# # vo = readVcf(我,“hg19”)# #样品名称(vcf应该捡起自动如果可用)# # colnames (vo) = # m0 = genCountMatrixFromVcf (mygenome vo) #狗= rbind(狗,m0) #} #暗(傻瓜)# # #矩阵与所有样本——eval = FALSE --------------------------------------------------------------- # 库(rtracklayer) # # target_regions < -进口(con = " /道路/ / /目标。床”,格式=“床”)# opp < - genOpportunityFromGenome (BSgenome.Hsapiens.UCSC。hg19 # target_regions nsamples = nrow(无足轻重的人 )) ## ---- eval = FALSE --------------------------------------------------------------- # 库(Rsamtools) # # #确保/道路/ / genome.fasta。辉是存在的!# #你可以使用“samtools faidx”命令来创建它# mygenome < - FaFile(“/道路/ / genome.fasta”)# #狗< - genCountMatrixFromVcf (mygenome vcfobj) # opp < genOpportunityFromGenome (mygenome target_regions ) # ## ----------------------------------------------------------------------------- 狗< - read.table(执行(“extdata”、“21 _breast_cancers.mutations.txt”、包=“签名者”),头= TRUE, check.names = FALSE) opp < - read.table(执行(“extdata”,“21 _breast_cancers.opportunity.txt”,包= "签名者 ")) ## ---- eval = FALSE --------------------------------------------------------------- # < -签名者签名(M =傻瓜,Opport = opp) # # - eval = FALSE --------------------------------------------------------------- # < -签名者签名(M =傻瓜,Opport = opp nlim = c (2) 11 )) ## ---- 结果= '隐藏',消息= FALSE -------------------------------------------- < -签名者签名(M =傻瓜,Opport = opp nsig = 5, main_eval = 100, EM_eval = 50,EMit_lim = 20) # # - eval = FALSE --------------------------------------------------------------- # BICboxplot(签名)# #——呼应= FALSE,结果= '飞机 '----------------------------------------------- 猫(sprintf(“\ n”,image_uri(“Model_selection_BICs.png "))) ## ----------------------------------------------------------------------------- 路径(签名SignExposures美元 ) ## ----------------------------------------------------------------------------- SignPlot SignExposures美元(签名 ) ## ----------------------------------------------------------------------------- SignHeat SignExposures美元(签名 ) ## -----------------------------------------------------------------------------ExposureBoxplot SignExposures美元(签名 ) ## ----------------------------------------------------------------------------- ExposureBarplot SignExposures美元(签名 ) ## ----------------------------------------------------------------------------- ExposureHeat SignExposures美元(签名 ) ## ----------------------------------------------------------------------------- # 组标签,各自的变异数矩阵的每一行BRCA_labels < - c(“wt”、“BRCA1 +”,“BRCA2 +”、“BRCA1 +”,“BRCA2 +”、“BRCA1 +”,“BRCA1 +”、“wt”,“wt”,“wt”,“wt”,“BRCA1 +”,“wt”,“BRCA2 +”、“BRCA2 +”,“wt”,“wt”,“wt”,“wt”,“wt wt) diff_exposure < DiffExp(签名SignExposures美元,标签= BRCA_labels ) ## ----------------------------------------------------------------------------- # pvalues diff_exposure Pvquant美元 ## ----------------------------------------------------------------------------- # 大多数暴露组diff_exposure MostExposed美元 ## ----------------------------------------------------------------------------- # 注意BRCA_labels[15],[20]和[21]将NA BRCA_labels < - c(“wt”、“BRCA +”,“BRCA +”、“BRCA +”、“BRCA +”、“BRCA +”、“BRCA +”、“wt”,“wt”,“wt”、“wt”、“BRCA +”、“wt”、“BRCA +”,NA,“wt”、“wt”,“wt”、“wt NA NA)类< -分类(签名SignExposures美元,标签= BRCA_labels ) ## ----------------------------------------------------------------------------- # 期末作业类美元的相对频率分配课时选择团体类频率#所有指定频率类allfreqs美元 ## ----------------------------------------------------------------------------- 引用(“签名者 ") ## ----------------------------------------------------------------------------- sessionInfo () # #----------------------------------------------------------------------------- 打印(名字(dev.cur ()))