# #——回声= FALSE,结果= '隐藏 '------------------------------------------ 图书馆(knitr)美元opts_chunk组(错误= FALSE) # #——风格,呼应= FALSE,结果= ' asis '------------------------------------ ## BiocStyle:减价 () ## ---- 消息= FALSE --------------------------------------------------------- 库(SGSeq ) ## ----------------------------------------------------------------------------- 如果 ## ----------------------------------------------------------------------------- 路径< -系统。si$file_bam <- file. file("extdata", package = "SGSeq")路径(路径,“bams”,如果file_bam美元 ) ## ---- 消息= FALSE --------------------------------------------------------- 库(TxDb.Hsapiens.UCSC.hg19.knownGene) txdb < - TxDb.Hsapiens.UCSC.hg19。knownGene txdb <- keepSeqlevels(txdb,“chr16”)seqlevelsStyle (txdb) <——“NCBI " ## ----------------------------------------------------------------------------- txf_ucsc < - convertToTxFeatures (txdb) txf_ucsc < - txf_ucsc (txf_ucsc % / % gr)头(txf_ucsc ) ## ----------------------------------------------------------------------------- 类型(txf_ucsc)头(txName (txf_ucsc))头(geneName (txf_ucsc )) ## ----------------------------------------------------------------------------- sgf_ucsc < - convertToSGFeatures (txf_ucsc)头(sgf_ucsc) # #——消息= FALSE --------------------------------------------------------- sgfc_ucsc < - analyzeFeatures (si、特性= txf_ucsc) sgfc_ucsc # # - eval = FALSE ------------------------------------------------------------ # colData (sgfc_ucsc) # rowRanges (sgfc_ucsc) #交头接耳(计数(sgfc_ucsc)) # (FPKM (sgfc_ucsc )) ## ---- 图1,fig.width = 4.5, fig.height = 4.5 ---------------------------------- df < - plotFeatures (sgfc_ucscgeneID = 1 ) ## ---- 消息= FALSE --------------------------------------------------------- sgfc_pred < - analyzeFeatures (si = gr)头(rowRanges (sgfc_pred )) ## ----------------------------------------------------------------------------- sgfc_pred < -注释(sgfc_pred txf_ucsc)头(rowRanges (sgfc_pred )) ## ---- 图2,fig.width = 4.5, fig.height = 4.5 ---------------------------------- df < - plotFeatures (sgfc_pred geneID = 1,color_novel =“红色 ") ## ---- 消息= FALSE --------------------------------------------------------- sgvc_pred < - analyzeVariants sgvc_pred (sgfc_pred) ## ----------------------------------------------------------------------------- mcols (sgvc_pred ) ## ----------------------------------------------------------------------------- variantFreq (sgvc_pred) # # -图3,fig.width = 1.5, fig.height = 4.5 ---------------------------------- plotVariants (sgvc_pred eventID = 1,color_novel =“红色 ") ## ---- 消息= FALSE --------------------------------------------------------- 库(BSgenome.Hsapiens.UCSC.hg19) seqlevelsStyle (Hsapiens) < -“NCBI vep < - predictVariantEffects (sgv_pred、txdb Hsapiens) vep # # - eval = FALSE ------------------------------------------------------------ # plotFeatures (sgfc_pred geneID = 1) # plotFeatures (sgfc_pred, geneName = " 79791 ") # plotFeatures (sgfc_pred,这= gr ) ## ---- eval = FALSE ------------------------------------------------------------ # plotFeatures (sgfc_pred geneID = 1,包括=“连接”)# plotFeatures (sgfc_pred, geneID = 1,包括=“外显子”)# plotFeatures (sgfc_pred, geneID = 1,包括= " ") ## ---- eval = FALSE ------------------------------------------------------------ # plotFeatures (sgfc_pred geneID = 1, toscale =“基因”)# plotFeatures (sgfc_pred geneID = 1, toscale =“外显子”)# plotFeatures (sgfc_pred geneID = 1,toscale = "没有 ") ## ---- 图4,fig.width = 4.5, fig.height = 4.5 --------------------------------- 票面价值(mfrow = c(5、1),3 = c(1、3、1,1))plotSpliceGraph (rowRanges (sgfc_pred) geneID = 1, toscale =“没有”,color_novel =“红色”)(j在1:4){plotCoverage (sgfc_pred [j], geneID = 1, toscale = "没有 ") } ## ---- 消息= FALSE --------------------------------------------------------- sgv < - rowRanges sgvc_pred sgvc < - getSGVariantCounts (sgv, sample_info = si) sgvc ## ----------------------------------------------------------------------------- x <- counts(sgvc) vid <- variantID(sgvc) eid <- eventID(sgvc) ## ---- message = FALSE--------------------------------------------------------- txf <- predictTxFeatures(si, gr) sgf <- convertToSGFeatures(txf) sgf <- annotate(sgf, txf_ucsc) sgfc <- getSGFeatureCounts(si, sgf) sgv <- findSGVariants(sgf) sgvc <- getSGVariantCounts(sgv, sgfc) ## ----------------------------------------------------------------------------- sessionInfo()