## ----设置,包括= false ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ## ---- fig.cap='PRAM workflow', out.width='237px',out.height ='233px',echo = f ----- knitr :: include_graphics(“ workflow_noscreen.jpg”)## -------------------------------------------------------------------------------------------------------------- # devtools::install_github('pliu55/pram') ## --- 安装式纤维束,eval = false -----------------------------------------------------------#if(!(“ biocmanager”,悄悄= true))#install.packages(“ biocmanager”)#biocmanager :: install(“ pram”)## ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ## ## ##假设Stringtie二进制在文件夹/usr/local/stringtie-1.3.3/#####pram :: runpram(in_gtf,in_gtf,in_bamv,out_gtf,method ='plst',#stringtie ='/usr/usr/usr/loca/strigntietie-1.3.3/stringtie')## ----访问样本----------------------------------------------------------------------------------------------------------------------------- file('extdata/demo/in.gtf',package ='pram')## ---- runpram,eval = false -------------------------------------------------------------------------------------------------------------#in_gtf = system.file('extdata/demo/in.gtf',package ='pram')###in_bamv = c(system.file(file)('extdata/demo/szp.bam',package ='pram'),#system.file('extdata/demo/tlc.bam',package ='pram'))###pred_out_out_gtf = tempfile(fileext ='。')#### ###假设字符串二进制在文件夹/usr/local/local/stringtie-1.3.3/#######pram :: runpram(in_gtf,in_bamv,in_bamv,pred_out_out_gtf,method ='plst'plst'='/usr/loca/stringtie-1.3.3/stringtie')## -------------------------------------------------------------------------------------------------------- url_hg19_chromsize= 'http://hgdownload.cse.ucsc.edu/goldenpath/hg19/database/chromInfo.txt.gz' ## ----defIgRanges, warning=FALSE----------------------------------------------- pram::defIgRanges(system.file('extdata/gtf/defIgRanges_in.gtf', package='pram'), genome = 'hg38') ## ----prepIgBam---------------------------------------------------------------- finbam =system.file('extdata/bam/CMPRep2.sortedByCoord.raw.bam', package='pram') iggrs = GenomicRanges::GRanges('chr10:77236000-77247000:+') foutbam = tempfile(fileext='.bam') pram::prepIgBam(finbam, iggrs, foutbam) ## ----echo=F------------------------------------------------------------------- url_cf_web = paste0('[Cufflinks, Cuffmerge]', '(http://cole-trapnell-lab.github.io/cufflinks/)') url_cf_lnx = paste0('[v2.2.1]', '(http://cole-trapnell-lab.github.io/cufflinks/assets/', 'downloads/cufflinks-2.2.1.Linux_x86_64.tar.gz)') url_cf_mac = paste0('[v2.1.1]', '(http://cole-trapnell-lab.github.io/cufflinks/assets/', 'downloads/cufflinks-2.1.1.OSX_x86_64.tar.gz)') cf_methods = '__plcf__, __cfmg__, __cftc__, and __cf__' url_st_web = paste0('[StringTie, StringTie-merge]', '(https://ccb.jhu.edu/software/stringtie/)') url_st_lnx = paste0('[v1.3.3b]', '(http://ccb.jhu.edu/software/stringtie/dl/', 'stringtie-1.3.3b.Linux_x86_64.tar.gz)') url_st_mac = paste0('[v1.3.3b]', '(http://ccb.jhu.edu/software/stringtie/dl/', 'stringtie-1.3.3b.OSX_x86_64.tar.gz)') st_methods = '__plst__, __stmg__, and __st__' url_tc_web = '[TACO](https://tacorna.github.io)' url_tc_lnx = paste0('[v0.7.0]', '(https://github.com/tacorna/taco/releases/download/', 'v0.7.0/taco-v0.7.0.Linux_x86_64.tar.gz)') url_tc_mac = paste0('[v0.7.0]', '(https://github.com/tacorna/taco/releases/download/', 'v0.7.0/taco-v0.7.0.OSX_x86_64.tar.gz)') ## ----buildModel, eval=FALSE--------------------------------------------------- # fbams = c( system.file('extdata/bam/CMPRep1.sortedByCoord.clean.bam', # package='pram'), # system.file('extdata/bam/CMPRep2.sortedByCoord.clean.bam', # package='pram') ) # # foutgtf = tempfile(fileext='.gtf') # # ## # ## assuming the stringtie binary is in folder /usr/local/stringtie-1.3.3/ # ## # pram::buildModel(fbams, foutgtf, method='plst', # stringtie='/usr/loca/stringtie-1.3.3/stringtie') ## ----selModel----------------------------------------------------------------- fin_gtf = system.file('extdata/gtf/selModel_in.gtf', package='pram') fout_gtf = tempfile(fileext='.gtf') pram::selModel(fin_gtf, fout_gtf) ## ----evalModel---------------------------------------------------------------- fmdl = system.file('extdata/benchmark/plcf.tsv', package='pram') ftgt = system.file('extdata/benchmark/tgt.tsv', package='pram') mdldt = data.table::fread(fmdl, header=TRUE, sep="\t") tgtdt = data.table::fread(ftgt, header=TRUE, sep="\t") pram::evalModel(mdldt, tgtdt) ## ----sessionInfo, echo=FALSE-------------------------------------------------- sessionInfo()